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... | |
RCL_StopType | RCL_Scheduler_setCmdStopTime (RCL_SchedulerStopInfo *stopInfo, uint32_t cmdStopTime) |
Set command stop time. More... | |
RCL_StopType | RCL_Scheduler_cancelSchedStopTime (RCL_SchedulerStopInfo *stopInfo) |
Cancel scheduler stop time. More... | |
RCL_StopType | RCL_Scheduler_cancelCmdStopTime (RCL_SchedulerStopInfo *stopInfo) |
Cancel command 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 __attribute__(), RCL_Handler_Ieee_RxTx(), RCL_Handler_Ieee_setCustomEventTime(), RCL_Lite_Command_start(), RCL_Scheduler_setCustomStartStopTimeEarliestStart(), 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 RCL_Handler_Ieee_RxTx(), and rclSchedulerHwi().
|
inlinestatic |
Get current time.
Referenced by __attribute__(), LRF_enableSynthRefsys(), RCL_Handler_ADC_Noise_getNoise(), RCL_Handler_Ieee_RxTx(), RCL_Handler_Ieee_setCustomEventTime(), 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 active stop 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 rclSchedulerSetNewStopTime().
Referenced by __attribute__().
RCL_StopType RCL_Scheduler_setCmdStopTime | ( | RCL_SchedulerStopInfo * | stopInfo, |
uint32_t | cmdStopTime | ||
) |
Set command stop time.
Sets command stop time for the given stop type, finds which of the active stop 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 |
cmdStopTime | New command stop time to apply |
References rclSchedulerSetNewStopTime().
RCL_StopType RCL_Scheduler_cancelSchedStopTime | ( | RCL_SchedulerStopInfo * | stopInfo | ) |
Cancel scheduler stop time.
Cancels scheduler stop time for the given stop type, finds if there is still an active stop time, cancels or reprograms the stop time if it was already programmed.
stopInfo | Pointer to stop info for the relevant stop type |
References rclSchedulerCancelStopTime().
Referenced by rclStop().
RCL_StopType RCL_Scheduler_cancelCmdStopTime | ( | RCL_SchedulerStopInfo * | stopInfo | ) |
Cancel command stop time.
Cancels command stop time for the given stop type, finds if there is still an active stop time, cancels or reprograms the stop time if it was already programmed.
stopInfo | Pointer to stop info for the relevant stop type |
References rclSchedulerCancelStopTime().
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, and RCL_EventSoftwareTriggered.
Referenced by RCL_BLE5_updateFilterList(), RCL_IEEE_Tx_stop(), RCL_IEEE_Tx_submit(), RCL_Lite_Command_start(), RCL_Lite_Command_stop(), RCL_MultiBuffer_put(), RCL_TxBuffer_put(), rclCommandHwi(), rclSchedulerCancelStopTime(), rclSchedulerHwi(), rclSchedulerSetNewStopTime(), and rclStop().