
Software Architecture
Simple Media Access Controller (SMAC) for the HCS08 Reference Manual, Rev. 2.0
Freescale Semiconductor
2-3
uint32_t
Unsigned 32 bit definition
int8_t
Signed 8 bit definition
int162_t
Signed 16 bit definition
int32_t
Signed 32 bit definition
These data types are used in the SMAC project as well as in the Applications projects and they are defined
in the EmbeddedTypes.h file.
2.3.1
rxPacket_t
This structure defines the variable to be used for SMAC receiving data buffer:
typedef struct rxPacket_tag
{
uint8_t u8MaxDataLength;
rxStatus_t rxStatus;
uint8_t u8DataLength;
smacPdu_t smacPdu;
}rxPacket_t;
Members
u8MaxDataLength
Max number of bytes to be received.
rxStatus
Indicates the reception state, see rxStatus_t data type for more detail.
u8DataLength
Number of received bytes.
smacPdu
Data reception buffer, see
smacPdu_t
data type for more detail.
Usage
This data type is used by an application in the following manner:
1. Declare a pointer to
rxPacket_t
variable
2. Assign that variable the pointer to an array selected for receiving.
3. Use that variable as the argument when calling
MLMERXEnableRequest
rxPacket_t *RxPacket;
uint8_t RxDataBuffer[130];
...
RxPacket = (rxPacket_t*)RxDataBuffer;
RxEnableResult = MLMERXEnableRequest(RxPacket, 0);
...
2.3.2
rxStatus_t
This enumeration list all the possible reception states:
typedef enum rxStatus_tag{
rxInitStatus,
rxProcessingReceptionStatus_c,
rxSuccessStatus_c,