DRV_GMAC_EventMaskSet Function
C
bool DRV_GMAC_EventMaskSet(DRV_HANDLE hMac, TCPIP_MAC_EVENT macEvents, bool enable);
Returns
always true, operation succeeded.
Description
This is a function that enables or disables the events to be reported to the Ethernet MAC client (TCP/IP stack). All events that are to be enabled will be added to the notification process. All events that are to be disabled will be removed from the notification process. The stack has to catch the events that are notified and process them. After that the stack should call DRV_GMAC_EventAcknowledge() so that the events can be re-enable The stack should process at least the following transfer events:
TCPIP_MAC_EV_RX_PKTPEND
TCPIP_MAC_EV_RX_DONE
TCPIP_MAC_EV_TX_DONE
Remarks
The event notification system enables the user of the TCP/IP stack to call into the stack for processing only when there are relevant events rather than being forced to periodically call from within a loop.
If the notification events are nil, the interrupt processing will be disabled. Otherwise, the event notification will be enabled and the interrupts relating to the requested events will be enabled.
Note that once an event has been caught by the stack ISR (and reported if a notification handler is in place) it will be disabled until the DRV_GMAC_EventAcknowledge() is called.
Preconditions
DRV_GMAC_Initialize() should have been called. DRV_GMAC_Open() should have been called to obtain a valid handle.
Example
DRV_GMAC_EventMaskSet( hMac, TCPIP_MAC_EV_RX_OVFLOW | TCPIP_MAC_EV_RX_BUFNA, true );