nRF51 SDK v9.0.0
This information applies to the following SoftDevices: S210, S310
This module indicates the state of the assigned ANT channel. The API for this module is available here: ANT channel state indicator
During initialization, the module links signalling with the selected channel.
Initialization
The Board Support Package (BSP) must be initialized before this module, so that Board-specific indications and states can be used.
The following code example shows how to initialize the module:
uint32_t err_code;
ant_state_indicator_init
(CHANNEL_NUMBER, CHANNEL_TYPE);
err_code =
sd_ant_channel_open
(CHANNEL_NUMBER);
APP_ERROR_CHECK
(err_code);
err_code =
ant_state_indicator_channel_opened
();
APP_ERROR_CHECK
(err_code);
Propagating ANT events to the module
The application should propagate ANT events to this module. The following code example shows how to do this:
void
ant_evt_dispatch(
ant_evt_t
* p_ant_evt)
{
/*
Other calls.
*/
ant_state_indicator_evt_handle
(p_ant_evt);
}
Indications
Depending on the type of channel, the module indicates states in different ways.