Smac_Registersaphandlers - NXP Semiconductors MKW01 Reference Manual

Simple media access controller (smac)
Table of Contents

Advertisement

Returns
None.
Usage
Declare two buffers each with 16 byte size. Fill one of them with key information and the other with initial
vector information. Call this function with pointers to the buffers as parameters.
3.23

Smac_RegisterSapHandlers

This function has no interaction with the PHY layer. It's purpose is to create a communication bridge
between SMAC and application, so that SMAC can respond to asynchronous requests.
Arguments
SMAC_APP_MCPS_SapHandler_t pSMAC_APP_MCPS_SapHandle: Pointer to the function handler
SMAC_APP_MLME_SapHandler_t pSMAC_APP_MLME_SapHandler: Pointer to the function handler
instanceId_t smacInstanceId: The instance of SMAC for which the SAPs are registered. Always use 0 as
Returns
None
Usage
Implement two functions that meet the constraints of the function pointers. Then call
Smac_RegisterSapHandlers
smacErrors_t smacToAppMlmeSap(smacToAppMlmeMessage_t* pMsg, instanceId_t instance)
{
switch(pMsg->msgType)
{
case gMlmeEdCnf_c:
...
break;
case gMlmeCcaCnf_c:
...
break;
case gMlmeTimeoutInd_c:
...
break;
MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0
Freescale Semiconductor
value for this parameter since this version of SMAC does not support
multiple instances.
with the names of the functions.
for data layer response to
asynchronous requests.
for management layer response
to asynchronous requests (ED/
CCA requests).
Primitives
3-35

Advertisement

Table of Contents
loading

Table of Contents