Radio Control Layer (RCL)
|
These functions are useful as part of the API to RCL.
Functions | |
bool | RCL_Scheduler_isLater (uint32_t refTime, uint32_t chkTime) |
Find if a time instant occurs after another, allowing wrap-around. More... | |
int32_t | RCL_Scheduler_delta (uint32_t refTime, uint32_t chkTime) |
Find the time difference between two times, allowing wrap-around. More... | |
static uint32_t | RCL_Scheduler_getCurrentTime (void) |
Get current time. More... | |
RCL_StopType | RCL_Scheduler_setSchedStopTime (RCL_SchedulerStopInfo *stopInfo, uint32_t schedStopTime) |
Set scheduler stop time. More... | |
bool | RCL_Scheduler_postEvent (RCL_Command_Handle c, RCL_Events e) |
Post event to command handler. More... | |
bool RCL_Scheduler_isLater | ( | uint32_t | refTime, |
uint32_t | chkTime | ||
) |
Find if a time instant occurs after another, allowing wrap-around.
Checks if a time is before or after another. In the processing, a time is assumed to be before the reference if it is less than 1/8 of the full timer range (134 seconds) before it; otherwise it is assumed to be in the future. This means that the time presumed to be the latest should always be the second parameter (chkTime)
refTime | Reference time |
chkTime | Time to be checked |
Referenced by RCL_Lite_Command_start(), RCL_Scheduler_setStartStopTimeEarliestStart(), RCL_Scheduler_setStopTimes(), rclSchedulerFindEarliestStopTime(), and rclSchedulerProcessCmdStartStopTime().
int32_t RCL_Scheduler_delta | ( | uint32_t | refTime, |
uint32_t | chkTime | ||
) |
Find the time difference between two times, allowing wrap-around.
Finds the signed difference between two times, saturated at the maximum signed 32-bit integer value. In the processing, a time is assumed to be before the reference if it is less than 1/8 of the full timer range (134 seconds) before it; otherwise it is assumed to be in the future.
refTime | Reference time |
chkTime | Time to be checked |
Referenced by rclSchedulerHwi().
|
inlinestatic |
Get current time.
References hal_get_current_time().
Referenced by LRF_enableSynthRefsys(), RCL_Handler_ADC_Noise_getNoise(), RCL_Lite_Command_start(), RCL_Scheduler_setStopTimes(), rclSchedulerFindEarliestStopTime(), rclSchedulerHwi(), and rclSchedulerProcessCmdStartStopTime().
RCL_StopType RCL_Scheduler_setSchedStopTime | ( | RCL_SchedulerStopInfo * | stopInfo, |
uint32_t | schedStopTime | ||
) |
Set scheduler stop time.
Sets scheduler stop time for the given stop type, finds which of the stop active times comes first, sets selection bits accordingly and reprograms the stop time if it was already programmed.
stopInfo | Pointer to stop info for the relevant stop type |
schedStopTime | New scheduler stop time to apply |
References RCL_SchedulerStopInfo::cmdStopTime, RCL_Scheduler_setStopTimes(), RCL_SchedulerStopTimeSelect_Cmd, RCL_SchedulerStopTimeSelect_None, RCL_SchedulerStopTimeSelect_Sched, RCL_SchedulerStopTimeState_Programmed, RCL_StopType_None, rclSchedulerFindEarliestStopTime(), rclSchedulerState, RCL_SchedulerStopInfo::schedStopEnabled, RCL_SchedulerStopInfo::schedStopTime, RCL_SchedulerStopInfo::stopTimeSelect, and RCL_SchedulerState::stopTimeState.
bool RCL_Scheduler_postEvent | ( | RCL_Command_Handle | c, |
RCL_Events | e | ||
) |
Post event to command handler.
[in] | c | Command to post event to |
[in] | e | Event(s) to post |
References hal_trigger_command_fsm(), RCL_SchedulerState::postedRclEvents, RCL_CommandStatus_Finished, RCL_CommandStatus_Queued, RCL_EventSoftwareTriggered, and rclSchedulerState.
Referenced by RCL_BLE5_updateFilterList(), RCL_Command_stop(), RCL_Lite_Command_start(), RCL_Lite_Command_stop(), RCL_MultiBuffer_put(), RCL_TxBuffer_put(), and rclSchedulerHwi().