![]() |
![]() |
TI-OpenThread
1.05.00.20
|
#include <openthread/config.h>
#include "radio.h"
#include <stddef.h>
#include <openthread/diag.h>
#include <openthread/platform/alarm-milli.h>
#include <openthread/platform/diag.h>
#include <openthread/platform/radio.h>
#include <openthread/platform/entropy.h>
#include <utils/code_utils.h>
#include <ti/devices/DeviceFamily.h>
#include <DeviceFamily_constructPath(driverlib/aon_rtc.h)>
#include <DeviceFamily_constructPath(driverlib/rf_data_entry.h)>
#include <DeviceFamily_constructPath(driverlib/rf_common_cmd.h)>
#include <DeviceFamily_constructPath(driverlib/rf_mailbox.h)>
#include <DeviceFamily_constructPath(driverlib/rf_ieee_cmd.h)>
#include <DeviceFamily_constructPath(driverlib/rf_ieee_mailbox.h)>
#include <DeviceFamily_constructPath(inc/hw_ccfg.h)>
#include <DeviceFamily_constructPath(inc/hw_fcfg1.h)>
#include <ti/drivers/rf/RF.h>
#include <ti_radio_config.h>
#include "system.h"
#include "ti_drivers_config.h"
Macros | |
#define | PLATFORM_RADIO_TX_TEST_MODULATED_WORD 0xAAAA |
#define | PLATFORM_RADIO_TX_TEST_SYNC_WORD 0x71764129 |
#define | PLATFORM_RADIO_TX_TEST_UNMODULATED_WORD 0xFFFF |
#define | RF_NUM_RAT_TICKS_IN_1_US 4 |
Functions | |
static otRadioFrame * | ackSearchRxQueue (struct rx_queue_info *rqi, unsigned int events, uint8_t ackDsn) |
static void | clearRxQueue (void) |
static otRadioFrame * | handleRxAckFinish (struct rx_queue_info *p, uint8_t ackDsn) |
static void | handleRxDataFinish (struct rx_queue_info *p) |
static unsigned int | handleTxAck (RF_Handle aRfHandle) |
handle end of tx when an ACK is requested More... | |
static void | handleTxState (otInstance *aInstance, unsigned int events) |
static void | nextQueueEntry (struct rx_queue_info *p) |
otError | otPlatDiagRadioToneStart (otInstance *aInstance, bool aModulated) |
otError | otPlatDiagRadioToneStop (otInstance *aInstance) |
otError | otPlatRadioAddSrcMatchExtEntry (otInstance *aInstance, const otExtAddress *aExtAddress) |
otError | otPlatRadioAddSrcMatchShortEntry (otInstance *aInstance, const uint16_t aShortAddress) |
void | otPlatRadioClearSrcMatchExtEntries (otInstance *aInstance) |
otError | otPlatRadioClearSrcMatchExtEntry (otInstance *aInstance, const otExtAddress *aExtAddress) |
void | otPlatRadioClearSrcMatchShortEntries (otInstance *aInstance) |
otError | otPlatRadioClearSrcMatchShortEntry (otInstance *aInstance, const uint16_t aShortAddress) |
otError | otPlatRadioDisable (otInstance *aInstance) |
otError | otPlatRadioEnable (otInstance *aInstance) |
void | otPlatRadioEnableSrcMatch (otInstance *aInstance, bool aEnable) |
otError | otPlatRadioEnergyScan (otInstance *aInstance, uint8_t aScanChannel, uint16_t aScanDuration) |
otRadioCaps | otPlatRadioGetCaps (otInstance *aInstance) |
void | otPlatRadioGetIeeeEui64 (otInstance *aInstance, uint8_t *aIeeeEui64) |
bool | otPlatRadioGetPromiscuous (otInstance *aInstance) |
int8_t | otPlatRadioGetReceiveSensitivity (otInstance *aInstance) |
Get the receive command's sensitivity. More... | |
int8_t | otPlatRadioGetRssi (otInstance *aInstance) |
otRadioFrame * | otPlatRadioGetTransmitBuffer (otInstance *aInstance) |
otError | otPlatRadioGetTransmitPower (otInstance *aInstance, int8_t *aPower) |
bool | otPlatRadioIsEnabled (otInstance *aInstance) |
otError | otPlatRadioReceive (otInstance *aInstance, uint8_t aChannel) |
void | otPlatRadioSetExtendedAddress (otInstance *aInstance, const otExtAddress *aAddress) |
void | otPlatRadioSetPanId (otInstance *aInstance, uint16_t aPanid) |
void | otPlatRadioSetPromiscuous (otInstance *aInstance, bool aEnable) |
void | otPlatRadioSetShortAddress (otInstance *aInstance, uint16_t aAddress) |
otError | otPlatRadioSetTransmitPower (otInstance *aInstance, int8_t aPower) |
otError | otPlatRadioSleep (otInstance *aInstance) |
otError | otPlatRadioTransmit (otInstance *aInstance, otRadioFrame *aFrame) |
void | platformRadioInit (void) |
void | platformRadioProcess (otInstance *aInstance, uintptr_t arg) |
static void | platformRadioProcessReceiveDone (otInstance *aInstance, otRadioFrame *aReceiveFrame, otError aReceiveError) |
static void | platformRadioProcessTransmitDone (otInstance *aInstance, otRadioFrame *aTransmitFrame, otRadioFrame *aAckFrame, otError aTransmitError) |
static otError | populateReceiveFrame (struct rx_queue_info *p) |
static void | processRxQueue (otInstance *aInstance, unsigned int events) |
static void | radioSignal (unsigned int evts) |
Post a Radio Signal. More... | |
static void | releaseAndNext (struct rx_queue_info *p) |
static void | releaseQueueEntry (struct rx_queue_info *p) |
static void | rfCommonCallback (RF_Handle aRfHandle, RF_CmdHandle aRfCmdHandle, RF_EventMask aRfEventMask) |
void | rfCoreDiagChannelDisable (uint8_t aChannel) |
void | rfCoreDiagChannelEnable (uint8_t aChannel) |
static void | rfCoreEdScanCmdCallback (RF_Handle aRfHandle, RF_CmdHandle aRfCmdHandle, RF_EventMask aRfEventMask) |
Callback for the Energy Detect command. More... | |
static void | rfCoreErrorCallback (RF_Handle aHandle, RF_CmdHandle aCmdHandle, RF_EventMask aEvents) |
static RF_Stat | rfCoreExecuteAbortCmd (RF_Handle aRfHandle, RF_CmdHandle aRfCmdHandle) |
sends the direct abort command to the radio core More... | |
static uint8_t | rfCoreFindEmptyExtSrcMatchIdx (void) |
walks the ext address source match list to find an empty slot More... | |
static uint8_t | rfCoreFindEmptyShortSrcMatchIdx (void) |
walks the short address source match list to find an empty slot More... | |
static uint8_t | rfCoreFindExtSrcMatchIdx (const uint64_t *aAddress) |
walks the ext address source match list to find an address More... | |
static uint8_t | rfCoreFindShortSrcMatchIdx (const uint16_t aAddress) |
walks the short address source match list to find an address More... | |
static void | rfCoreInitBufs (void) |
initialize the RX/TX buffers More... | |
static void | rfCoreInitReceiveParams (void) |
initialize the RX command structure More... | |
void | rfCoreInitSetupCmd (void) |
initializes the setup command structure More... | |
static RF_Stat | rfCoreModifyRxAutoPend (RF_Handle aRfHandle, bool aEnable) |
enable/disable autoPend More... | |
static RF_Stat | rfCoreModifyRxFrameFilter (RF_Handle aRfHandle, bool aEnable) |
enable/disable filtering More... | |
static RF_Stat | rfCoreModifySourceMatchEntry (RF_Handle aRfHandle, uint8_t aEntryNo, platformRadio_address aType, bool aEnable) |
sends the immediate modify source matching command to the radio core More... | |
static RF_CmdHandle | rfCoreSendEdScanCmd (RF_Handle aRfHandle, uint8_t aChannel, uint16_t aDuration) |
sends the energy detect scan command to the radio core More... | |
static RF_CmdHandle | rfCoreSendReceiveCmd (RF_Handle aRfHandle) |
sends the rx command to the radio core More... | |
static RF_CmdHandle | rfCoreSendTransmitCmd (otInstance *aInstance, RF_Handle aRfHandle, uint8_t *aPsdu, uint8_t aLen) |
sends the tx command to the radio core More... | |
static RF_CmdHandle | rfCoreSendTxTestCmd (RF_Handle aRfHandle, bool aModulated) |
static otError | rfCoreSetTransmitPower (int8_t aPower) |
Sets the transmit. More... | |
static void | rfCoreTxTestCmdCallback (RF_Handle aRfHandle, RF_CmdHandle aRfCmdHandle, RF_EventMask aRfEventMask) |
Callback for the Transmit Test command. More... | |
static RF_CmdHandle | startTransmit (RF_Handle aRfHandle) |
Start a transmission, or a start a retry. More... | |
Variables | |
static const struct tx_power_max | cTxMaxPower [] |
static volatile rfc_CMD_IEEE_CSMA_t | sCsmaBackoffCmd |
static bool | sDisableChannel = false |
static volatile rfc_CMD_IEEE_ED_SCAN_t | sEdScanCmd |
static uint16_t | seedRandom |
static volatile rfc_CMD_IEEE_MOD_FILT_t | sModifyReceiveFilterCmd |
static volatile rfc_CMD_IEEE_MOD_SRC_MATCH_t | sModifyReceiveSrcMatchCmd |
static volatile rfc_CMD_RADIO_SETUP_PA_t | sRadioSetupCmd |
static volatile rfc_CMD_IEEE_RX_t | sReceiveCmd |
static RF_CmdHandle | sReceiveCmdHandle |
static int8_t | sReqTxPower = 0 |
static RF_Handle | sRfHandle |
static RF_Object | sRfObject |
static volatile rfc_ieeeRxOutput_t | sRfStats |
static uint8_t | sRxBuf0 [RX_BUF_SIZE] |
static uint8_t | sRxBuf1 [RX_BUF_SIZE] |
static uint8_t | sRxBuf2 [RX_BUF_SIZE] |
static uint8_t | sRxBuf3 [RX_BUF_SIZE] |
static dataQueue_t | sRxDataQueue = { 0 } |
static volatile ext_src_match_data_t | sSrcMatchExtData |
static volatile short_src_match_data_t | sSrcMatchShortData |
static volatile platformRadio_phyState | sState |
static volatile rfc_CMD_IEEE_TX_t | sTransmitCmd |
static RF_CmdHandle | sTransmitCmdHandle |
static otError | sTransmitError |
static otRadioFrame | sTransmitFrame |
static uint8_t | sTransmitPsdu [OT_RADIO_FRAME_MAX_SIZE] |
static volatile unsigned int | sTransmitRetryCount = 0 |
static volatile rfc_CMD_IEEE_RX_ACK_t | sTransmitRxAckCmd |
static volatile rfc_CMD_TX_TEST_t | sTxTestCmd |
static RF_CmdHandle | sTxTestCmdHandle |
#define RF_NUM_RAT_TICKS_IN_1_US 4 |
Referenced by populateReceiveFrame().
#define PLATFORM_RADIO_TX_TEST_SYNC_WORD 0x71764129 |
#define PLATFORM_RADIO_TX_TEST_MODULATED_WORD 0xAAAA |
Referenced by rfCoreSendTxTestCmd().
#define PLATFORM_RADIO_TX_TEST_UNMODULATED_WORD 0xFFFF |
Referenced by rfCoreSendTxTestCmd().
|
static |
Start a transmission, or a start a retry.
[in] | aRfHandle | The rf handle |
References rfCommonCallback(), and sCsmaBackoffCmd.
Referenced by handleTxAck(), and rfCoreSendTransmitCmd().
|
static |
Post a Radio Signal.
Some Radio event has occurred, wake the process loops.
[in] | evts | Events to post |
References platformRadioSignal().
Referenced by otPlatRadioSleep(), rfCommonCallback(), and rfCoreEdScanCmdCallback().
|
static |
initialize the RX/TX buffers
Zeros out the receive and transmit buffers and sets up the data structures of the receive queue.
References DATA_ENTRY_LENSZ_BYTE, sRxBuf0, sRxBuf1, sRxBuf2, sRxBuf3, sRxDataQueue, and sTransmitPsdu.
Referenced by platformRadioInit().
void rfCoreInitSetupCmd | ( | void | ) |
initializes the setup command structure
The sRadioSetupCmd struct is used by the RF driver to bring the
References sRadioSetupCmd.
Referenced by platformRadioInit().
|
static |
initialize the RX command structure
Sets the default values for the receive command structure.
References PLATFORM_RADIO_EXTADD_SRC_MATCH_NUM, PLATFORM_RADIO_SHORTADD_SRC_MATCH_NUM, sReceiveCmd, sRfStats, sRxDataQueue, sSrcMatchExtData, and sSrcMatchShortData.
Referenced by platformRadioInit().
int8_t otPlatRadioGetReceiveSensitivity | ( | otInstance * | aInstance | ) |
Get the receive command's sensitivity.
References sReceiveCmd.
|
static |
sends the direct abort command to the radio core
[in] | aRfHandle | The handle for the RF core client |
[in] | aRfCmdHandle | The command handle to be aborted |
RF_StatSuccess | the command completed correctly |
References RF_DRIVER_ABORT.
Referenced by otPlatDiagRadioToneStart(), otPlatDiagRadioToneStop(), otPlatRadioEnergyScan(), otPlatRadioReceive(), otPlatRadioSetExtendedAddress(), otPlatRadioSetPanId(), otPlatRadioSetShortAddress(), otPlatRadioSleep(), and rfCoreSetTransmitPower().
|
static |
enable/disable filtering
Uses the radio core to alter the current running RX command filtering options. This ensures there is no access fault between the CM3 and CM0 for the RX command.
This function leaves the type of frames to be filtered the same as the receive command.
[in] | aRfHandle | The handle for the RF core client |
[in] | aEnable | TRUE: enable frame filtering FALSE: disable frame filtering |
RF_StatCmdDoneSuccess | the command completed correctly |
References sModifyReceiveFilterCmd, and sReceiveCmd.
Referenced by otPlatRadioSetPromiscuous().
|
static |
enable/disable autoPend
Uses the radio core to alter the current running RX command filtering options. This ensures there is no access fault between the CM3 and CM0 for the RX command.
This function leaves the type of frames to be filtered the same as the receive command.
[in] | aRfHandle | The handle for the RF core client |
[in] | aEnable | TRUE: enable autoPend, FALSE: disable autoPend |
RF_StatCmdDoneSuccess | the command completed correctly |
References sModifyReceiveFilterCmd, and sReceiveCmd.
Referenced by otPlatRadioEnableSrcMatch().
|
static |
sends the immediate modify source matching command to the radio core
Uses the radio core to alter the current source matching parameters used by the running RX command. This ensures there is no access fault between the CM3 and CM0, and ensures that the RX command has cohesive view of the data. The CM3 may make alterations to the source matching entries if the entry is marked as disabled.
[in] | aRfHandle | The handle for the RF core client |
[in] | aEntryNo | The index of the entry to alter |
[in] | aType | TRUE: the entry is a short address FALSE: the entry is an extended address |
[in] | aEnable | Whether the given entry is to be enabled or disabled |
RF_StatCmdDoneSuccess | the command completed correctly |
References sModifyReceiveSrcMatchCmd.
Referenced by otPlatRadioAddSrcMatchExtEntry(), otPlatRadioAddSrcMatchShortEntry(), otPlatRadioClearSrcMatchExtEntries(), otPlatRadioClearSrcMatchExtEntry(), otPlatRadioClearSrcMatchShortEntries(), and otPlatRadioClearSrcMatchShortEntry().
|
static |
walks the short address source match list to find an address
[in] | aAddress | the short address to search for |
PLATFORM_RADIO_SRC_MATCH_NONE | the address was not found |
References PLATFORM_RADIO_SHORTADD_SRC_MATCH_NUM, PLATFORM_RADIO_SRC_MATCH_NONE, and sSrcMatchShortData.
Referenced by otPlatRadioAddSrcMatchShortEntry(), and otPlatRadioClearSrcMatchShortEntry().
|
static |
walks the short address source match list to find an empty slot
PLATFORM_RADIO_SRC_MATCH_NONE | no unused slots available |
References PLATFORM_RADIO_SHORTADD_SRC_MATCH_NUM, PLATFORM_RADIO_SRC_MATCH_NONE, and sSrcMatchShortData.
Referenced by otPlatRadioAddSrcMatchShortEntry().
|
static |
walks the ext address source match list to find an address
[in] | aAddress | the ext address to search for |
PLATFORM_RADIO_SRC_MATCH_NONE | the address was not found |
References PLATFORM_RADIO_EXTADD_SRC_MATCH_NUM, PLATFORM_RADIO_SRC_MATCH_NONE, and sSrcMatchExtData.
Referenced by otPlatRadioAddSrcMatchExtEntry(), and otPlatRadioClearSrcMatchExtEntry().
|
static |
walks the ext address source match list to find an empty slot
PLATFORM_RADIO_SRC_MATCH_NONE | no unused slots available |
References PLATFORM_RADIO_EXTADD_SRC_MATCH_NUM, PLATFORM_RADIO_SRC_MATCH_NONE, and sSrcMatchExtData.
Referenced by otPlatRadioAddSrcMatchExtEntry().
|
static |
handle end of tx when an ACK is requested
event | mask to post if done, or 0 if nothing to do |
References IEEE802154_MAC_MAX_FRAMES_RETRIES, RF_EVENT_TX_DONE, startTransmit(), sTransmitCmdHandle, sTransmitRetryCount, and sTransmitRxAckCmd.
Referenced by rfCommonCallback().
|
static |
Shared callback for Tx or Rx command chains, it is called when various events occur during tx and rx
[in] | aRfHandle | Handle of the RF object |
[in] | aRfCmdHandle | Handle of the command chain that finished |
[in] | aRfEventMask | Events that happened to trigger this callback |
References handleTxAck(), IEEE802154_ACK_REQUEST, radioSignal(), RF_EVENT_BUF_FULL, RF_EVENT_RX_ACK_DONE, RF_EVENT_RX_DONE, RF_EVENT_TX_DONE, sCsmaBackoffCmd, seedRandom, and sTransmitCmd.
Referenced by rfCoreSendReceiveCmd(), and startTransmit().
|
static |
sends the tx command to the radio core
Sends the packet to the radio core to be sent asynchronously.
[in] | aRfHandle | The handle for the RF core client |
[in] | aPsdu | A pointer to the data to be sent |
[in] | aLen | The length in bytes of data pointed to by psdu. |
References IEEE802154_ACK_REQUEST, IEEE802154_DSN_OFFSET, IEEE802154_MAC_ACK_WAIT_DURATION, IEEE802154_MAC_MAX_BE, IEEE802154_MAC_MAX_CSMA_BACKOFFS, IEEE802154_MAC_MIN_BE, IEEE802154_SYMBOLS_PER_SEC, otDiagIsEnabled(), PLATFORM_RADIO_RAT_TICKS_PER_SEC, sCsmaBackoffCmd, seedRandom, startTransmit(), sTransmitCmd, sTransmitRetryCount, and sTransmitRxAckCmd.
Referenced by otPlatRadioTransmit().
|
static |
sends the rx command to the radio core
Sends the pre-built receive command to the radio core. This sets up the radio to receive packets according to the settings in the global rx command.
[in] | aRfHandle | The handle for the RF core client |
References rfCommonCallback(), and sReceiveCmd.
Referenced by otPlatDiagRadioToneStop(), otPlatRadioReceive(), otPlatRadioSetExtendedAddress(), otPlatRadioSetPanId(), otPlatRadioSetShortAddress(), and rfCoreSetTransmitPower().
|
static |
Sets the transmit.
Sets the transmit power within the radio setup command or the override list.
References cTxMaxPower, platformRadio_phyState_Disabled, platformRadio_phyState_Sleep, rfCoreExecuteAbortCmd(), rfCoreSendReceiveCmd(), sReceiveCmd, sReceiveCmdHandle, sRfHandle, and sState.
Referenced by otPlatRadioReceive(), and otPlatRadioSetTransmitPower().
|
static |
Callback for the Energy Detect command.
[in] | aRfHandle | Handle of the RF object |
[in] | aRfCmdHandle | Handle of the command chain that finished |
[in] | aRfEventMask | Events that happened to trigger this callback |
References radioSignal(), and RF_EVENT_ED_SCAN_DONE.
Referenced by rfCoreSendEdScanCmd().
|
static |
sends the energy detect scan command to the radio core
Sends the Energy Detect scan command to the radio core. This scans the given channel for activity.
[in] | aRfHandle | The handle for the RF core client |
[in] | aChannel | The IEEE page 0 channel to scan |
[in] | aDuration | Time in ms to scan |
References PLATFORM_RADIO_RAT_TICKS_PER_SEC, rfCoreEdScanCmdCallback(), and sEdScanCmd.
Referenced by otPlatRadioEnergyScan().
|
static |
Callback for the Transmit Test command.
[in] | aRfHandle | Handle of the RF object |
[in] | aRfCmdHandle | Handle of the command chain that finished |
[in] | aRfEventMask | Events that happened to trigger this callback |
Referenced by rfCoreSendTxTestCmd().
|
static |
[in] | aRfHandle | The handle for the RF core client |
[in] | aModulated | TRUE: Send modulated word FALSE: Send unmodulated word |
References PLATFORM_RADIO_TX_TEST_MODULATED_WORD, PLATFORM_RADIO_TX_TEST_UNMODULATED_WORD, rfCoreTxTestCmdCallback(), and sTxTestCmd.
Referenced by otPlatDiagRadioToneStart().
|
static |
Default error callback for RF Driver.
Errors are unlikely, and fatal.
Referenced by otPlatRadioEnable().
void rfCoreDiagChannelDisable | ( | uint8_t | aChannel | ) |
Function documented in radio.h
References otPlatRadioReceive(), and sDisableChannel.
void rfCoreDiagChannelEnable | ( | uint8_t | aChannel | ) |
Function documented in radio.h
References otPlatRadioReceive(), and sDisableChannel.
void platformRadioInit | ( | void | ) |
Function documented in system.h
References otPlatEntropyGet(), platformRadio_phyState_Disabled, rfCoreInitBufs(), rfCoreInitReceiveParams(), rfCoreInitSetupCmd(), seedRandom, and sState.
otError otPlatRadioEnable | ( | otInstance * | aInstance | ) |
Function documented in platform/radio.h
References platformRadio_phyState_Disabled, platformRadio_phyState_Sleep, rfCoreErrorCallback(), sRadioSetupCmd, sRfHandle, sRfObject, and sState.
bool otPlatRadioIsEnabled | ( | otInstance * | aInstance | ) |
Function documented in platform/radio.h
References platformRadio_phyState_Disabled, and sState.
otError otPlatRadioDisable | ( | otInstance * | aInstance | ) |
Function documented in platform/radio.h
References platformRadio_phyState_Disabled, platformRadio_phyState_Sleep, sRfHandle, and sState.
otError otPlatRadioEnergyScan | ( | otInstance * | aInstance, |
uint8_t | aScanChannel, | ||
uint16_t | aScanDuration | ||
) |
Function documented in platform/radio.h
References platformRadio_phyState_EdScan, platformRadio_phyState_Receive, platformRadio_phyState_Sleep, rfCoreExecuteAbortCmd(), rfCoreSendEdScanCmd(), sReceiveCmd, sReceiveCmdHandle, sRfHandle, and sState.
otError otPlatRadioSetTransmitPower | ( | otInstance * | aInstance, |
int8_t | aPower | ||
) |
Function documented in platform/radio.h
References rfCoreSetTransmitPower(), and sReqTxPower.
otError otPlatRadioGetTransmitPower | ( | otInstance * | aInstance, |
int8_t * | aPower | ||
) |
Function documented in platform/radio.h
References sRfHandle.
otError otPlatRadioReceive | ( | otInstance * | aInstance, |
uint8_t | aChannel | ||
) |
Function documented in platform/radio.h
References platformRadio_phyState_Receive, platformRadio_phyState_Sleep, rfCoreExecuteAbortCmd(), rfCoreSendReceiveCmd(), rfCoreSetTransmitPower(), sDisableChannel, sReceiveCmd, sReceiveCmdHandle, sReqTxPower, sRfHandle, and sState.
Referenced by rfCoreDiagChannelDisable(), and rfCoreDiagChannelEnable().
otError otPlatRadioSleep | ( | otInstance * | aInstance | ) |
Function documented in platform/radio.h
References platformRadio_phyState_Receive, platformRadio_phyState_Sleep, radioSignal(), RF_EVENT_SLEEP_YIELD, rfCoreExecuteAbortCmd(), sReceiveCmd, sReceiveCmdHandle, sRfHandle, and sState.
otRadioFrame* otPlatRadioGetTransmitBuffer | ( | otInstance * | aInstance | ) |
Function documented in platform/radio.h
References sTransmitFrame.
otError otPlatRadioTransmit | ( | otInstance * | aInstance, |
otRadioFrame * | aFrame | ||
) |
Function documented in platform/radio.h
References platformRadio_phyState_Receive, platformRadio_phyState_Transmit, rfCoreSendTransmitCmd(), sRfHandle, sState, and sTransmitCmdHandle.
int8_t otPlatRadioGetRssi | ( | otInstance * | aInstance | ) |
Function documented in platform/radio.h
References sRfStats.
otRadioCaps otPlatRadioGetCaps | ( | otInstance * | aInstance | ) |
Function documented in platform/radio.h
void otPlatRadioEnableSrcMatch | ( | otInstance * | aInstance, |
bool | aEnable | ||
) |
Function documented in platform/radio.h
References rfCoreModifyRxAutoPend(), sReceiveCmd, and sRfHandle.
otError otPlatRadioAddSrcMatchShortEntry | ( | otInstance * | aInstance, |
const uint16_t | aShortAddress | ||
) |
Function documented in platform/radio.h
References PLATFORM_RADIO_SRC_MATCH_NONE, platformRadio_address_short, rfCoreFindEmptyShortSrcMatchIdx(), rfCoreFindShortSrcMatchIdx(), rfCoreModifySourceMatchEntry(), sReceiveCmd, sRfHandle, and sSrcMatchShortData.
otError otPlatRadioClearSrcMatchShortEntry | ( | otInstance * | aInstance, |
const uint16_t | aShortAddress | ||
) |
Function documented in platform/radio.h
References PLATFORM_RADIO_SRC_MATCH_NONE, platformRadio_address_short, rfCoreFindShortSrcMatchIdx(), rfCoreModifySourceMatchEntry(), sReceiveCmd, sRfHandle, and sSrcMatchShortData.
otError otPlatRadioAddSrcMatchExtEntry | ( | otInstance * | aInstance, |
const otExtAddress * | aExtAddress | ||
) |
Function documented in platform/radio.h
References PLATFORM_RADIO_SRC_MATCH_NONE, platformRadio_address_ext, rfCoreFindEmptyExtSrcMatchIdx(), rfCoreFindExtSrcMatchIdx(), rfCoreModifySourceMatchEntry(), sReceiveCmd, sRfHandle, and sSrcMatchExtData.
otError otPlatRadioClearSrcMatchExtEntry | ( | otInstance * | aInstance, |
const otExtAddress * | aExtAddress | ||
) |
Function documented in platform/radio.h
References PLATFORM_RADIO_SRC_MATCH_NONE, platformRadio_address_ext, rfCoreFindExtSrcMatchIdx(), rfCoreModifySourceMatchEntry(), sReceiveCmd, sRfHandle, and sSrcMatchExtData.
void otPlatRadioClearSrcMatchShortEntries | ( | otInstance * | aInstance | ) |
Function documented in platform/radio.h
References PLATFORM_RADIO_SHORTADD_SRC_MATCH_NUM, platformRadio_address_short, platformRadio_phyState_Receive, platformRadio_phyState_Transmit, rfCoreModifySourceMatchEntry(), sRfHandle, sSrcMatchShortData, and sState.
void otPlatRadioClearSrcMatchExtEntries | ( | otInstance * | aInstance | ) |
Function documented in platform/radio.h
References PLATFORM_RADIO_EXTADD_SRC_MATCH_NUM, platformRadio_address_ext, platformRadio_phyState_Receive, platformRadio_phyState_Transmit, rfCoreModifySourceMatchEntry(), sRfHandle, sSrcMatchExtData, and sState.
bool otPlatRadioGetPromiscuous | ( | otInstance * | aInstance | ) |
Function documented in platform/radio.h
References sReceiveCmd.
void otPlatRadioSetPromiscuous | ( | otInstance * | aInstance, |
bool | aEnable | ||
) |
Function documented in platform/radio.h
References rfCoreModifyRxFrameFilter(), sReceiveCmd, and sRfHandle.
void otPlatRadioGetIeeeEui64 | ( | otInstance * | aInstance, |
uint8_t * | aIeeeEui64 | ||
) |
Function documented in platform/radio.h
void otPlatRadioSetPanId | ( | otInstance * | aInstance, |
uint16_t | aPanid | ||
) |
Function documented in platform/radio.h
References platformRadio_phyState_Receive, platformRadio_phyState_Transmit, rfCoreExecuteAbortCmd(), rfCoreSendReceiveCmd(), sReceiveCmd, sReceiveCmdHandle, sRfHandle, and sState.
void otPlatRadioSetExtendedAddress | ( | otInstance * | aInstance, |
const otExtAddress * | aAddress | ||
) |
Function documented in platform/radio.h
References platformRadio_phyState_Receive, platformRadio_phyState_Transmit, rfCoreExecuteAbortCmd(), rfCoreSendReceiveCmd(), sReceiveCmd, sReceiveCmdHandle, sRfHandle, and sState.
void otPlatRadioSetShortAddress | ( | otInstance * | aInstance, |
uint16_t | aAddress | ||
) |
Function documented in platform/radio.h
References platformRadio_phyState_Receive, platformRadio_phyState_Transmit, rfCoreExecuteAbortCmd(), rfCoreSendReceiveCmd(), sReceiveCmd, sReceiveCmdHandle, sRfHandle, and sState.
otError otPlatDiagRadioToneStart | ( | otInstance * | aInstance, |
bool | aModulated | ||
) |
Function documented in platform/radio.h
References platformRadio_phyState_Receive, platformRadio_phyState_Sleep, rfCoreExecuteAbortCmd(), rfCoreSendTxTestCmd(), sReceiveCmdHandle, sRfHandle, sState, and sTxTestCmdHandle.
otError otPlatDiagRadioToneStop | ( | otInstance * | aInstance | ) |
Function documented in platform/radio.h
References platformRadio_phyState_Receive, platformRadio_phyState_Sleep, rfCoreExecuteAbortCmd(), rfCoreSendReceiveCmd(), sReceiveCmdHandle, sRfHandle, sState, and sTxTestCmdHandle.
|
static |
References otPlatDiagModeGet(), and sTransmitCmd.
Referenced by handleTxState().
|
static |
References otPlatDiagModeGet().
Referenced by handleRxDataFinish().
|
static |
Release an entry in the RX buffer list
Referenced by releaseAndNext().
|
static |
Given a queue entry, give the next queue entry.
Referenced by ackSearchRxQueue(), handleRxAckFinish(), handleRxDataFinish(), processRxQueue(), and releaseAndNext().
|
static |
Release the current entry and move to the next entry in the rx queue.
References nextQueueEntry(), and releaseQueueEntry().
Referenced by handleRxDataFinish(), handleTxState(), and processRxQueue().
|
static |
References IEEE802154_FRAME_PENDING_MASK, RF_NUM_RAT_TICKS_IN_1_US, sReceiveCmd, sSrcMatchExtData, and sSrcMatchShortData.
Referenced by handleRxAckFinish(), and handleRxDataFinish().
|
static |
An RX queue entry is in the finished state, process it.
References IEEE802154_ACK_REQUEST, IEEE802154_DSN_OFFSET, IEEE802154_FRAME_TYPE_ACK, IEEE802154_FRAME_TYPE_MASK, nextQueueEntry(), platformRadio_phyState_Transmit, platformRadioProcessReceiveDone(), populateReceiveFrame(), releaseAndNext(), RF_EVENT_RX_ACK_DONE, and sState.
Referenced by processRxQueue().
|
static |
An RX queue entry is in the finished state, process it.
References IEEE802154_DSN_OFFSET, IEEE802154_FRAME_TYPE_ACK, IEEE802154_FRAME_TYPE_MASK, nextQueueEntry(), platformRadio_phyState_Transmit, populateReceiveFrame(), and sState.
Referenced by ackSearchRxQueue().
|
static |
Empties the rx queue, regardless of the current state of the entries.
References sRxDataQueue.
Referenced by platformRadioProcess().
|
static |
Scan through the RX queue, looking for completed entries.
References handleRxDataFinish(), nextQueueEntry(), releaseAndNext(), and sRxDataQueue.
Referenced by platformRadioProcess().
|
static |
References handleRxAckFinish(), and nextQueueEntry().
Referenced by handleTxState().
|
static |
Handle events in the TX state.
References ackSearchRxQueue(), IEEE802154_ACK_REQUEST, IEEE802154_DSN_OFFSET, platformRadio_phyState_Receive, platformRadioProcessTransmitDone(), releaseAndNext(), sRxDataQueue, sState, sTransmitCmd, sTransmitError, and sTransmitFrame.
Referenced by platformRadioProcess().
void platformRadioProcess | ( | otInstance * | aInstance, |
uintptr_t | arg | ||
) |
Function documented in system.h This is called from the main process loop.
References clearRxQueue(), handleTxState(), PLATFORM_RADIO_INVALID_RSSI, platformRadio_phyState_Disabled, platformRadio_phyState_EdScan, platformRadio_phyState_Receive, platformRadio_phyState_Sleep, platformRadio_phyState_Transmit, processRxQueue(), RF_EVENT_BUF_FULL, RF_EVENT_ED_SCAN_DONE, RF_EVENT_RX_ACK_DONE, RF_EVENT_RX_DONE, RF_EVENT_SLEEP_YIELD, RF_EVENT_TX_DONE, sEdScanCmd, sRfHandle, and sState.
|
static |
Referenced by handleRxAckFinish(), handleRxDataFinish(), handleTxState(), otPlatDiagRadioToneStart(), otPlatDiagRadioToneStop(), otPlatRadioClearSrcMatchExtEntries(), otPlatRadioClearSrcMatchShortEntries(), otPlatRadioDisable(), otPlatRadioEnable(), otPlatRadioEnergyScan(), otPlatRadioIsEnabled(), otPlatRadioReceive(), otPlatRadioSetExtendedAddress(), otPlatRadioSetPanId(), otPlatRadioSetShortAddress(), otPlatRadioSleep(), otPlatRadioTransmit(), platformRadioInit(), platformRadioProcess(), and rfCoreSetTransmitPower().
|
static |
Referenced by otPlatRadioReceive(), rfCoreDiagChannelDisable(), and rfCoreDiagChannelEnable().
|
static |
Referenced by handleTxAck(), and rfCoreSendTransmitCmd().
|
static |
Referenced by otPlatRadioEnable(), and rfCoreInitSetupCmd().
|
static |
Referenced by rfCoreModifyRxAutoPend(), and rfCoreModifyRxFrameFilter().
|
static |
Referenced by rfCoreModifySourceMatchEntry().
|
static |
Referenced by platformRadioProcess(), and rfCoreSendEdScanCmd().
|
static |
Referenced by rfCoreSendTxTestCmd().
|
static |
Referenced by otPlatRadioAddSrcMatchExtEntry(), otPlatRadioAddSrcMatchShortEntry(), otPlatRadioClearSrcMatchExtEntry(), otPlatRadioClearSrcMatchShortEntry(), otPlatRadioEnableSrcMatch(), otPlatRadioEnergyScan(), otPlatRadioGetPromiscuous(), otPlatRadioGetReceiveSensitivity(), otPlatRadioReceive(), otPlatRadioSetExtendedAddress(), otPlatRadioSetPanId(), otPlatRadioSetPromiscuous(), otPlatRadioSetShortAddress(), otPlatRadioSleep(), populateReceiveFrame(), rfCoreInitReceiveParams(), rfCoreModifyRxAutoPend(), rfCoreModifyRxFrameFilter(), rfCoreSendReceiveCmd(), and rfCoreSetTransmitPower().
|
static |
Referenced by rfCommonCallback(), rfCoreSendTransmitCmd(), and startTransmit().
|
static |
Referenced by handleTxState(), platformRadioProcessTransmitDone(), rfCommonCallback(), and rfCoreSendTransmitCmd().
|
static |
Referenced by handleTxAck(), and rfCoreSendTransmitCmd().
|
static |
|
static |
|
static |
Referenced by otPlatRadioGetRssi(), and rfCoreInitReceiveParams().
|
static |
Referenced by rfCoreInitBufs().
|
static |
Referenced by rfCoreInitBufs().
|
static |
Referenced by rfCoreInitBufs().
|
static |
Referenced by rfCoreInitBufs().
|
static |
Referenced by clearRxQueue(), handleTxState(), processRxQueue(), rfCoreInitBufs(), and rfCoreInitReceiveParams().
|
static |
Referenced by handleTxState(), and otPlatRadioGetTransmitBuffer().
|
static |
Referenced by handleTxState().
|
static |
Referenced by rfCoreInitBufs().
|
static |
Referenced by otPlatRadioEnable().
|
static |
Referenced by otPlatDiagRadioToneStart(), otPlatDiagRadioToneStop(), otPlatRadioAddSrcMatchExtEntry(), otPlatRadioAddSrcMatchShortEntry(), otPlatRadioClearSrcMatchExtEntries(), otPlatRadioClearSrcMatchExtEntry(), otPlatRadioClearSrcMatchShortEntries(), otPlatRadioClearSrcMatchShortEntry(), otPlatRadioDisable(), otPlatRadioEnable(), otPlatRadioEnableSrcMatch(), otPlatRadioEnergyScan(), otPlatRadioGetTransmitPower(), otPlatRadioReceive(), otPlatRadioSetExtendedAddress(), otPlatRadioSetPanId(), otPlatRadioSetPromiscuous(), otPlatRadioSetShortAddress(), otPlatRadioSleep(), otPlatRadioTransmit(), platformRadioProcess(), and rfCoreSetTransmitPower().
|
static |
|
static |
Referenced by handleTxAck(), and otPlatRadioTransmit().
|
static |
Referenced by otPlatDiagRadioToneStart(), and otPlatDiagRadioToneStop().
|
static |
Referenced by platformRadioInit(), rfCommonCallback(), and rfCoreSendTransmitCmd().
|
static |
Value requested in dBm from the upper layers on the last call to otPlatRadioSetTransmitPower.
Referenced by otPlatRadioReceive(), and otPlatRadioSetTransmitPower().
|
static |
Array of back-off values necessary for passing FCC testing.
Referenced by rfCoreSetTransmitPower().