Smacsetpanid - NXP Semiconductors MKW01 Reference Manual

Simple media access controller (smac)
Table of Contents

Advertisement

Usage
Call the function with the desired address. The application can store the return value in a smacErrors_t
variable and handle the error in case it occurs. For example, if the return value is gErrorBusy_c, the
application can wait on this value until PHY becomes idle.
smacErrors_t ReturnValue;
ReturnValue = MLMESetShortSrcAddress(0x1234);
//Handle return value
...
Implementation
This function creates a message for PHY requesting to set the source address pib to the value passed as
parameter. If the request is processed, the value is also stored in the SMAC layer for fast processing in case
a call to SMACFillHeader is performed.
3.20

SMACSetPanID

This function creates a message of set PIB request type, requesting PHY to change the short PAN address
of the node. If the message is passed succesfully to PHY, SMAC will set it's own PAN address variable to
the new value, so that when SMACFillHeader is called, the updated data is filled into the header.
Arguments
uint16_t nwShortPanID: The new value of the 16 bit PAN address.
Returns
gErrorNoResourcesAvailable_c The PHY layer can not handle this request.
gErrorBusy_c
gErrorNoError_c
Usage
Call the function with the desired address. The application can store the return value in a smacErrors_t
variable and handle the error in case it occurs. For example, if the return value is gErrorBusy_c, the
application can wait on this value until PHY becomes idle.
smacErrors_t ReturnValue;
ReturnValue = MLMESetShortPanID(0x0001);
//Handle return value
...
Implementation
This function creates a message for PHY requesting to set the PAN address pib to the value passed as
parameter. If the request is processed, the value is also stored in the SMAC layer for fast processing in case
a call to SMACFillHeader is performed.
MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0
Freescale Semiconductor
PHY is busy and can not process the request.
Everything is normal and the request was processed.
Primitives
3-33

Advertisement

Table of Contents
loading

Table of Contents