1.3.5.1.1 MAC_RF_Init Function
C
void MAC_RF_Init
(
MAC_RF_INIT *init
);Summary
Initializes the MAC RF module.
Description
This routine initializes the MAC RF. Callback handlers for event notification are set in this function. A Pointer to MAC RF Tables is also set here so MAC library can use them.
Precondition
None.
Parameters
| Param | Description |
|---|---|
| init | Pointer to the init data structure containing any data necessary to initialize the module. |
Returns
None.
Example
// The following code snippet shows an example MAC Wrapper initialization.
MAC_RF_INIT macRfInit = {
.macRfHandlers.macRfDataConfirm = appDataConfirm,
.macRfHandlers.macRfDataIndication = appDataIndication,
.macRfHandlers.macRfResetConfirm = appResetConfirm,
.macRfHandlers.macRfBeaconNotifyIndication = appBeaconIndication,
.macRfHandlers.macRfScanConfirm = appScanConfirm,
.macRfHandlers.macRfStartConfirm = NULL, // Start primitive not used
.macRfHandlers.macRfCommStatusIndication = appCommStatus,
.macRfHandlers.macRfMacSnifferIndication = NULL, // MAC Sniffer not used
.macRfTables = &tables, // Variable containing the MAC RF Tables
};
MAC_RF_Init(&macRfInit);Remarks
This routine must be called before any other MAC RF routine is called.
