MAC_DRVR_EventMaskSet Function

C

bool MAC_DRVR_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 MAC_DRVR_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 MAC_DRVR_EventAcknowledge() is called.

Preconditions

  • MAC_DRVR_Initialize() should have been called.

  • MAC_DRVR_Open() should have been called to obtain a valid handle.

Parameters

ParametersDescription
hMacEthernet MAC client handle
macEvMaskevents the user of the stack wants to add/delete for notification
enableif true, the events will be enabled, else disabled