ANT channel state indicator

nRF5 SDK v15.2.0

This information applies to the following SoftDevice: S212

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

CHANNEL_TYPE_SLAVE/CHANNEL_TYPE_SLAVE_RX_ONLY

Page-1 Sheet.257 Sheet.256 Start/End-point Start Start Process.245 BSP_INDICATE_IDLE BSP_INDICATE_IDLE Process.229 BSP_INDICATE_SCANNING BSP_INDICATE_SCANNING Process.230 BSP_INDICATE_CONNECTED BSP_INDICATE_CONNECTED Process.231 BSP_INDICATE_RCV_ERROR BSP_INDICATE_RCV_ERROR Flowline1 Flowline1.233 Channel Opened Channel Opened Flowline1.234 EVENT_RX EVENT_RX Flowline1.235 EVENT_RX_FAIL EVENT_RX_FAIL Flowline2.239 EVENT_RX_FAIL_GO_TO_SEARCH Straight Edge.28 N Straight Edge.29 N EVENT_RX_FAIL_GO_TO_SEARCH Flowline2.242 EVENT_RX Straight Edge.28 N Straight Edge.29 N EVENT_RX Flowline2 EVENT_RX_SEARCH_TIMEOUT Straight Edge.28 N Straight Edge.29 N EVENT_RX_SEARCH_TIMEOUT Sheet.262 EVENT_RX_FAIL EVENT_RX_FAIL Sheet.264 EVENT_RX EVENT_RX Flowline1.265 Flowline1.266

CHANNEL_TYPE_MASTER

Page-1 Start/End-point Start Start Process.245 BSP_INDICATE_IDLE BSP_INDICATE_IDLE Flowline1 Flowline1.230 Channel Opened Channel Opened Process.231 BSP_INDICATE_ADVERTISING BSP_INDICATE_ADVERTISING