RTEMS  5.1
Data Structures | Macros | Typedefs | Enumerations | Functions
gmacd.h File Reference
#include "chip.h"

Go to the source code of this file.

Data Structures

struct  _GmacSG
 
struct  _GmacSGList
 
struct  _GmacQueueDriver
 
struct  _GmacDriver
 
struct  _GmacInit
 

Macros

#define GMACD_OK   0
 
#define GMACD_TX_BUSY   1
 
#define GMACD_RX_NULL   1
 
#define GMACD_SIZE_TOO_SMALL   2
 
#define GMACD_PARAM   3
 
#define GMACD_NOT_INITIALIZED   4
 
#define EFRS_BUFFER_LEN   (1u)
 

Typedefs

typedef enum ptpMsgType_t ptpMsgType
 
typedef void(* fGmacdTransferCallback) (uint32_t status)
 
typedef void(* fGmacdWakeupCallback) (void)
 
typedef void(* fGmacdTxPtpEvtCallBack) (ptpMsgType msg, uint32_t sec, uint32_t nanosec, uint16_t seqId)
 
typedef struct _GmacSG sGmacSG
 
typedef struct _GmacSGList sGmacSGList
 
typedef struct _GmacQueueDriver sGmacQd
 
typedef struct _GmacDriver sGmacd
 
typedef struct _GmacInit sGmacInit
 

Enumerations

enum  ptpMsgType_t {
  SYNC_MSG_TYPE = 0, DELAY_REQ_MSG_TYPE = 1, PDELAY_REQ_TYPE = 2, PDELAY_RESP_TYPE = 3,
  FOLLOW_UP_MSG_TYPE = 8, DELAY_RESP_MSG_TYPE = 9
}
 

Functions

void GMACD_Handler (sGmacd *pGmacd, gmacQueList_t queIdx)
 GMAC Interrupt handler. More...
 
void GMACD_Init (sGmacd *pGmacd, Gmac *pHw, uint8_t bID, uint8_t enableCAF, uint8_t enableNBC)
 Initialize the GMAC with the Gmac controller address. More...
 
uint8_t GMACD_InitTransfer (sGmacd *pGmacd, const sGmacInit *pInit, gmacQueList_t queIdx)
 
void GMACD_Reset (sGmacd *pGmacd)
 
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. If frame transfer status is monitored, specify callback for each frame. More...
 
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. If packet transfer status is monitored, specify callback for each packet. More...
 
uint32_t GMACD_TxLoad (sGmacd *pGmacd, gmacQueList_t queIdx)
 
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 frame length is returned. More...
 
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() returns GMAC_RX_NO_DATA the application task call GMAC_Set_RxCb() to register pRxCb() callback and enters suspend state. The callback is in charge to resume the task once a new frame has been received. The next time GMAC_Poll() is called, it will be successful. More...
 
uint8_t GMACD_SetTxWakeupCallback (sGmacd *pGmacd, fGmacdWakeupCallback fWakeup, uint8_t bThreshold, gmacQueList_t queIdx)
 
void GMACD_TxPtpEvtMsgCBRegister (sGmacd *pGmacd, fGmacdTxPtpEvtCallBack pTxPtpEvtCb, gmacQueList_t queIdx)