1.6.3.17 DRV_G3ADP_MAC_EventMaskSet Function

C

bool DRV_G3ADP_MAC_EventMaskSet(DRV_HANDLE hMac, TCPIP_MAC_EVENT macEvMask, bool enable);

Summary

Enables/disables the G3 ADP MAC events.

Description

This is a function that enables or disables the events to be reported to the 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 upper layer has to catch the events that are notified and process them. After that the upeer layer should call DRV_G3ADP_MAC_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

Precondition

DRV_G3ADP_MAC_Initialize must have been called to set up the driver. DRV_G3ADP_MAC_Open() should have been called to obtain a valid handle.

Parameters

ParamDescription
hMacHandle identifying the MAC driver client
macEvMaskEvents the user of the stack wants to add/delete for notification
enableIf true, the events will be enabled, else disabled

Returns

Always true, operation succeeded.

Example

    DRV_G3ADP_MAC_EventMaskSet( hMac, TCPIP_MAC_EV_RX_DONE, true );

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.