English
Language : 

ZAURA Datasheet, PDF (49/99 Pages) –
ZAURA RF Wireless Library
Programmer’s Reference Manual
37
ZAURA_RF_Receive
Description When the ZAURA RF Module receives a frame, the ZAURA RF
Wireless Library attempts to allocate a packet buffer structure to hold
the packet. The allocated packet buffer is then added to a queue of
received packets waiting for application processing. To retrieve the
next packet from the queue, an application must call the
ZAURA_RF_Receive API. If the receive packet queue is empty, this
function returns NULLPTR; otherwise it returns a pointer to a packet
buffer structure containing the data to be processed. After the applica-
tion has finished processing the received packet, it must call
ZAURA_RF_FreeBuf to pass the packet buffer pointer obtained from
this API as an argument.
Syntax
ZAURA_RF_PKT_BUF * ZAURA_RF_Receive( void )
Parameters This function does not contain any parameters.
Returns
A pointer to a ZAURA_RF_PKT_BUF structure. If there are no
receive packets available, a NULL pointer will be returned.
See Also ZAURA_RF_FreeBuf, ZAURA_RF_PKT_BUF Structure
Example
ZAURA_RF_PKT_BUF * pPkt;
pPkt= ZAURA_RF_Receive();
if( pPkt )
{
/*
* Process the packet here
*/
ZAURA_RF_FreeBuf();
}
RM006003-1011
ZAURA_RF_Receive