Primitives
MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0
Freescale Semiconductor
3-33
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
PHY is busy and can not process the request.
gErrorNoError_c
Everything is normal and the request was processed.
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.