Radio Control Layer (RCL)
RCL_Lite.h File Reference
#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>
+ Include dependency graph for RCL_Lite.h:
+ This graph shows which files directly or indirectly include this file:

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_HandleRCL_Lite_Command_stop (RCL_StopType stopType)
 Stop the running command if any. More...
 
static RCL_Command_HandleRCL_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...
 

Function Documentation

§ RCL_Lite_CommandHwi()

§ RCL_Lite_configSetPhyFeatures()

static LRF_SetupResult RCL_Lite_configSetPhyFeatures ( const LRF_Config lrfConfig,
uint16_t  phyFeatures 
)
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.

Parameters
lrfConfig[in] - Radio configuration to be used
phyFeatures[in] - PHY feature selector
Returns
Result of setup

References LRF_rclEnableRadioClocks(), LRF_setupRadio(), and RadioState_Down.

Referenced by RCL_Lite_config().

§ RCL_Lite_config()

static LRF_SetupResult RCL_Lite_config ( const LRF_Config lrfConfig)
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.

Parameters
lrfConfig[in] - Radio configuration to be used
Returns
Result of setup

References LRF_PhyFeatures_Default, and RCL_Lite_configSetPhyFeatures().

§ RCL_Lite_setPhyFeatures()

static LRF_SetupResult RCL_Lite_setPhyFeatures ( const LRF_Config lrfConfig,
uint16_t  phyFeatures 
)
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.

Parameters
lrfConfig[in] - Radio configuration to be used
phyFeatures[in] - PHY feature selector
Returns
Result of setup

References LRF_setupRadio(), RadioState_Configured, RCL_Lite_Command_isFinished(), RCL_Lite_Command_start(), and RCL_Lite_Command_stop().

§ RCL_Lite_Command_start()

void RCL_Lite_Command_start ( RCL_Command_Handle  c)

§ RCL_Lite_Command_isFinished()

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.

Returns
true if the last running command has finished or no command is started, false if a command is running

References RCL_SchedulerState::currCmd, and rclSchedulerState.

Referenced by RCL_Lite_setPhyFeatures().

§ RCL_Lite_Command_stop()

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.

Parameters
stopType[in] - Stop type; telling which situations the command will stop
Returns
Pointer to the command object that is being stopped or remains running; NULL if no command was running

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().

§ RCL_Lite_Command_abort()

static RCL_Command_Handle* RCL_Lite_Command_abort ( void  )
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.

Returns
Pointer to the command object that is being stopped; NULL if no command was running

References RCL_Lite_Command_stop(), and RCL_StopType_Hard.

§ RCL_Lite_readRssi()

static int8_t RCL_Lite_readRssi ( void  )
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.

Returns
Returns RSSI value, or LRF_RSSI_INVALID if the last obtained RSSI value is no longer valid or the radio is unavailable (e.g. in the middle of a Tx operation).

References LRF_readRssi().