Jump to main content

##

# 1.2.5.2.12 TCPIP_MAC_EventPendingGet Function

## C

    TCPIP_MAC_EVENT TCPIP_MAC_EventPendingGet(
        DRV_HANDLE hMac
    );

## Description

This function returns the currently MAC pending events. Multiple events will be "ORed" together as they accumulate. MAC processing is needed whenever a transmission related event is present (TCPIP_MAC_EV_RX_PKTPEND, TCPIP_MAC_EV_TX_DONE). Other, non critical events, may be passed to an user for informational purposes. All events have to be eventually acknowledged if re-enabling is needed.

## Precondtions

TCPIP_MAC_Initialize() should have been called. TCPIP_MAC_Open() should have been called to obtain a valid handle.

## Parameters

Parameters | Description
--- | ---
hMac | Handle identifying the MAC driver client.

## Returns

- The current stack pending events.

## Remarks

This is the preferred method to get the current pending MAC events. Even with a notification handler in place it's better to use this function to get the current pending events rather than using the events passed by the notification handler which could be stale.

The returned value is just a momentary value. The pending events can change any time.

## Example

    TCPIP_MAC_EVENT currEvents = TCPIP_MAC_EventPendingGet( hMac);