Channels_T - NXP Semiconductors MKW01 Reference Manual

Simple media access controller (smac)
Table of Contents

Advertisement

}txPacket_t;
Members
u8DataLength
The number of bytes to transmit.
smacHeader
SMAC structure that defines the header used. Freescale recommends that the user
does not modify this structure directly, but through the associated functions.
smacPdu
The MKW01 SMAC protocol data unit.
Usage
This data type is used by an application in the following manner:
1. Declare a buffer to store the packet to be transmitted OTA. Freescale recommends the size of this
buffer is at least as long as the biggest packet to be transmitted by the application.
2. Declare a pointer of the type txPacket_t.
3. Initialize the pointer to point to the buffer declared at the first step.
4. Copy the desired data into the payload.
5. Set u8DataLength to the size (in bytes) of the payload.
6. Use the pointer as the argument when calling MCPSDataRequest.
uint8_t TxDataBuffer[gMaxSmacSDULength_c + sizeof(txPacket_t)];
txPacket_t *TxPacket;
...
TxPacket = (txPacket_t*)TxDataBuffer;
SMACFillHeader(&(TxPacket->smacHeader), 0xFFFF);
FLib_MemCpy(TxPacket->smacPdu.smacPdu, dataToBeSentBuffer, payloadSizeBytes);
TxPacket->u8DataLength = payloadSizeBytes;
DataRequestResult = MCPSDataRequest(TxPacket);
You can use a variable of the type smacErrors_t to store the result of executing MCPSDataRequest
function.
2.2.7

channels_t

Definition for RF channels. The number of channel varies in each defined operating band for sub-1 GHz
stacks and is fixed for the 2.4 GHz. First logical channel in all bands is 0 for sub-1GHz and 11 for 2.4 GHz.
It is defined as follows:
typedef enum channels_tag
{
#include "SMAC_Channels.h"
} channels_t;
Each application derives the minimun and maximum channel values from the enumeration above. SMAC
only keeps an enumeration of all the possible channel numbers.
Members
None
MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0
Freescale Semiconductor
Software Architecture
2-13

Advertisement

Table of Contents
loading

Table of Contents