Radio Control Layer (RCL)
RCL.c File Reference
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <string.h>
#include <ti/drivers/RCL.h>
#include <ti/drivers/rcl/RCL_Scheduler.h>
#include <ti/drivers/rcl/RCL_Profiling.h>
#include <ti/drivers/rcl/RCL_Gpio.h>
#include <ti/drivers/rcl/RCL_Debug.h>
#include <ti/drivers/rcl/RCL_Version.h>
#include <ti/drivers/rcl/LRF.h>
#include <ti/drivers/rcl/hal/RCL_Hal.h>
#include <ti/drivers/dpl/SemaphoreP.h>
#include <ti/drivers/dpl/HwiP.h>
#include <ti/log/Log.h>
+ Include dependency graph for RCL.c:

Functions

static void rclCommandHwi (void)
 
static void rclDispatchHwi (void)
 
static void rclSchedulerHwi (void)
 
static void rclPowerNotify (RCL_PowerEvent eventType)
 
static RCL_CommandStatus rclStop (RCL_Command_Handle c, RCL_StopType stopType, RCL_SchedulerStopReason stopReason)
 
void RCL_clearNextCommandHook ()
 Hook function to clear nextCmd pointer. More...
 
RCL_Command * RCL_getNextCommandHook ()
 Hook function to get the nextCmd from the command queue. More...
 
RCL_StopType RCL_policyHook (RCL_Command *currentCmd, RCL_Command *newCmd)
 Hook function to determine what stop type the ongoing command should get. More...
 
void RCL_phyHook (RCL *rclState, RCL_Handle client, RCL_Command *cmd)
 Hook function to allow dynamic PHY change. More...
 
void RCL_scheduleHook (RCL_SchedulerState *rclSchedulerState, RCL_Handle client, RCL_Command *cmd)
 Hook function to schedule new command. More...
 
RCL_CommandStatus RCL_stopNextCmdHook (RCL_Command *cmd, RCL_StopType stopType, RCL_SchedulerStopReason stopReason)
 Hook function to stop a queued command. More...
 
RCL_CommandStatus RCL_submitHook (RCL_Handle h, RCL_Command *cmd)
 Hook function to submit a command to the RCL. More...
 
RCL_CommandStatus RCL_ScheduleStop (RCL_Command_Handle c, RCL_StopType stopType)
 Function to schedule a stop for a running command. More...
 
static void rclCheckNextCommandPendCallback (void)
 
 __attribute__ ((weak))
 
void RCL_init (void)
 
void RCL_openPowerNotifications (void)
 
void RCL_closePowerNotifications (void)
 
RCL_Handle RCL_open (RCL_Client *c, const LRF_Config *lrfConfig)
 
void RCL_close (RCL_Handle h)
 
RCL_CommandStatus RCL_Command_submit (RCL_Handle h, RCL_Command_Handle c)
 
RCL_CommandStatus RCL_Command_pend (RCL_Command_Handle c)
 
RCL_CommandStatus RCL_Command_stop (RCL_Command_Handle c, RCL_StopType stopType)
 
int8_t RCL_readRssi (void)
 
void RCL_triggerScheduler (void)
 
uint32_t RCL_getPhySwitchingTime (void)
 
RCL_Command_TxPower RCL_txPowerLookup (const LRF_TxPowerTable *table, RCL_Command_TxPower powerLevel, bool roundUp, bool returnBoundaryOnOutOfRange)
 

Variables

static bool isInitialized = false
 
static RCL_Command * rclNextCmd = NULL
 
RCL rclState
 

Function Documentation

§ rclCommandHwi()

§ rclDispatchHwi()

§ rclSchedulerHwi()

§ rclPowerNotify()

§ rclStop()

§ RCL_clearNextCommandHook()

void RCL_clearNextCommandHook ( )

Hook function to clear nextCmd pointer.

Referenced by __attribute__(), rclDispatchHwi(), and rclSchedulerHwi().

§ RCL_getNextCommandHook()

RCL_Command* RCL_getNextCommandHook ( )

Hook function to get the nextCmd from the command queue.

Returns
::Pointer to the nextCmd

Referenced by __attribute__(), rclDispatchHwi(), and rclSchedulerHwi().

§ RCL_policyHook()

