亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? dptarget.c

?? vxworks的源代碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
/***  File:   dptarget.c**  Description:**    This file contains routines which are meant to be used by target**    systems when communicating with the NetROM emulator through Pod 0's**    dualport ram.****      Copyright (c) 1996 Applied Microsystems Corporation**                          All Rights Reserved**** Redistribution and use in source and binary forms are permitted ** provided that the above copyright notice and this paragraph are ** duplicated in all such forms and that any documentation,** advertising materials, and other materials related to such** distribution and use acknowledge that the software was developed ** by Applied Microsystems Corp. (the Company).  The name of the ** Company may not be used to endorse or promote products derived** from this software without specific prior written permission. ** THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ** IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED** WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. ****  Modification History:   2/18/94 fdv add two out of band characters to readaddr protocol:                RA_RESET and RA_RESYNC.                RA_RESET lets the target trigger a tgtreset.                RA_RESYNC lets the target trigger the netrom initialize                    the dualport.   4/7/94 fdv 1. fixed ra_reset and ra_resync. 2. modified read addr reads              to "read away" cause of problem seen with ev960ca demo board.    5/4/94 fdv added MISC out of band character to readaddr:		subfunction is receive interrupt ack.   5/27/94 fdv added MISC out of band character to readaddr:		subfunction is turn off emulate before ra_setmem.   6/16/94 fdv fix to emoffonwrite, it was being called on every set_mem   2/23/95 sch Add virtual ethernet, both ReadAddr and ReadWrite   8/21/95 sch Add read after write check to dp_readint().  This               fixes a data corruption problem when sending large               amounts of data to the host with little traffic from               the host.	   sch Cleanup: Change xchannels back to channels, delete unused               OVERFLOW_MSGS code.	   sch Add protocol to end of ra_resync().  Wait for NetROM to	       turn off RI and then turn it back on before exiting, so	       the target will not try to send or receive until NetROM	       is done with the resync.	   sch More cleanup.  Fix declarations of several routines so 	       they will agree with their usage.	   sch In config_dpram, avoid divides when setting oobthresh	       for readaddr.	   sch In dp_bread and dp_bwrite, call READ_POD and WRITE_POD	       if HASCHACHE is true.  These routines will deal with	       turning off the cache.    10/12/95 sch Clean up the ra_resync mod.  Take out delay at start.           Only wait for RI to go on before returning (NetROM will turn           it off before acking the last RE_RESYNC char).*//**********************************************************************    Porting notes:                                OVERVIEW        This file contains routines which are meant to be used by target    systems when communicating with the NetROM emulator through Pod 0's    dualport ram.  These routines are byte-oriented for both transmit and    receive; however, multibytes messages are passed between target and    NetROM whenever possible, to reduce handshaking overhead.  Data is    collected at the target/NetROM interface a byte at a time and passed    over in messages.        Messages are fixed-size, fixed format data structures, whose format    is as follows:                -----------------------------------------                | Flags | Size |         Data           |                -----------------------------------------                    ^      ^               ^                    |      |               |                  2 bytes  |               |                        2 bytes            |                                       60 bytes    Flag values are:        0x8000          Message ready bit        0x0001          Start of message bit (for multiple structure messages)        0x0002          End of message bit (for multiple structure messages)        0x0004          Message structure Wrap bit    The Start and End bits are both set in single structure messages.    The Wrap bit is used to mark the end of an array of structures (for    example, the transmit array).    The size field of the structure indicates how many of the data bytes    are valid.  The size does not include the Flags or the Size field.    The message structure is described in more detail in the include file,    dualport.h.        The protocol between target and NetROM has two distinct flavors;    one for targets which are capable of writing dualport ram and one for    targets which can only read dualport ram.  In general, the target will    poll dualport ram for messages; messages will be ready to process when the    Ready bit is set.  The scenarios for transmitting data to NetROM are    different for targets which have write capability and those which do    not; they are described below.  A key feature of the transmit path    from target to NetROM is the target's ability to cause an interrupt    to the NetROM by *reading* special areas of dualport ram.  When NetROM    receives the interrupt, it uses the target's read address to extract    an eight-bit value.  The value is equal to the offset of the target's    read address from the start of the interrupt-causing area of dualport    ram.        *** Note *** an important issue in communicating with the NetROM is    avoiding collisions when accessing dualport ram.  In situations where    the target and NetROM both access the same dualport address, the target    will lose.  That is, it will read garbage, or its writes may fail.  This    is an unavoidable issue, caused by the asynchronous nature of target    accesses to emulation pod memory, including dualport ram.        Avoiding access collisions when the target sends data to NetROM is    accomplished by the NetROM not polling for messages written by the    target.  Rather, when the target is done writing a message, it sends an    interrupt to the NetROM by reading a special address in dualport ram.    Only when the NetROM receives the interrupt will it check dualport ram for    messages from the target.  If the target cannot write dualport ram,    all data is passed by read-address interrupts, so access collisions are    not a problem.        Access collisions when the NetROM writes messages are unavoidable    because the target must poll dualport ram for messages.  However, the    NetROM will only write each byte of ram one time, so the target can    verify the Ready bit being set in a message, simply by reading the flags    field twice.  Since NetROM will only set the Ready bit after it has    written the message data, the target only needs to perform a "verification"    on the flags fields of message structures.                            READ-WRITE TARGETS        Targets which can write dualport ram will use a dualport memory layout    consisting of an array of 64-byte structures.  There will be 15 receive    structures and 16 transmit data structures.  Receive structures will    contain messages written by NetROM and transmit structure will be    used to send data to NetROM.  The configuration/status structure is    used to indicate whether or not NetROM is ready to process messages,    and reading parts of the configuration/status structure will send    interrupts to NetROM.                --------------------------------------------                |       Configuration/Status Structure (*) |                --------------------------------------------                |       RX Message Structure 0             |                --------------------------------------------                |               ...                        |                --------------------------------------------                |       RX Message Structure 14            |                --------------------------------------------                |       TX Message Structure 0             |                --------------------------------------------                |               ...                        |                --------------------------------------------                |       TX Message Structure 15            |                --------------------------------------------        The configuration/status structure for targets with write    capability is simple:                --------------------------------------------                | Interrupt Area | TX | RX |   Reserved    |                --------------------------------------------                        ^           ^    ^          ^                        |           |    |          |                     8 bytes        |    |          |                                  1 byte |          |                                       1 byte       |                                                54 bytes    The target may read from the interrupt area to generate an interrupt    to the NetROM.  Upon receipt of this interrupt, the NetROM will check    the dualport message area for messages from the target.  The TX and    RX bytes are used to indicate when the NetROM is ready to process    messages and interrupts.  *** The target should not cause interrupts    unless these bytes are set, because NetROM will not detect a missed    interrupt. ***                            READ-ONLY TARGETS	Targets which can read but not write dualport ram must use a    different mechanism to send data to the NetROM.  NetROM    contains a special area of memory in Pod 0 which, when read by the    target, causes an interrupt to be generated to NetROM's processor.    NetROM can determine which address within the 256-byte area was    read, and uses this address to calculate an 8-bit number.  Using    this mechanism, it is possible for the target to send 8-bit data to    the NetROM.  Sending certain 8-bit values is done in two steps.    This is because there are situations in which it is necessary to    send out-of-band data to the NetROM; that is, data which is    relevant to the protocol but not the the content of messages the    target wants to send.  For example, when the target reads a message    structure written by the NetROM, it cannot clear the Ready bit in    the message's flags.  Thus, it uses a special value (that is,    address) to acknowlege messages received from the NetROM.    Distinguishing between ACKs (0xF8) and equivalent values in message    data would require a character-stuffing protocol, which is not    currently supported.  Thus data values greater than 0xF8 are sent    in two or more pieces. The first, an "escape" character (0xF9),    tells NetROM to add 0xF8 to the next character received. The second    piece is the original value minus 0xF8.  This "character stuffing"    only needs to be done for values greater than 0xF8.	The SET character (0xF2) is used when the target system wishes to     request that NetROM modify the contents of emulation memory.  After    receiving the SET character, NetROM will interpret the next four    characters as an offset into emulation memory, received most-significant    byte first.  Following the offset is an 8-bit value to be written.  Note    that the target software should run from RAM from the time it transmits    the value character to the time that NetROM acknowleges the value    character.  This is to prevent memory contention problems.  The set    function is implemented by ra_setmem() in this file.	The START and END characters are used to delineate a complete message    being sent via the read-address protocol.  They are analogous to the START    and END bits in a dualport message structure.  These out-of-band    characters are useful when using a UDP transport between NetROM and the    host system, since each UDP datagram will contain a complete message.    Sending messages is implmented in the ra_putmsg() routine in this file.        There is an added subtlety in the read-address protocol, which is    that NetROM is unable to detect missed interrupts.  As a result, prior    to sending each character, the target must be sure that NetROM is    listening for interrupts, and that the character that was sent was    received.  There are two fields in the configuration/status structure    which accomplish this; one which is set when the NetROM is listening    for interrupts, and one which is incremented for each character    (including control characters) that the target sends.  These are described    below.  Note that the values of all escape characters are different for     target systems which perform burst reads from emulation pod 0.  Consult    your netrom manual for information on these types of systems.        The target receives messages from the NetROM using a similar    protocol to that used by the read-write target.  However, it must    acknowlege each message with a special character, since it cannot    clear Ready bits itself.    /--------  256-byte read-address area; target reads of this area    |       generate interrupts to the NetROM.    |    |   /--     --------------------------------------------    |   |       |                                          |    |   |       --     248-byte ASCII Read-address Data   --    --->|       |                                          |        |       --------------------------------------------        |       |    Control Read-address Data (8 bytes)  |        \--     --------------------------------------------                |       Configuration/Status Structure     |                --------------------------------------------                |       RX Message Structure 0             |                --------------------------------------------                |               ...                        |                --------------------------------------------                |       RX Message Structure 26            |                --------------------------------------------     The layout of the control read-address data area.     --------------------------------------------------------------     | PACK | ESC | SET | START | END | RESET | RESYNC | MISC |     --------------------------------------------------------------        ^      ^     ^      ^      ^      ^        ^       ^        |      |     |      |      |      |        |       |     1 byte    |     |      |      |      |        |       |            1 byte   |      |      |      |        |       | 	          1 byte    |      |      |        |       |		         1 byte    |      |        |       |			        1 byte    |        |       |				       1 byte      |       |						1 byte     |                                                         1 byte    The PACK byte is used to tell NetROM that a single message has been    received from dualport RAM.  This byte should be read after *every*    dualport message.  The ESC byte is used to tell NetROM that the data    being transmitted is greater or equal in value than 248 (0xF8).  When    NetROM receives an ESC character, it will add 0xF8 to the character    which follows, and pass the result to higher level protocols as if it    were received in a single transmission. RESET lets the target trigger     a tgtreset. RESYNC lets the target trigger the netrom initialize the     dualport. MISC allows more control by parsing the next char for a    subfunction. The subfuntions are:	0x1  Receive Interrupt Acknowledge.	0x2  turn off emulate mode before performing ra_setmem.        The layout of the configuration/status structures.                --------------------------------------------                | RI | ACK |           Reserved            |                --------------------------------------------                   ^    ^                  ^                   |    |                  |                1 byte  |                  |                     1 byte                |                                       62 bytes    The RI bit indicates that NetROM is ready to handle interrupts.    The ACK byte is an 8-bit counter, which is incremented for each character    which the NetROM receives, including control characters such as    acks.                                ABOUT THIS FILE        This file contains routines which communicate with the NetROM.  To    be able to send and receive characters, target-side programmers need    only port the clearly marked section at the top of the file.  A hook    is provided for tasking systems which need to allow processes to run;    this is the YIELD_CPU macro.  The routine c_dpcons_hdlr() handles    receipt of messages from the NetROM.  Since the NetROM cannot cause    target-side interrupts, it is called when the target checks for data.        The entry points that the target programmer needs to use are:            config_dpram        initializes control structures and configures                        the target to use dualport in a read-only or read-                        write fashion.            set_dp_blockio      allows the target programmer to set or                        clear a bit in the control structure.  When set,                        the interface routines merely poll for data and                        return if none is present.  Otherwise they will                        wait for data to appear.            dp_chanready        returns 1 if the NetROM is ready to                        process messages; 0 otherwise.	    chan_kbhit		returns 1 if a character is waiting at the 			dualport interface; 0 otherwise.            ra_putch            sends a character to the NetROM using the                        read-address interface.  This routine handles all                        of the appropriate software handshaking.            chan_putch          sends a character to the NetROM.  Actually,                        it stores characters until the message structure is                        full or chan_flushtx() is called.  This reduces                        protocol overhead.            chan_flushtx        sends any characters which have been stored                        but not yet passed to the NetROM.            ra_getch            reads a character from the NetROM, if one                        is present, using the RX message structures of the 			read-address protocol.            chan_getch          reads a character from the NetROM, if one                        is present, using the RX message structures of the			readwrite protocol.	    ra_getmsg		reads a message from dualport ram, when using			the read-address protocol.	    chan_getmsg		reads a message from dualport ram, when using			the readwrite protocol.	    ra_putmsg		sends a complete message delineated by the 			START and END out-of-band characters.	    chan_putmsg		sends a complete message delineated by the	    		START and END bits in the dualport message structures.			This differs from the ra_putch() routine, which treats			each dualport message structure as a complete			message.	    ra_setmem		requests that NetROM write a byte of 			emulation memory.			if ra_emoffonwrite has been called, emulation memory is			turned off before the byte is written.	    ra_reset		requests that NetROM reset the target.	            ra_resync		requests that NetROM re-initialize  it's 			dualport parameters.	    ra_rx_intr_ack	acknowledges a receive interrupt	    ra_emoffonwrite	see ra_setmem	Note that the getmsg() routines are used to incrementally fill an    input buffer.  When used in a polling mode, they return one of four     status values:  GM_NODATA indicates that no data has arrived since the    last poll; GM_MSGCOMPLETE indicates that new data has arrived and that the    input buffer now holds the complete message; GM_NOTDONE indicates that    data has arrived but that the message is not yet complete; GM_MSGOVERFLOW    indicates that more data has arrived, but that it has overflown the input    buffer.  In a non-polling mode, these routines will return either    GM_MSGCOMPLETE or GM_MSGOVERFLOW.*********************************************************************//* Local Defines */#define DUMMY_READ#include "wdb/dpconfig.h"     /* This file must be ported to the new target */#include "wdb/dptarget.h"	     #include "wdb/dualport.h"#include "stdio.h"/* declarations */STATIC void c_dpcons_hdlr();void chan_flushtx();void set_dp_blockio();void ra_putch();int do_emoffonwrite();/* global data */STATIC DpChannel channels[DP_MAXCHANNELS];#ifdef READONLY_TARGETSTATIC int emoffonwrite_set;#endif#ifndef RAWRITES_ONLYSTATIC uInt16 dp_readint();void dp_bwrite();void dp_bread();#ifndef	READONLY_TARGET/* writes an int to dp ram */STATIC voiddp_writeint(addr,val)uInt32 addr;uInt16 val;{	    /* write in network byte order, lsb first */    WRITE_POD(&channels[0], addr + 1, (uInt32)val & 0xFF);    WRITE_POD(&channels[0], addr, (uInt32)(val >> 8) & 0xFF);    /* Check that the write was sucessful.  See change log dated 8/21/95       at the top of this file for details. */    while (val != dp_readint(addr)) {        WRITE_POD(&channels[0], addr + 1, (uInt32)val & 0xFF);        WRITE_POD(&channels[0], addr, (uInt32)(val >> 8) & 0xFF);    }}#endif/* read an int from dpram */STATIC uInt16dp_readint(addr)uInt32 addr;{    uInt16 val;    /* read the msb first, in case it contains flags */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产网站在线观看| 国产午夜三级一区二区三| 黄色资源网久久资源365| 国产精品久久久一本精品 | 成人小视频在线| 香蕉久久一区二区不卡无毒影院 | 自拍偷拍国产亚洲| 久久综合狠狠综合久久激情| 色综合久久中文字幕| 国产一区二三区好的| 午夜视频在线观看一区| 亚洲天堂精品视频| 久久免费看少妇高潮| 欧美老肥妇做.爰bbww| 色偷偷一区二区三区| 国产精品18久久久久| 日韩激情av在线| 亚洲人成小说网站色在线| 久久久www成人免费毛片麻豆| 91精品国产综合久久久久久漫画| 99精品视频一区二区| 国产精品一二三区在线| 日韩精品每日更新| 一区二区高清视频在线观看| 国产精品网站在线播放| 91精品国产免费| 欧美日韩国产天堂| 色88888久久久久久影院野外| 丰满少妇久久久久久久| 国产福利不卡视频| 国产在线精品一区二区夜色 | 在线免费精品视频| av电影天堂一区二区在线观看| 精品一区二区免费| 国产在线看一区| 激情久久久久久久久久久久久久久久| 天天综合色天天综合色h| 夜夜精品浪潮av一区二区三区| 亚洲欧美日韩国产综合| 中文字幕日韩av资源站| 国产精品视频九色porn| 欧美国产在线观看| 中文字幕在线观看一区二区| 日本一区二区三区电影| 久久精子c满五个校花| 久久青草国产手机看片福利盒子| 久久日一线二线三线suv| 精品国产伦一区二区三区观看方式 | 国产色产综合色产在线视频| 久久品道一品道久久精品| 国产拍欧美日韩视频二区| 国产精品视频观看| 一区二区三区中文免费| 日韩综合小视频| 免费观看久久久4p| 国产精品资源网站| 波多野结衣91| 在线一区二区三区做爰视频网站| 欧美综合天天夜夜久久| 日韩欧美一区二区在线视频| 91免费国产在线| 天天色图综合网| 亚洲国产sm捆绑调教视频| 亚洲午夜免费电影| 日本不卡一二三| 老司机免费视频一区二区三区| 丝袜美腿亚洲综合| 视频在线在亚洲| 麻豆精品一区二区三区| 精品在线播放免费| 国产精品亚洲人在线观看| 成人综合在线网站| 成人国产亚洲欧美成人综合网| 99久久精品国产导航| 在线观看日韩高清av| 欧美丝袜自拍制服另类| 久久久久久**毛片大全| 日韩一区中文字幕| 亚洲一区二区三区中文字幕| 肉丝袜脚交视频一区二区| 免费av网站大全久久| 国产精一区二区三区| 不卡av免费在线观看| 欧美亚洲一区二区三区四区| 精品久久国产老人久久综合| 日本一区二区三区电影| 肉肉av福利一精品导航| av成人动漫在线观看| 欧美一区二区二区| 亚洲激情中文1区| 国产麻豆精品95视频| 日本韩国欧美一区| 91精品福利在线一区二区三区| 欧美性受xxxx| 国产精品乱码一区二区三区软件| 一区二区三区中文字幕电影| 免费精品视频在线| 99久久免费精品高清特色大片| 欧美日韩免费在线视频| 久久久久久久网| 亚洲精品欧美专区| 成人国产精品视频| 欧美三级中文字幕| 久久久久久久一区| 亚洲国产精品一区二区尤物区| 久久99国产精品免费网站| av男人天堂一区| 日韩三级中文字幕| 欧美激情自拍偷拍| 国模无码大尺度一区二区三区| 91在线视频网址| 精品久久久久久亚洲综合网| 亚洲激情欧美激情| 国产成人8x视频一区二区| 欧美高清视频不卡网| 亚洲自拍偷拍麻豆| 成人av网在线| 精品国产一区二区三区久久久蜜月| 亚洲欧美日韩成人高清在线一区| 久久成人麻豆午夜电影| 91美女片黄在线观看91美女| 欧美韩国一区二区| 国产在线看一区| 51午夜精品国产| 亚洲视频免费在线观看| 国产一区二区三区免费看| 欧美欧美午夜aⅴ在线观看| 国产精品免费久久久久| 亚洲一级片在线观看| 在线中文字幕一区二区| 亚洲欧洲国产专区| 国产精品一二三四| 精品久久久久一区二区国产| 午夜视频在线观看一区二区三区 | 成人丝袜18视频在线观看| 精品国产制服丝袜高跟| 亚洲h动漫在线| 91亚洲精品久久久蜜桃网站| 亚洲色欲色欲www在线观看| 国产成+人+日韩+欧美+亚洲| 日韩欧美一区二区在线视频| 日韩中文字幕亚洲一区二区va在线| 色婷婷综合久久久中文字幕| 亚洲欧洲日韩在线| 菠萝蜜视频在线观看一区| 欧美精品乱码久久久久久| 视频在线观看国产精品| 欧美综合天天夜夜久久| 亚洲午夜精品一区二区三区他趣| 91网站在线播放| 18欧美亚洲精品| 成人白浆超碰人人人人| 国产三级精品在线| 北条麻妃国产九九精品视频| 国产精品蜜臀在线观看| 成年人网站91| 中文字幕一区二区三区精华液 | 一区二区三区国产豹纹内裤在线| 成人aa视频在线观看| 国产精品区一区二区三区| gogogo免费视频观看亚洲一| 亚洲欧洲成人精品av97| aaa亚洲精品| 一区二区三区四区av| 在线视频国产一区| 天堂va蜜桃一区二区三区漫画版| 欧美日本一区二区在线观看| 日本欧美韩国一区三区| 欧美一级xxx| 韩国v欧美v亚洲v日本v| 国产欧美视频一区二区| 成人av在线资源| 综合久久久久久久| 欧美日韩国产免费一区二区| 蜜臀久久99精品久久久久久9 | 欧美videos大乳护士334| 不卡影院免费观看| 一区二区三区四区中文字幕| 欧美日韩一区二区在线观看视频| 亚洲毛片av在线| 欧美在线视频全部完| 亚洲一区二区高清| 久久综合色综合88| 国产成人亚洲综合a∨婷婷| 亚洲六月丁香色婷婷综合久久| 欧美日韩国产免费一区二区| 六月丁香综合在线视频| 国产精品毛片a∨一区二区三区| 6080国产精品一区二区| 福利电影一区二区| 亚洲在线视频网站| 337p粉嫩大胆噜噜噜噜噜91av| www.亚洲在线| 一级中文字幕一区二区| 国产欧美一区二区在线| 欧美男女性生活在线直播观看| 精品亚洲aⅴ乱码一区二区三区| 亚洲视频在线一区观看| 日韩一区二区中文字幕| 99国产精品视频免费观看|