?? sngks32cend.h
字號:
/* sngks32cEnd.h - END style Ethernet interface header for Samsung ks32c *//* Copyright 1984-2002 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01d,14feb02,m_h error code field in END_DEVICE01c,27sep01,m_h big endian support01b,26apr01,m_h convert tabs to spaces for readability01a,12apr01,m_h created from snds100 template.*/#ifndef __INCsngks32cEndh#define __INCsngks32cEndh#ifdef __cplusplusextern "C" {#endif#include "end.h"#include "netBufLib.h"#include "sngks32c.h"/** PHY definitions **/#define PHY_CONTROL_REG 0#define PHY_ADDR 0#define _AUTO_NEGOTIATE 0x1000#define _10_MB_HDX 0#define _100_MB_FDX 0x2100#define _100_MB_HDX 0x2000 /* o_bit */#define OWNED_BY_CPU 0#define OWNED_BY_BDMA 1/* enable big/little endian register bits with this macro */#if (_BYTE_ORDER == _LITTLE_ENDIAN)#define SNGEND_ENDIAN 1#else#define SNGEND_ENDIAN 0#endif/** the following describes the structure for the * transmit and receive frame descriptors.*/#if (_BYTE_ORDER == _LITTLE_ENDIAN)struct FD_TX_CONTROL_PACKED { UINT32 p_bit:1; UINT32 c_bit:1; UINT32 t_bit:1; UINT32 l_bit:1; UINT32 a_bit:1; UINT32 wa_bit:2; UINT32 reserved_bit:25; }__attribute__((__packed__));#else /*(_BYTE_ORDER == _LITTLE_ENDIAN)*/struct FD_TX_CONTROL_PACKED { UINT32 reserved_bit:25; UINT32 wa_bit:2; UINT32 a_bit:1; UINT32 l_bit:1; UINT32 t_bit:1; UINT32 c_bit:1; UINT32 p_bit:1; }__attribute__((__packed__));#endif /*(_BYTE_ORDER == _LITTLE_ENDIAN)*/typedef struct FD_TX_CONTROL_PACKED FD_TX_CONTROL;#if (_BYTE_ORDER == _LITTLE_ENDIAN)struct FD_TX_FRAMEDATA_PACKED { UINT32 frameDataPtr:31; UINT32 o_bit:1; }__attribute__((__packed__));#else /*(_BYTE_ORDER == _LITTLE_ENDIAN)*/struct FD_TX_FRAMEDATA_PACKED { UINT32 o_bit:1; UINT32 frameDataPtr:31; }__attribute__((__packed__));#endif /*(_BYTE_ORDER == _LITTLE_ENDIAN)*/typedef struct FD_TX_FRAMEDATA_PACKED FD_TX_FRAME_DATA;#if (_BYTE_ORDER == _LITTLE_ENDIAN)struct FD_TX_STATUS_LENGTH_PACKED { UINT32 frameLength:16; UINT32 txCollCnt:4; UINT32 exColl:1; UINT32 txDefer:1; UINT32 paused:1; UINT32 intTx:1; UINT32 underRun:1; UINT32 deferAl:1; UINT32 ncArr:1; UINT32 sqeErr:1; UINT32 lateColl:1; UINT32 txPar:1; UINT32 comp:1; UINT32 txHalted:1; }__attribute__((__packed__));#else /*(_BYTE_ORDER == _LITTLE_ENDIAN)*/struct FD_TX_STATUS_LENGTH_PACKED { UINT32 txHalted:1; UINT32 comp:1; UINT32 txPar:1; UINT32 lateColl:1; UINT32 sqeErr:1; UINT32 ncArr:1; UINT32 deferAl:1; UINT32 underRun:1; UINT32 intTx:1; UINT32 paused:1; UINT32 txDefer:1; UINT32 exColl:1; UINT32 txCollCnt:4; UINT32 frameLength:16; }__attribute__((__packed__));#endif /*(_BYTE_ORDER == _LITTLE_ENDIAN)*/typedef struct FD_TX_STATUS_LENGTH_PACKED FD_TX_STATUS_LENGTH;struct TRANSMIT_FRAME_DESC_PACKED { FD_TX_FRAME_DATA txFrameData; FD_TX_CONTROL txControl; FD_TX_STATUS_LENGTH txStatusLength; struct TRANSMIT_FRAME_DESC_PACKED *nextTxFrameDesc; }__attribute__((__packed__));typedef struct TRANSMIT_FRAME_DESC_PACKED TRANSMIT_FRAME_DESC;#if (_BYTE_ORDER == _LITTLE_ENDIAN)struct FD_RX_FRAME_DATA_PACKED { UINT32 frameDataPtr:31; UINT32 o_bit:1; }__attribute__((__packed__));#else /*(_BYTE_ORDER == _LITTLE_ENDIAN)*/struct FD_RX_FRAME_DATA_PACKED { UINT32 o_bit:1; UINT32 frameDataPtr:31; }__attribute__((__packed__));#endif /*(_BYTE_ORDER == _LITTLE_ENDIAN)*/typedef struct FD_RX_FRAME_DATA_PACKED FD_RX_FRAME_DATA;#if (_BYTE_ORDER == _LITTLE_ENDIAN)struct FD_RX_STATUS_LENGTH_PACKED { UINT32 frameLength:16; UINT32 empty0:3; UINT32 ovMax:1; UINT32 empty1:1; UINT32 ctlRcv:1; UINT32 intRx:1; UINT32 rx10Stat:1; UINT32 alignErr:1; UINT32 crcErr:1; UINT32 overFlow:1; UINT32 longErr:1; UINT32 empty2:1; UINT32 rxPar:1; UINT32 good:1; UINT32 rxHalted:1; }__attribute__((__packed__));#else /*(_BYTE_ORDER == _LITTLE_ENDIAN)*/struct FD_RX_STATUS_LENGTH_PACKED { UINT32 rxHalted:1; UINT32 good:1; UINT32 rxPar:1; UINT32 empty2:1; UINT32 longErr:1; UINT32 overFlow:1; UINT32 crcErr:1; UINT32 alignErr:1; UINT32 rx10Stat:1; UINT32 intRx:1; UINT32 ctlRcv:1; UINT32 empty1:1; UINT32 ovMax:1; UINT32 empty0:3; UINT32 frameLength:16; }__attribute__((__packed__));#endif /*(_BYTE_ORDER == _LITTLE_ENDIAN)*/typedef struct FD_RX_STATUS_LENGTH_PACKED FD_RX_STATUS_LENGTH;struct RECEIVE_FRAME_DESC_PACKED /* receive frame descriptor */ { FD_RX_FRAME_DATA rxFrameData; UINT32 reserved; FD_RX_STATUS_LENGTH rxStatusLength; struct RECEIVE_FRAME_DESC_PACKED *nextRxFrameDesc; }__attribute__((__packed__));typedef struct RECEIVE_FRAME_DESC_PACKED RECEIVE_FRAME_DESC;#if (_BYTE_ORDER == _LITTLE_ENDIAN)struct BDMARXCON_PACKED { UINT32 burstSize:5; UINT32 stop_skipFrame:1; UINT32 memAddrsInc_Dec:1; UINT32 recvFrameIntrEnb:1; UINT32 nullListIntrEnb:1; UINT32 notOwnerIntrEnb:1; UINT32 maxSizeOverIntrEnb:1; UINT32 big_LittleEndian:1; UINT32 wordAlign:2; UINT32 enable:1; UINT32 reset:1; UINT32 buffEmptyIntr:1; UINT32 erlyNotifyIntr:1; UINT32 reserved_0:14; }__attribute__((__packed__));#else /*(_BYTE_ORDER == _LITTLE_ENDIAN)*/struct BDMARXCON_PACKED { UINT32 reserved_0:14; UINT32 erlyNotifyIntr:1; UINT32 buffEmptyIntr:1; UINT32 reset:1; UINT32 enable:1; UINT32 wordAlign:2; UINT32 big_LittleEndian:1; UINT32 maxSizeOverIntrEnb:1; UINT32 notOwnerIntrEnb:1; UINT32 nullListIntrEnb:1; UINT32 recvFrameIntrEnb:1; UINT32 memAddrsInc_Dec:1; UINT32 stop_skipFrame:1; UINT32 burstSize:5; }__attribute__((__packed__));#endif /*(_BYTE_ORDER == _LITTLE_ENDIAN)*/union UNION_BDMARXCON { struct BDMARXCON_PACKED rxCon_reg; UINT32 rxCon_resetval; }__attribute__((__packed__));typedef union UNION_BDMARXCON BDMARXCON;#if (_BYTE_ORDER == _LITTLE_ENDIAN)struct BDMATXCON_PACKED { UINT32 burstSize:5; UINT32 stop_skipFrame:1; UINT32 reserved_0:1; UINT32 sendCntrlPacketIntrEnb:1; UINT32 nullListIntrEnb:1; UINT32 notOwnerIntrEnb:1; UINT32 buffEmptyIntrEnb:1; UINT32 macTxStartLevel:3; UINT32 enable:1; UINT32 reset:1; UINT32 reserved_1:16; }__attribute__((__packed__));#else /*(_BYTE_ORDER == _LITTLE_ENDIAN)*/struct BDMATXCON_PACKED { UINT32 reserved_1:16; UINT32 reset:1; UINT32 enable:1; UINT32 macTxStartLevel:3; UINT32 buffEmptyIntrEnb:1; UINT32 notOwnerIntrEnb:1; UINT32 nullListIntrEnb:1; UINT32 sendCntrlPacketIntrEnb:1; UINT32 reserved_0:1; UINT32 stop_skipFrame:1; UINT32 burstSize:5; }__attribute__((__packed__));#endif /*(_BYTE_ORDER == _LITTLE_ENDIAN)*/union UNION_BDMATXCON { struct BDMATXCON_PACKED txCon_reg; UINT32 txCon_resetval; }__attribute__((__packed__));typedef union UNION_BDMATXCON BDMATXCON;#if (_BYTE_ORDER == _LITTLE_ENDIAN)struct BDMARXPTR_PACKED { UINT32 bdmaRxPointer:27; /* extra bit holds non-cache region */ UINT32 reserved:5; }__attribute__((__packed__));#else /*(_BYTE_ORDER == _LITTLE_ENDIAN)*/struct BDMARXPTR_PACKED { UINT32 reserved:5; UINT32 bdmaRxPointer:27; /* extra bit holds non-cache region */ }__attribute__((__packed__));#endif /*(_BYTE_ORDER == _LITTLE_ENDIAN)*/union UNION_BDMARXPTR { struct BDMARXPTR_PACKED rxPtr_reg; UINT32 rxPtr_resetval; }__attribute__((__packed__));typedef union UNION_BDMARXPTR BDMARXPTR;#if (_BYTE_ORDER == _LITTLE_ENDIAN)struct BDMATXPTR_PACKED { UINT32 bdmaTxPointer:27; /* extra bit holds non-cache region */ UINT32 reserved:5; }__attribute__((__packed__));#else /*(_BYTE_ORDER == _LITTLE_ENDIAN)*/struct BDMATXPTR_PACKED { UINT32 reserved:5; UINT32 bdmaTxPointer:27; /* extra bit holds non-cache region */ }__attribute__((__packed__));#endif /*(_BYTE_ORDER == _LITTLE_ENDIAN)*/union UNION_BDMATXPTR { struct BDMATXPTR_PACKED txPtr_reg; UINT32 txPtr_resetval; }__attribute__((__packed__));typedef union UNION_BDMATXPTR BDMATXPTR;#if (_BYTE_ORDER == _LITTLE_ENDIAN)struct BDMARXLSZ_PACKED { UINT32 bdmaRxMaxSize:16; UINT32 bdmaRxFrameLength:16; }__attribute__((__packed__));#else /*(_BYTE_ORDER == _LITTLE_ENDIAN)*/struct BDMARXLSZ_PACKED { UINT32 bdmaRxFrameLength:16; UINT32 bdmaRxMaxSize:16; }__attribute__((__packed__));#endif /*(_BYTE_ORDER == _LITTLE_ENDIAN)*/union UNION_BDMARXLSZ { struct BDMARXLSZ_PACKED rxLsz_reg; UINT32 rxLsz_resetval; }__attribute__((__packed__));typedef union UNION_BDMARXLSZ BDMARXLSZ;#if (_BYTE_ORDER == _LITTLE_ENDIAN)struct BDMASTAT_PACKED { UINT32 bdmaRxDoneEveryRxFrame:1; UINT32 bdmaRxNullList:1; UINT32 bdmaRxNotOwner:1; UINT32 bdmaRxMaxSizeOver:1; UINT32 bdmaRxBuffEmpty:1; UINT32 bdmaRxEarlyNotify:1; UINT32 bdmaRxReserved:1; UINT32 bdmaRxOneMoreFrame:1; UINT32 bdmaRxNumofFrames_Buff:8; UINT32 bdmaTxCompleteToSendCntrlPacket:1; UINT32 bdmaTxNullList:1; UINT32 bdmaTxNotOwner:1; UINT32 bdmaTxReserved_0:1; UINT32 bdmaTxBuffEmpty:1; UINT32 bdmaTxReserved_1:11; }__attribute__((__packed__));#else /*(_BYTE_ORDER == _LITTLE_ENDIAN)*/struct BDMASTAT_PACKED { UINT32 bdmaTxReserved_1:11; UINT32 bdmaTxBuffEmpty:1; UINT32 bdmaTxReserved_0:1; UINT32 bdmaTxNotOwner:1; UINT32 bdmaTxNullList:1; UINT32 bdmaTxCompleteToSendCntrlPacket:1; UINT32 bdmaRxNumofFrames_Buff:8; UINT32 bdmaRxOneMoreFrame:1; UINT32 bdmaRxReserved:1; UINT32 bdmaRxEarlyNotify:1; UINT32 bdmaRxBuffEmpty:1; UINT32 bdmaRxMaxSizeOver:1; UINT32 bdmaRxNotOwner:1; UINT32 bdmaRxNullList:1; UINT32 bdmaRxDoneEveryRxFrame:1; }__attribute__((__packed__));#endif /*(_BYTE_ORDER == _LITTLE_ENDIAN)*/union UNION_BDMASTAT { struct BDMASTAT_PACKED stat_reg; UINT32 stat_resetval; }__attribute__((__packed__));typedef union UNION_BDMASTAT BDMASTAT;#if (_BYTE_ORDER == _LITTLE_ENDIAN)struct MACCON_PACKED { UINT32 haltRequest:1; UINT32 haltImm:1; UINT32 swReset:1; UINT32 fullDup:1; UINT32 macLoop:1; UINT32 reserved_0:1; UINT32 mii_off:1; UINT32 loop10:1; UINT32 reserved_1:2; UINT32 missRoll:1; UINT32 reserved_2:1; UINT32 mdc_off:1; UINT32 enMissRoll:1; UINT32 reserved_3:1; UINT32 linkStatus:1; UINT32 reserved_4:16; }__attribute__((__packed__));#else /*(_BYTE_ORDER == _LITTLE_ENDIAN)*/struct MACCON_PACKED { UINT32 reserved_4:16; UINT32 linkStatus:1; UINT32 reserved_3:1; UINT32 enMissRoll:1; UINT32 mdc_off:1; UINT32 reserved_2:1; UINT32 missRoll:1; UINT32 reserved_1:2; UINT32 loop10:1; UINT32 mii_off:1; UINT32 reserved_0:1; UINT32 macLoop:1; UINT32 fullDup:1; UINT32 swReset:1; UINT32 haltImm:1; UINT32 haltRequest:1; }__attribute__((__packed__));#endif /*(_BYTE_ORDER == _LITTLE_ENDIAN)*/
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -