
Simple Media Access Controller (SMAC) for the HCS08 Reference Manual, Rev. 2.0
Freescale Semiconductor
3-1
Chapter 3
Primitives
The following sections provide a detailed description of SMAC primitives associated with the SMAC API.
The SMAC for S08 codebase supports the MC13202, MC13213, and MC1323x families.
NOTE
Some primitives may have different usage or affect as applied to the
different device families. These are noted in the individual primitive
descriptions.
3.1
Application API
This section highlights MCU resource requirements and details the application API primitives.
3.1.1
MCPSDataRequest
This data primitive sends an over-the-air packet. This is an asynchronous function, which means that the
function does not run in the same thread as the caller (the application). It asks SMAC to transmit a packet
and returns control to the application, when transmission is completed the result of the operation is
reported by the MCPSDataConfirm callback which is called in an interrupt context.
Prototype
smacErrors_t MCPSDataRequest(txPacket_t *);
Arguments
txPacket_t *
Pointer to the packet to be transmitted
Returns
gErrorNoError_c
No errors and the transmission is confirmed
gErrorOutOfRange_c
One of the members in the txPacket_t structure is out of range (not a
valid buffer size or data buffer pointer is NULL)
gErrorNoResourcesAvailable_cThe radio is performing another action and could not attend this request.
gErrorNoValidCondition_c
SMAC has not been initialized
Usage
•
Declare an array where transmission data is stored