Callbacks Utility#
RAIL Callbacks Utility#
This optional software component can be enabled to include default functionality related to RAIL callback configuration.
This utility provides basic callbacks that can be made available to RAIL. If a callback is not registered for use, it will be compiled out. The provided callbacks include:
This callback is called when a RAIL library-level assertion occurs. This callback occurs regardless of the other configuration options enabled in this software component.
This callback overrides a weak function in the RAIL library and as such cannot be compiled out. Any assert within the RAIL library will cause this callback to run and provide information as to the cause.
The weak function
sl_rail_util_on_assert_failed()is provided for application use and will be called when sl_railcb_assert_failed() is called.This callback override can be configured to be excluded, in which case the application is responsible for creating its own sl_railcb_assert_failed() override if so desired.
sli_rail_util_on_rf_ready()This callback is called when the call to sl_rail_init() completes.
The
Initialize RAILconfiguration option must be enabled, and this callback must be passed as a parameter to sl_rail_init() to enable its use.The weak function
sl_rail_util_on_rf_ready()is provided for application use and will be called whensli_rail_util_on_rf_ready()is called.
sli_rail_util_on_channel_config_change()This callback is called when an automatic switch from one channel configuration entry to another is performed internal to the RAIL library.
The
Initialize RAILandProtocol Configurationconfiguration options must be enabled, and this callback must be passed as a parameter to sl_rail_config_channels() to enable its use.The weak function
sl_rail_util_on_channel_config_change()is provided for application use and will be called whensli_rail_util_on_channel_config_change()is called.
sli_rail_util_on_event()This callback is called when a configured radio event occurs. The radio events capable of causing this callback are identified in sl_rail_events_t.
The
Initialize RAILandRadio Event Configurationconfiguration options must be enabled, and this callback must be passed as a parameter to sl_rail_init() to enable its use.The weak function
sl_rail_util_on_event()is provided for application use and will be called whensli_rail_util_on_event()is called.
Configuration Options#
The following configuration options can be changed:
Include/exclude sl_railcb_assert_failed() callback override.