RCL_StopType RCL_policyHook ( RCL_Command *  currentCmd,
RCL_Command *  newCmd 
)

Hook function to determine what stop type the ongoing command should get.

Parameters
[in]currentCmdCurrently running command
[in]newCmdNew command to potentially take its place
Returns
RCL_StopType How the ongoing command will be terminated if not already terminated when needed

Referenced by __attribute__().

§ RCL_phyHook()

void RCL_phyHook ( RCL *  rclState,
RCL_Handle  client,
RCL_Command *  cmd 
)

Hook function to allow dynamic PHY change.

Parameters
[in]rclStateRCL state
[in]clientCurrent RCL client
[in]cmdCurrently running command

Referenced by __attribute__(), and rclSchedulerHwi().

§ RCL_scheduleHook()

void RCL_scheduleHook ( RCL_SchedulerState rclSchedulerState,
RCL_Handle  client,
RCL_Command *  cmd 
)

Hook function to schedule new command.

Parameters
[in]rclSchedulerStateScheduler state
[in]clientCurrent RCL client
[in]cmdCommand to be scheduled

Referenced by __attribute__(), and rclSchedulerHwi().

§ RCL_stopNextCmdHook()

RCL_CommandStatus RCL_stopNextCmdHook ( RCL_Command *  cmd,
RCL_StopType  stopType,
RCL_SchedulerStopReason  stopReason 
)

Hook function to stop a queued command.

This hook is invoked when a command that is still in the queue (i.e. not yet scheduled or active) needs to be stopped.

Parameters
[in]cmdPointer to the command to be stopped
[in]stopTypeType of stop that should be applied
[in]stopReasonReason for stopping the command
Returns
RCL_CommandStatus The resulting status of the command after the stop operation.

Referenced by __attribute__(), and rclStop().

§ RCL_submitHook()

RCL_CommandStatus RCL_submitHook ( RCL_Handle  h,
RCL_Command *  cmd 
)

Hook function to submit a command to the RCL.

Parameters
[in]hHandle of the RCL client submitting the command
[in]cmdPointer to the command being submitted
Returns
RCL_CommandStatus Status indicating success or the reason for rejection of the submission.

Referenced by RCL_close(), and RCL_Command_submit().

§ RCL_ScheduleStop()

RCL_CommandStatus RCL_ScheduleStop ( RCL_Command_Handle  c,
RCL_StopType  stopType 
)

Function to schedule a stop for a running command.

Parameters
[in]cHandle of the RCL command to be stopped
[in]stopTypeType of stop to apply (hard, graceful, etc.)
Returns
RCL_CommandStatus Resulting status of the command after the stop request has been processed.

References RCL_SchedulerStopReason_Scheduling, and rclStop().

§ rclCheckNextCommandPendCallback()

static void rclCheckNextCommandPendCallback ( void  )
static

§ __attribute__()

§ RCL_init()

§ RCL_openPowerNotifications()

void RCL_openPowerNotifications ( void  )

§ RCL_closePowerNotifications()

void RCL_closePowerNotifications ( void  )

References RCL_Debug_assert, and RCL_Hal_powerClose().

Referenced by RCL_close().

§ RCL_open()

§ RCL_close()

§ RCL_Command_submit()

RCL_CommandStatus RCL_Command_submit ( RCL_Handle  h,
RCL_Command_Handle  c 
)

§ RCL_Command_pend()

§ RCL_Command_stop()

RCL_CommandStatus RCL_Command_stop ( RCL_Command_Handle  c,
RCL_StopType  stopType 
)

§ RCL_readRssi()

int8_t RCL_readRssi ( void  )

§ RCL_triggerScheduler()

void RCL_triggerScheduler ( void  )

§ RCL_getPhySwitchingTime()

§ RCL_txPowerLookup()

RCL_Command_TxPower RCL_txPowerLookup ( const LRF_TxPowerTable table,
RCL_Command_TxPower  powerLevel,
bool  roundUp,
bool  returnBoundaryOnOutOfRange 
)

Variable Documentation

§ isInitialized

bool isInitialized = false
static

Referenced by RCL_init().

§ rclNextCmd

RCL_Command* rclNextCmd = NULL
static

Referenced by __attribute__(), and RCL_close().

§ rclState

RCL rclState

Referenced by __attribute__(), and rclCommandHwi().