| nRF5 SDK v12.0.0 |

Choose documentation: | nRF5 SDK | S130 SoftDevice API | S132 SoftDevice API | S212 SoftDevice API | S332 SoftDevice API

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
ANT channel state indicator
This information applies to the following SoftDevices: S212, S332

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.

## CHANNEL_TYPE_SLAVE/CHANNEL_TYPE_SLAVE_RX_ONLY

## CHANNEL_TYPE_MASTER