Radio Control Layer (RCL)
|
#include <stdint.h>
#include <stddef.h>
#include <ti/drivers/rcl/RCL_Event.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/LRF.h>
#include <ti/drivers/rcl/hal/hal.h>
Go to the source code of this file.
Functions | |
void | RCL_Lite_CommandHwi (void) |
Routine to be called in the RFD_IRQ0 interrupt handler. More... | |
static LRF_SetupResult | RCL_Lite_configSetPhyFeatures (const LRF_Config *lrfConfig, uint16_t phyFeatures) |
Sets up the radio for configuration with non-default PHY features. More... | |
static LRF_SetupResult | RCL_Lite_config (const LRF_Config *lrfConfig) |
Sets up the radio for configuration with default PHY features. More... | |
static LRF_SetupResult | RCL_Lite_setPhyFeatures (const LRF_Config *lrfConfig, uint16_t phyFeatures) |
Change PHY features after radio has been configured. More... | |
void | RCL_Lite_Command_start (RCL_Command_Handle c) |
Submit RCL command object to be executed. More... | |
bool | RCL_Lite_Command_isFinished (void) |
Check if a command is finished. The function may be polled to wait for the running command to end. More... | |
RCL_Command_Handle * | RCL_Lite_Command_stop (RCL_StopType stopType) |
Stop the running command if any. More... | |
static RCL_Command_Handle * | RCL_Lite_Command_abort (void) |
Abort the running command if any. More... | |
static int8_t | RCL_Lite_readRssi (void) |
Get the last valid RSSI value. More... | |
void RCL_Lite_CommandHwi | ( | void | ) |
Routine to be called in the RFD_IRQ0 interrupt handler.
References RCL_SchedulerState::currCmd, RCL_SchedulerState::descheduleReason, RCL_SchedulerState::gracefulStopInfo, hal_cancel_graceful_stop_time(), hal_cancel_hard_stop_time(), hal_cancel_setup_time(), hal_check_clear_timer_compare(), hal_disable_all_command_radio_interrupts(), hal_get_command_ifg_reg(), HAL_TIMER_EVT_GRACEFUL_STOP, HAL_TIMER_EVT_HARD_STOP, HAL_TIMER_EVT_SETUP, HAL_TIMER_EVT_START, RCL_SchedulerState::hardStopInfo, LRF_hardStop(), RCL_SchedulerState::postedRclEvents, RCL_CommandStatus_DescheduledApi, RCL_CommandStatus_DescheduledScheduling, RCL_CommandStatus_Finished, RCL_CommandStatus_Scheduled, RCL_EventNone, RCL_Lite_Command_stop(), RCL_Scheduler_findStopStatus(), RCL_Scheduler_setStopTimes(), RCL_StopType_DescheduleOnly, RCL_StopType_None, rclSchedulerState, and RCL_SchedulerStopInfo::stopReason.
|
inlinestatic |
Sets up the radio for configuration with non-default PHY features.
Sets up the radio with a given configuration and PHY features. Note that the phyFeatures field in the radio commands is ignored when using RCL Lite.
lrfConfig | [in] - Radio configuration to be used |
phyFeatures | [in] - PHY feature selector |
References LRF_rclEnableRadioClocks(), LRF_setupRadio(), and RadioState_Down.
Referenced by RCL_Lite_config().
|
inlinestatic |
Sets up the radio for configuration with default PHY features.
Sets up the radio with a given configuration, but with PHY features at default.
lrfConfig | [in] - Radio configuration to be used |
References LRF_PhyFeatures_Default, and RCL_Lite_configSetPhyFeatures().
|
inlinestatic |
Change PHY features after radio has been configured.
Sets up a given set of PHY features. It is required that the radio has already been set up using RCL_Lite_configSetPhyFeatures or RCL_Lite_config. Note that the phyFeatures field in the radio commands is ignored when using RCL Lite.
lrfConfig | [in] - Radio configuration to be used |
phyFeatures | [in] - PHY feature selector |
References LRF_setupRadio(), RadioState_Configured, RCL_Lite_Command_isFinished(), RCL_Lite_Command_start(), and RCL_Lite_Command_stop().
void RCL_Lite_Command_start | ( | RCL_Command_Handle | c | ) |
Submit RCL command object to be executed.
This API returns immediately with either RCL_CommandStatus_Error or the asynchronous current state of the command.
c | [in] - Command structure |
References RCL_SchedulerState::currCmd, hal_cancel_setup_time(), hal_enable_command_radio_interrupt(), hal_setup_setup_time(), RCL_CommandStatus_Error_StartTooLate, RCL_CommandStatus_Idle, RCL_CommandStatus_Scheduled, RCL_Debug_assert, RCL_EventSetup, RCL_LITE_SCHEDULE_MARGIN, RCL_Schedule_Now, RCL_Scheduler_getCurrentTime(), RCL_Scheduler_isLater(), RCL_Scheduler_postEvent(), and rclSchedulerState.
Referenced by RCL_Lite_setPhyFeatures().
bool RCL_Lite_Command_isFinished | ( | void | ) |
Check if a command is finished. The function may be polled to wait for the running command to end.
References RCL_SchedulerState::currCmd, and rclSchedulerState.
Referenced by RCL_Lite_setPhyFeatures().
RCL_Command_Handle* RCL_Lite_Command_stop | ( | RCL_StopType | stopType | ) |
Stop the running command if any.
Sends the message to try to stop the running command if any. When the function returns, the command may still be running. Depending on the stop type, the command may stop after some time. RCL_Lite_Command_isFinished may be used to determine when the command is finished.
stopType | [in] - Stop type; telling which situations the command will stop |
References RCL_SchedulerStopInfo::apiStopEnabled, RCL_SchedulerState::currCmd, RCL_SchedulerState::descheduleReason, RCL_SchedulerState::gracefulStopInfo, RCL_SchedulerState::hardStopInfo, LRF_sendGracefulStop(), LRF_sendHardStop(), RCL_Debug_assert, RCL_EventNone, RCL_Scheduler_postEvent(), RCL_SchedulerStopReason_Api, RCL_StopType_DescheduleOnly, RCL_StopType_Graceful, RCL_StopType_Hard, RCL_StopType_None, rclSchedulerState, and RCL_SchedulerStopInfo::stopReason.
Referenced by RCL_Lite_Command_abort(), RCL_Lite_CommandHwi(), and RCL_Lite_setPhyFeatures().
|
inlinestatic |
Abort the running command if any.
Sends the message to abort the running command if any. When the function returns, the command may still be running, but should be expected to end after a short time. RCL_Lite_Command_isFinished may be used to determine when the command is finished.
References RCL_Lite_Command_stop(), and RCL_StopType_Hard.
|
inlinestatic |
Get the last valid RSSI value.
This API returns the last valid RSSI value or a specific error status if the last obtained RSSI value is no longer valid.
References LRF_readRssi().