
MC1322x SMAC Primitives
MC1322x SMAC Reference Manual, Rev. 1.7
Freescale Semiconductor
3-21
CTR_Key.key3 = [32BitsValue];
CipherConfigure([MODE], &CTR_Key, &Ctr_Value);
...
CipherMsg([Pointer to 32bit data buffer], [length of the buffer]);
...
DecipherMsg([Pointer to 32bit cipherdata buffer], [length of the buffer]);
...
CipherMsgU8([Pointer to 8bit data buffer], [length of the buffer]);
...
DecipherMsgU8([Pointer to 8bit cipherdata buffer], [length of the buffer]);
...
3.4
OTAP - Module API
This section details the functions required to use the OTAP module from the application. Only one function
is currently provided. For more details about how an application uses the OTAP module, see the
MC1322x
SMAC Demonstration Applications User’s Guide
(22xSMACDAUG).
3.4.1
OTAP_data_indication_execute
OTAP_data_indication_execute must be called at the application data execution. This function identifies
an incoming messages that pretend to put the application in OTAP mode.
Prototype
void OTAP_execute(void)
Arguments
None
Returns
None
Usage
OTAP_data_indication_execute must be called to process received telegrams. The following example
code is taken from the repeater demo.
...
/************************************************************************************
* data_indication_execute function
*
* This function process an incoming message.
*
************************************************************************************/
void data_indication_execute(void)
{
if( ( (MSG_RX_TIMEOUT_FAIL == RX_msg.u8Status.msg_state) ||