80#define GMACD_TX_BUSY 1
81#define GMACD_RX_NULL 1
83#define GMACD_SIZE_TOO_SMALL 2
87#define GMACD_NOT_INITIALIZED 4
95#define EFRS_BUFFER_LEN (1u)
103typedef enum ptpMsgType_t {
105 DELAY_REQ_MSG_TYPE = 1,
107 PDELAY_RESP_TYPE = 3,
108 FOLLOW_UP_MSG_TYPE = 8,
109 DELAY_RESP_MSG_TYPE = 9
120 uint32_t nanosec, uint16_t seqId);
178 uint16_t wRxBufferSize;
200 uint32_t reserved: 31;
202 uint8_t bDmaBurstLength;
246 const sGmacInit *pInit, gmacQueList_t queIdx);
253 gmacQueList_t queIdx);
259 gmacQueList_t queIdx);
267 gmacQueList_t queIdx);
270 fRxCb, gmacQueList_t queIdx);
275 gmacQueList_t queIdx);
277extern void GMACD_TxPtpEvtMsgCBRegister (
sGmacd *pGmacd,
279 gmacQueList_t queIdx);
uint8_t GMACD_SetTxWakeupCallback(sGmacd *pGmacd, fGmacdWakeupCallback fWakeup, uint8_t bThreshold, gmacQueList_t queIdx)
Definition: gmacd.c:1038
uint32_t GMACD_TxLoad(sGmacd *pGmacd, gmacQueList_t queIdx)
Definition: gmacd.c:868
uint8_t GMACD_Send(sGmacd *pGmacd, void *pBuffer, uint32_t size, fGmacdTransferCallback fTxCb, gmacQueList_t queIdx)
Send a packet with GMAC. If the packet size is larger than transfer buffer size error returned....
Definition: gmacd.c:815
void GMACD_SetRxCallback(sGmacd *pGmacd, fGmacdTransferCallback fRxCb, gmacQueList_t queIdx)
Registers pRxCb callback. Callback will be invoked after the next received frame. When GMAC_Poll() re...
Definition: gmacd.c:1006
uint8_t GMACD_InitTransfer(sGmacd *pGmacd, const sGmacInit *pInit, gmacQueList_t queIdx)
Definition: gmacd.c:551
uint8_t GMACD_SendSG(sGmacd *pGmacd, const sGmacSGList *sgl, fGmacdTransferCallback fTxCb, gmacQueList_t queIdx)
Send a frame split into buffers. If the frame size is larger than transfer buffer size error returned...
Definition: gmacd.c:705
void GMACD_Handler(sGmacd *pGmacd, gmacQueList_t queIdx)
GMAC Interrupt handler.
Definition: gmacd.c:336
void GMACD_Init(sGmacd *pGmacd, Gmac *pHw, uint8_t bID, uint8_t enableCAF, uint8_t enableNBC)
Initialize the GMAC with the Gmac controller address.
Definition: gmacd.c:486
uint8_t GMACD_Poll(sGmacd *pGmacd, uint8_t *pFrame, uint32_t frameSize, uint32_t *pRcvSize, gmacQueList_t queIdx)
Receive a packet with GMAC. If not enough buffer for the packet, the remaining data is lost but right...
Definition: gmacd.c:885
void GMACD_Reset(sGmacd *pGmacd)
Definition: gmacd.c:679
void(* fGmacdWakeupCallback)(void)
Definition: gmacd.h:117
struct _GmacSGList sGmacSGList
struct _GmacDriver sGmacd
void(* fGmacdTransferCallback)(uint32_t status)
Definition: gmacd.h:115
struct _GmacQueueDriver sGmacQd
void(* fGmacdTxPtpEvtCallBack)(ptpMsgType msg, uint32_t sec, uint32_t nanosec, uint16_t seqId)
Definition: gmacd.h:119
struct _GmacInit sGmacInit
Definition: component_gmac.h:55
sGmacQd queueList[NUM_GMAC_QUEUES]
Definition: gmacd.h:192
uint8_t bId
Definition: gmacd.h:190
Gmac * pHw
Definition: gmacd.h:188
uint16_t wTxBufferSize
Definition: gmacd.h:222
sGmacRxDescriptor * pRxD
Definition: gmacd.h:208
uint16_t wRxBufferSize
Definition: gmacd.h:211
uint16_t wTxSize
Definition: gmacd.h:224
sGmacTxDescriptor * pTxD
Definition: gmacd.h:220
uint8_t * pRxBuffer
Definition: gmacd.h:205
uint16_t wRxSize
Definition: gmacd.h:212
uint8_t * pTxBuffer
Definition: gmacd.h:217
sGmacTxDescriptor * pTxD
Definition: gmacd.h:149
fGmacdTransferCallback fRxCb
Definition: gmacd.h:152
uint16_t wTxTail
Definition: gmacd.h:171
fGmacdTxPtpEvtCallBack fTxPtpEvtCb
Definition: gmacd.h:159
uint8_t * pRxBuffer
Definition: gmacd.h:144
uint16_t wTxListSize
Definition: gmacd.h:167
uint16_t wTxBufferSize
Definition: gmacd.h:177
uint16_t wRxI
Definition: gmacd.h:164
sGmacRxDescriptor * pRxD
Definition: gmacd.h:147
fGmacdTransferCallback * fTxCbList
Definition: gmacd.h:156
uint16_t wRxListSize
Definition: gmacd.h:162
uint16_t wTxHead
Definition: gmacd.h:169
fGmacdWakeupCallback fWakupCb
Definition: gmacd.h:154
uint8_t bWakeupThreshold
Definition: gmacd.h:174
Definition: b1553brm.c:94