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 initializing 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;
APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS, APP_TIMER_OP_QUEUE_SIZE, false);
err_code = bsp_init(BSP_INIT_LED, APP_TIMER_TICKS(100, APP_TIMER_PRESCALER), NULL);
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.