Radio Control Layer (RCL)
|
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <ti/drivers/rcl/hal/hal.h>
#include <ti/drivers/rcl/RCL_Command.h>
#include <ti/drivers/rcl/RCL_Lite.h>
#include <ti/drivers/rcl/LRF.h>
#include <ti/drivers/rcl/RCL_Scheduler.h>
#include <ti/drivers/rcl/RCL_Debug.h>
#include <ti/drivers/dpl/HwiP.h>
#include <ti/log/Log.h>
Macros | |
#define | RCL_LITE_SCHEDULE_MARGIN RCL_SCHEDULER_SYSTIM_US(150) |
Functions | |
void | RCL_Lite_CommandHwi (void) |
Routine to be called in the RFD_IRQ0 interrupt handler. 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... | |
#define RCL_LITE_SCHEDULE_MARGIN RCL_SCHEDULER_SYSTIM_US(150) |
Referenced by RCL_Lite_Command_start().
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.
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().