Channel Selector#

The RAIL Channel Selector component allows the application to dynamically select the communication channel at both compile-time and runtime. This flexibility is crucial for applications that need to operate on different channels based on environmental conditions or regulatory requirements. The component provides functions to set and get the selected channel, ensuring that the application can easily switch channels as needed.

Key functions include:

Modules#

Configurations

Functions#

void

Sets the configured channel using the DEFAULT_CHANNEL define.

uint8_t
set_selected_channel(uint16_t new_channel)

Sets which channel the app will communicate on.

uint16_t

Get which channel the app will communicate on.

RAIL_Status_t

Restarts the RX operation on the selected channel.

Function Documentation#

set_configured_channel#

void set_configured_channel (void )

Sets the configured channel using the DEFAULT_CHANNEL define.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Sets the configured channel to DEFAULT_CHANNEL


set_selected_channel#

uint8_t set_selected_channel (uint16_t new_channel)

Sets which channel the app will communicate on.

Parameters
TypeDirectionArgument NameDescription
uint16_t[in]new_channel

requested new channel number

Tests the channel number with configured channel limits from radio configurator, if it is invalid first valid channel will be used. Also restarts the receiving by calling restart_rx_channel()

Returns

  • 1 if channel number is valid else 0


get_selected_channel#

uint16_t get_selected_channel (void )

Get which channel the app will communicate on.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • current channel number used for communication


restart_rx_channel#

RAIL_Status_t restart_rx_channel (void )

Restarts the RX operation on the selected channel.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • status of the RAIL_StartRx() function