|
Radio Control Layer (RCL)
|
#include <stdint.h>#include <stdlib.h>#include <ti/log/Log.h>#include <ti/drivers/rcl/RCL_Command.h>#include <ti/drivers/rcl/RCL_Buffer.h>#include <ti/drivers/rcl/RCL_Scheduler.h>#include <ti/drivers/rcl/RCL_Profiling.h>#include <ti/drivers/rcl/hal/hal.h>#include <ti/drivers/rcl/commands/generic.h>#include <ti/devices/DeviceFamily.h>
Include dependency graph for generic.c:Data Structures | |
| struct | .common |
| union | .__unnamed__ |
| struct | .__unnamed__.tx |
| struct | .__unnamed__.txTest |
| struct | .__unnamed__.rx |
| struct | .__unnamed__.nesb |
Macros | |
| #define | RCL_HANDLER_GENERIC_PRBS15_POLY 0x80020000 |
| #define | RCL_HANDLER_GENERIC_PRBS32_POLY 0x00400007 |
| #define | RCL_HANDLER_GENERIC_PRBS_INIT 0x00005555 |
| #define | RCL_HANDLER_GENERIC_PRBS_SYNC 0xAB05FA1C |
| #define | RCL_HANDLER_GENERIC_RESTORE_NONE 0x0000 |
| #define | RCL_HANDLER_GENERIC_RESTORE_MODCTRL 0x0001 |
| #define | RCL_HANDLER_GENERIC_RESTORE_WHITEN_INIT 0x0002 |
| #define | RCL_HANDLER_GENERIC_RESTORE_WHITEN_POLY 0x0004 |
Functions | |
| static uint32_t | RCL_Handler_Generic_prepareSynth (void) |
| static void | RCL_Handler_Generic_setSynthPowerState (bool fsOff) |
| static void | RCL_Handler_Generic_updateRxCurBufferAndFifo (List_List *rxBuffers) |
| static RCL_CommandStatus | RCL_Handler_Generic_findPbeErrorEndStatus (uint16_t pbeEndStatus) |
| static uint32_t | RCL_Handler_Generic_updateTxBuffers (List_List *txBuffers, uint32_t maxBuffers) |
| static uint32_t | RCL_Handler_Generic_maskEventsByFifoConf (uint32_t mask, uint16_t fifoConfVal, bool activeUpdate) |
| static void | RCL_Handler_Generic_updateRxStats (RCL_StatsGeneric *stats, uint32_t startTime) |
| static void | RCL_Handler_Generic_updateLongStats (void) |
| static bool | RCL_Handler_Generic_initRxStats (RCL_StatsGeneric *stats, uint32_t startTime) |
| static uint32_t | RCL_Handler_Generic_updateSyncWord (uint32_t syncWord) |
| static void | RCL_Handler_Nesb_updateHeader (List_List *txBuffers, uint8_t autoRetransmitMode, uint8_t hdrConf, uint8_t seqNumber) |
| static void | RCL_Handler_Nesb_updateStats (RCL_StatsNesb *stats, uint32_t startTime) |
| static void | RCL_Handler_Nesb_updateLongStats (void) |
| static bool | RCL_Handler_Nesb_initStats (RCL_StatsNesb *stats, uint32_t startTime) |
| RCL_Events | RCL_Handler_Generic_Fs (RCL_Command *cmd, LRF_Events lrfEvents, RCL_Events rclEventsIn) |
| RCL_Events | RCL_Handler_Generic_FsOff (RCL_Command *cmd, LRF_Events lrfEvents, RCL_Events rclEventsIn) |
| RCL_Events | RCL_Handler_Generic_Tx (RCL_Command *cmd, LRF_Events lrfEvents, RCL_Events rclEventsIn) |
| RCL_Events | RCL_Handler_Generic_TxRepeat (RCL_Command *cmd, LRF_Events lrfEvents, RCL_Events rclEventsIn) |
| RCL_Events | RCL_Handler_Generic_TxTest (RCL_Command *cmd, LRF_Events lrfEvents, RCL_Events rclEventsIn) |
| RCL_Events | RCL_Handler_Generic_Rx (RCL_Command *cmd, LRF_Events lrfEvents, RCL_Events rclEventsIn) |
| RCL_Events | RCL_Handler_Generic_PbeOperation (RCL_Command *cmd, LRF_Events lrfEvents, RCL_Events rclEventsIn) |
| RCL_Events | RCL_Handler_Nesb_Ptx (RCL_Command *cmd, LRF_Events lrfEvents, RCL_Events rclEventsIn) |
| RCL_Events | RCL_Handler_Nesb_Prx (RCL_Command *cmd, LRF_Events lrfEvents, RCL_Events rclEventsIn) |
Variables | |
| struct { | |
| struct { | |
| uint16_t | txFifoSize |
| uint16_t | rxFifoSize |
| RCL_CommandStatus | endStatus |
| bool | activeUpdate |
| bool | powerStandbyConstraintSet |
| bool | powerSwtcxoConstraintSet |
| RCL_MultiBuffer * | curBuffer |
| } | common |
| union { | |
| struct { | |
| bool | gracefulStopObserved |
| bool | stopFs |
| uint32_t | txCount |
| uint32_t | period |
| } | tx |
| struct { | |
| uint16_t | restoreOpt |
| uint16_t | storedWhitenInit |
| uint32_t | storedWhitenPoly |
| } | txTest |
| struct { | |
| uint32_t | longOkCount |
| uint32_t | longNokCount |
| uint16_t | demc1be1 |
| uint16_t | demc1be2 |
| bool | restoreThresh |
| } | rx |
| struct { | |
| uint32_t | longTxCount |
| uint32_t | longOkCount |
| uint32_t | longNokCount |
| uint32_t | longRxIgnoredCount |
| uint32_t | longRxAddrMismatchCount |
| uint32_t | longRxBufFullCount |
| uint16_t | demc1be1 |
| uint16_t | demc1be2 |
| bool | restoreThresh |
| } | nesb |
| } | |
| } | genericHandlerState |
| struct .common |
| Data Fields | ||
|---|---|---|
| uint16_t | txFifoSize | |
| uint16_t | rxFifoSize | |
| RCL_CommandStatus | endStatus | |
| bool | activeUpdate | |
| bool | powerStandbyConstraintSet | |
| bool | powerSwtcxoConstraintSet | |
| RCL_MultiBuffer * | curBuffer | |
| union .__unnamed__ |
| Data Fields | ||
|---|---|---|
| __unnamed__ | tx | |
| __unnamed__ | txTest | |
| __unnamed__ | rx | |
| __unnamed__ | nesb | |
| struct .__unnamed__.tx |
| struct .__unnamed__.txTest |
| struct .__unnamed__.rx |
| struct .__unnamed__.nesb |
| #define RCL_HANDLER_GENERIC_PRBS15_POLY 0x80020000 |
Polynomial to use for PRBS15 data
Referenced by RCL_Handler_Generic_TxTest().
| #define RCL_HANDLER_GENERIC_PRBS32_POLY 0x00400007 |
Polynomial to use for PRBS32 data
Referenced by RCL_Handler_Generic_TxTest().
| #define RCL_HANDLER_GENERIC_PRBS_INIT 0x00005555 |
Referenced by RCL_Handler_Generic_TxTest().
| #define RCL_HANDLER_GENERIC_PRBS_SYNC 0xAB05FA1C |
Referenced by RCL_Handler_Generic_TxTest().
| #define RCL_HANDLER_GENERIC_RESTORE_NONE 0x0000 |
Referenced by RCL_Handler_Generic_TxTest().
| #define RCL_HANDLER_GENERIC_RESTORE_MODCTRL 0x0001 |
Referenced by RCL_Handler_Generic_TxTest().
| #define RCL_HANDLER_GENERIC_RESTORE_WHITEN_INIT 0x0002 |
Referenced by RCL_Handler_Generic_TxTest().
| #define RCL_HANDLER_GENERIC_RESTORE_WHITEN_POLY 0x0004 |
Referenced by RCL_Handler_Generic_TxTest().
|
static |
References genericHandlerState, hal_power_set_swtcxo_update_constraint(), and LRF_enableSynthRefsys().
Referenced by RCL_Handler_Generic_Fs(), RCL_Handler_Generic_Rx(), RCL_Handler_Generic_Tx(), RCL_Handler_Generic_TxRepeat(), RCL_Handler_Generic_TxTest(), RCL_Handler_Nesb_Prx(), and RCL_Handler_Nesb_Ptx().
|
static |
References genericHandlerState, hal_power_release_standby_constraint(), hal_power_release_swtcxo_update_constraint(), hal_power_set_standby_constraint(), and LRF_disableSynthRefsys().
Referenced by RCL_Handler_Generic_Fs(), RCL_Handler_Generic_FsOff(), RCL_Handler_Generic_Rx(), RCL_Handler_Generic_Tx(), RCL_Handler_Generic_TxRepeat(), RCL_Handler_Generic_TxTest(), RCL_Handler_Nesb_Prx(), and RCL_Handler_Nesb_Ptx().
|
static |
|
static |
References RCL_CommandStatus_Error, RCL_CommandStatus_Error_RxFifo, RCL_CommandStatus_Error_Synth, RCL_CommandStatus_Error_TxFifo, RCL_CommandStatus_Error_UnknownOp, RCL_CommandStatus_RxTimeout, RCL_Scheduler_findStopStatus(), RCL_StopType_Graceful, and RCL_StopType_Hard.
Referenced by RCL_Handler_Generic_Fs(), RCL_Handler_Generic_FsOff(), RCL_Handler_Generic_PbeOperation(), RCL_Handler_Generic_Rx(), RCL_Handler_Generic_Tx(), RCL_Handler_Generic_TxRepeat(), RCL_Handler_Generic_TxTest(), RCL_Handler_Nesb_Prx(), and RCL_Handler_Nesb_Ptx().
|
static |
References LRF_getTxFifoWritable(), LRF_writeTxFifoWords(), RCL_Buffer_DataEntry_paddedLen, RCL_BufferStateInUse, RCL_TxBuffer_head(), and RCL_TxBuffer_next().
Referenced by RCL_Handler_Generic_Tx(), and RCL_Handler_Nesb_Ptx().
|
static |
References LRF_EventRxBufFull, and LRF_EventRxIgnored.
Referenced by RCL_Handler_Generic_Rx(), RCL_Handler_Nesb_Prx(), and RCL_Handler_Nesb_Ptx().
|
static |
References genericHandlerState, and RCL_Handler_Generic_updateLongStats().
Referenced by RCL_Handler_Generic_Rx().
|
static |
References genericHandlerState.
Referenced by RCL_Handler_Generic_Rx(), and RCL_Handler_Generic_updateRxStats().
|
static |
References genericHandlerState, and LRF_RSSI_INVALID.
Referenced by RCL_Handler_Generic_Rx().
|
static |
|
static |
References RCL_TxBuffer_head().
Referenced by RCL_Handler_Nesb_Ptx().
|
static |
References genericHandlerState, and RCL_Handler_Nesb_updateLongStats().
Referenced by RCL_Handler_Nesb_Prx(), and RCL_Handler_Nesb_Ptx().
|
static |
References genericHandlerState.
Referenced by RCL_Handler_Nesb_Prx(), RCL_Handler_Nesb_Ptx(), and RCL_Handler_Nesb_updateStats().
|
static |
References genericHandlerState, and LRF_RSSI_INVALID.
Referenced by RCL_Handler_Nesb_Prx(), and RCL_Handler_Nesb_Ptx().
| RCL_Events RCL_Handler_Generic_Fs | ( | RCL_Command * | cmd, |
| LRF_Events | lrfEvents, | ||
| RCL_Events | rclEventsIn | ||
| ) |
References genericHandlerState, hal_power_set_standby_constraint(), LRF_disable(), LRF_enable(), LRF_enableHwInterrupt(), LRF_EventOpDone, LRF_EventOpError, LRF_programFrequency(), LRF_waitForTopsmReady(), RCL_CommandStatus_Active, RCL_CommandStatus_Finished, RCL_FsType_Tx, RCL_Handler_Generic_findPbeErrorEndStatus(), RCL_Handler_Generic_prepareSynth(), RCL_Handler_Generic_setSynthPowerState(), and RCL_Scheduler_setStartStopTimeEarliestStart().
| RCL_Events RCL_Handler_Generic_FsOff | ( | RCL_Command * | cmd, |
| LRF_Events | lrfEvents, | ||
| RCL_Events | rclEventsIn | ||
| ) |
References LRF_disable(), LRF_enable(), LRF_enableHwInterrupt(), LRF_EventOpDone, LRF_EventOpError, LRF_waitForTopsmReady(), RCL_CommandStatus_Active, RCL_CommandStatus_Finished, RCL_Handler_Generic_findPbeErrorEndStatus(), RCL_Handler_Generic_setSynthPowerState(), and RCL_Scheduler_setCmdStopTimeNoStartTrigger().
| RCL_Events RCL_Handler_Generic_Tx | ( | RCL_Command * | cmd, |
| LRF_Events | lrfEvents, | ||
| RCL_Events | rclEventsIn | ||
| ) |
References genericHandlerState, LRF_disable(), LRF_enable(), LRF_enableHwInterrupt(), LRF_EventOpDone, LRF_EventOpError, LRF_prepareTxFifo(), LRF_programFrequency(), LRF_programTxPower(), LRF_waitForTopsmReady(), RCL_BufferStateFinished, RCL_CommandStatus_Active, RCL_CommandStatus_Error_MissingTxBuffer, RCL_CommandStatus_Error_Param, RCL_CommandStatus_Error_Synth, RCL_CommandStatus_Finished, RCL_Handler_Generic_findPbeErrorEndStatus(), RCL_Handler_Generic_prepareSynth(), RCL_Handler_Generic_setSynthPowerState(), RCL_Handler_Generic_updateSyncWord(), RCL_Handler_Generic_updateTxBuffers(), RCL_ProfilingEvent_PostprocStart, RCL_ProfilingEvent_PreprocStop, RCL_Scheduler_setStartStopTimeEarliestStart(), RCL_TxBuffer_get(), and TxPowerResult_Ok.
| RCL_Events RCL_Handler_Generic_TxRepeat | ( | RCL_Command * | cmd, |
| LRF_Events | lrfEvents, | ||
| RCL_Events | rclEventsIn | ||
| ) |
References RCL_SchedulerStopInfo::cmdStopEnabled, genericHandlerState, RCL_SchedulerState::gracefulStopInfo, hal_enable_graceful_stop_time_irq(), LRF_disable(), LRF_enable(), LRF_enableHwInterrupt(), LRF_EventOpDone, LRF_EventOpError, LRF_getTxFifoWritable(), LRF_prepareTxFifo(), LRF_programFrequency(), LRF_programTxPower(), LRF_waitForTopsmReady(), LRF_writeTxFifoWords(), RCL_Buffer_DataEntry_paddedLen, RCL_CommandStatus_Active, RCL_CommandStatus_Error_MissingTxBuffer, RCL_CommandStatus_Error_Param, RCL_CommandStatus_Error_Synth, RCL_CommandStatus_Finished, RCL_Handler_Generic_findPbeErrorEndStatus(), RCL_Handler_Generic_prepareSynth(), RCL_Handler_Generic_setSynthPowerState(), RCL_Handler_Generic_updateSyncWord(), RCL_Scheduler_findStopStatus(), RCL_Scheduler_setNewStartNow(), RCL_Scheduler_setNewStartRelTime(), RCL_Scheduler_setStartStopTimeEarliestStart(), RCL_StopType_Graceful, RCL_StopType_Hard, rclSchedulerState, RCL_SchedulerStopInfo::schedStopEnabled, and TxPowerResult_Ok.
| RCL_Events RCL_Handler_Generic_TxTest | ( | RCL_Command * | cmd, |
| LRF_Events | lrfEvents, | ||
| RCL_Events | rclEventsIn | ||
| ) |
References genericHandlerState, LRF_disable(), LRF_enable(), LRF_enableHwInterrupt(), LRF_EventOpDone, LRF_EventOpError, LRF_programFrequency(), LRF_programTxPower(), LRF_waitForTopsmReady(), RCL_CMD_GENERIC_WH_MODE_NONE, RCL_CMD_GENERIC_WH_MODE_PRBS15, RCL_CommandStatus_Active, RCL_CommandStatus_Error_Param, RCL_CommandStatus_Error_Synth, RCL_CommandStatus_Finished, RCL_Handler_Generic_findPbeErrorEndStatus(), RCL_HANDLER_GENERIC_PRBS15_POLY, RCL_HANDLER_GENERIC_PRBS32_POLY, RCL_HANDLER_GENERIC_PRBS_INIT, RCL_HANDLER_GENERIC_PRBS_SYNC, RCL_Handler_Generic_prepareSynth(), RCL_HANDLER_GENERIC_RESTORE_MODCTRL, RCL_HANDLER_GENERIC_RESTORE_NONE, RCL_HANDLER_GENERIC_RESTORE_WHITEN_INIT, RCL_HANDLER_GENERIC_RESTORE_WHITEN_POLY, RCL_Handler_Generic_setSynthPowerState(), RCL_Handler_Generic_updateSyncWord(), RCL_Scheduler_setStartStopTimeEarliestStart(), and TxPowerResult_Ok.
| RCL_Events RCL_Handler_Generic_Rx | ( | RCL_Command * | cmd, |
| LRF_Events | lrfEvents, | ||
| RCL_Events | rclEventsIn | ||
| ) |
References RCL_SchedulerState::actualStartTime, genericHandlerState, hal_setup_sync_found_cap(), LRF_disable(), LRF_discardRxFifoWords(), LRF_enable(), LRF_enableHwInterrupt(), LRF_EventOpDone, LRF_EventOpError, LRF_EventRxBufFull, LRF_EventRxNok, LRF_EventRxOk, LRF_peekRxFifo(), LRF_prepareRxFifo(), LRF_programFrequency(), LRF_readRxFifoWords(), LRF_setRxFifoEffSz(), LRF_waitForTopsmReady(), RCL_Buffer_DataEntry_paddedLen, RCL_CommandStatus_Active, RCL_CommandStatus_Error_RxBufferCorruption, RCL_CommandStatus_Error_Synth, RCL_CommandStatus_Finished, RCL_EventNone, RCL_Handler_Generic_findPbeErrorEndStatus(), RCL_Handler_Generic_initRxStats(), RCL_Handler_Generic_maskEventsByFifoConf(), RCL_Handler_Generic_prepareSynth(), RCL_Handler_Generic_setSynthPowerState(), RCL_Handler_Generic_updateLongStats(), RCL_Handler_Generic_updateRxCurBufferAndFifo(), RCL_Handler_Generic_updateRxStats(), RCL_Handler_Generic_updateSyncWord(), RCL_MultiBuffer_commitBytes(), RCL_MultiBuffer_getBuffer(), RCL_MultiBuffer_getNextWritableByte(), RCL_ProfilingEvent_PostprocStart, RCL_ProfilingEvent_PreprocStop, RCL_Scheduler_findStopStatus(), RCL_Scheduler_setStartStopTimeEarliestStart(), RCL_StopType_Graceful, and rclSchedulerState.
| RCL_Events RCL_Handler_Generic_PbeOperation | ( | RCL_Command * | cmd, |
| LRF_Events | lrfEvents, | ||
| RCL_Events | rclEventsIn | ||
| ) |
References LRF_disable(), LRF_enable(), LRF_enableHwInterrupt(), LRF_EventOpDone, LRF_EventOpError, LRF_waitForTopsmReady(), RCL_CommandStatus_Active, RCL_CommandStatus_Finished, RCL_CommandStatus_Scheduled, RCL_Handler_Generic_findPbeErrorEndStatus(), and RCL_Scheduler_setCmdStopTimeNoStartTrigger().
| RCL_Events RCL_Handler_Nesb_Ptx | ( | RCL_Command * | cmd, |
| LRF_Events | lrfEvents, | ||
| RCL_Events | rclEventsIn | ||
| ) |
References RCL_SchedulerState::actualStartTime, genericHandlerState, hal_setup_sync_found_cap(), LRF_disable(), LRF_enable(), LRF_enableHwInterrupt(), LRF_EventOpDone, LRF_EventOpError, LRF_EventRxBufFull, LRF_EventRxIgnored, LRF_EventRxNok, LRF_EventRxOk, LRF_peekRxFifo(), LRF_prepareRxFifo(), LRF_prepareTxFifo(), LRF_programFrequency(), LRF_programTxPower(), LRF_readRxFifoWords(), LRF_waitForTopsmReady(), RCL_Buffer_DataEntry_paddedLen, RCL_BufferStateFinished, RCL_CommandStatus_Active, RCL_CommandStatus_Error_MissingTxBuffer, RCL_CommandStatus_Error_Param, RCL_CommandStatus_Error_RxBufferCorruption, RCL_CommandStatus_Error_Synth, RCL_CommandStatus_Finished, RCL_CommandStatus_NoSync, RCL_Handler_Generic_findPbeErrorEndStatus(), RCL_Handler_Generic_maskEventsByFifoConf(), RCL_Handler_Generic_prepareSynth(), RCL_Handler_Generic_setSynthPowerState(), RCL_Handler_Generic_updateRxCurBufferAndFifo(), RCL_Handler_Generic_updateSyncWord(), RCL_Handler_Generic_updateTxBuffers(), RCL_Handler_Nesb_initStats(), RCL_Handler_Nesb_updateHeader(), RCL_Handler_Nesb_updateLongStats(), RCL_Handler_Nesb_updateStats(), RCL_MultiBuffer_commitBytes(), RCL_MultiBuffer_getBuffer(), RCL_MultiBuffer_getNextWritableByte(), RCL_ProfilingEvent_PostprocStart, RCL_ProfilingEvent_PreprocStop, RCL_Scheduler_setNewStartNow(), RCL_Scheduler_setNewStartRelTime(), RCL_Scheduler_setStartStopTimeEarliestStart(), RCL_TxBuffer_get(), rclSchedulerState, and TxPowerResult_Ok.
| RCL_Events RCL_Handler_Nesb_Prx | ( | RCL_Command * | cmd, |
| LRF_Events | lrfEvents, | ||
| RCL_Events | rclEventsIn | ||
| ) |
References RCL_SchedulerState::actualStartTime, genericHandlerState, hal_setup_sync_found_cap(), LRF_disable(), LRF_discardRxFifoWords(), LRF_enable(), LRF_enableHwInterrupt(), LRF_EventOpDone, LRF_EventOpError, LRF_EventRxBufFull, LRF_EventRxIgnored, LRF_EventRxNok, LRF_EventRxOk, LRF_peekRxFifo(), LRF_prepareRxFifo(), LRF_prepareTxFifo(), LRF_programFrequency(), LRF_programTxPower(), LRF_readRxFifoWords(), LRF_setRxFifoEffSz(), LRF_waitForTopsmReady(), RCL_Buffer_DataEntry_paddedLen, RCL_CommandStatus_Active, RCL_CommandStatus_Error_Param, RCL_CommandStatus_Error_RxBufferCorruption, RCL_CommandStatus_Error_Synth, RCL_CommandStatus_Finished, RCL_EventNone, RCL_Handler_Generic_findPbeErrorEndStatus(), RCL_Handler_Generic_maskEventsByFifoConf(), RCL_Handler_Generic_prepareSynth(), RCL_Handler_Generic_setSynthPowerState(), RCL_Handler_Generic_updateRxCurBufferAndFifo(), RCL_Handler_Generic_updateSyncWord(), RCL_Handler_Nesb_initStats(), RCL_Handler_Nesb_updateLongStats(), RCL_Handler_Nesb_updateStats(), RCL_MultiBuffer_commitBytes(), RCL_MultiBuffer_getBuffer(), RCL_MultiBuffer_getNextWritableByte(), RCL_ProfilingEvent_PostprocStart, RCL_ProfilingEvent_PreprocStop, RCL_Scheduler_findStopStatus(), RCL_Scheduler_setStartStopTimeEarliestStart(), RCL_StopType_Graceful, rclSchedulerState, and TxPowerResult_Ok.
| struct { ... } genericHandlerState |
Referenced by RCL_Handler_Generic_Fs(), RCL_Handler_Generic_initRxStats(), RCL_Handler_Generic_prepareSynth(), RCL_Handler_Generic_Rx(), RCL_Handler_Generic_setSynthPowerState(), RCL_Handler_Generic_Tx(), RCL_Handler_Generic_TxRepeat(), RCL_Handler_Generic_TxTest(), RCL_Handler_Generic_updateLongStats(), RCL_Handler_Generic_updateRxCurBufferAndFifo(), RCL_Handler_Generic_updateRxStats(), RCL_Handler_Nesb_initStats(), RCL_Handler_Nesb_Prx(), RCL_Handler_Nesb_Ptx(), RCL_Handler_Nesb_updateLongStats(), and RCL_Handler_Nesb_updateStats().