
MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0
Freescale Semiconductor
3-21
Chapter 3
Primitives
The following sections provide a detailed description of MKW01 SMAC primitives associated with the
MKW01 SMAC application API.
3.1
MCPSDataRequest
This data primitive is used to send an over-the-air (OTA) packet. This is an asynchronous function, which
means it asks the MKW01 SMAC to transmit an OTA packet, but transmission could continue after the
function returns.
Prototype
smacErrors_t MCPSDataRequest(txPacket_t *psTxPacket);
Arguments
txPacket_t *psTxPacket
Pointer to the packet to be transmitted.
Returns
gErrorNoError_c
Everything is ok and the transmission will be performed.
gErrorOutOfRange_c
One of the members in the pTxMessage structure is out of range (not
valid buffer size or data buffer pointer is NULL).
gErrorBusy_c
The radio is performing another action and could not attend this
request.
gErrorNoValidCondition_c
The MKW01 SMAC has not been initialized.
gErrorNoResourcesAvailable_c
The PHY cannot process an MKW01 SMAC request, so MKW01
SMAC cannot process it, or the memory manager is unable to
allocate another buffer.
Usage
•
SMAC must be initialized before calling this function.
•
Declare a variable of the type smacErrors_t to save the result of the function execution.
•
Prepare the txPacket_t parameter as explained in
Section 2.2.6, “txPacket_t
” declaration and
usage.
•
Call the MCPSDataRequest function.