| 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 configuration
This information applies to the following SoftDevices: S212, S332

This module configures the ANT channel according to the configuration structure ant_channel_config_t.

The API for this module is available here: ANT channel configuration

The following code example shows how to use the module:

void user_ant_channel(void)
{
uint32_t err_code;
err_code = sd_ant_network_address_set(NETWORK_NUMBER, m_network_key); // This function must be called before the channel is initialized.
APP_ERROR_CHECK(err_code);
const ant_channel_config_t channel_config =
{
.channel_number = CHANNEL_NUMBER,
.channel_type = CHANNEL_TYPE_SLAVE,
.ext_assign = EXT_ASSIGN,
.rf_freq = RF_FREQ,
.transmission_type = TRANSMISSION_TYPE,
.device_type = DEVICE_TYPE,
.device_number = DEVICE_NUMBER,
.channel_period = CHANNEL_PERIOD,
.network_number = NETWORK_NUMBER,
#if ANT_CONFIG_ENCRYPTED_CHANNELS > 0
.p_crypto_settings = NULL
#endif
};
ant_channel_init(&channel_config);
err_code = sd_ant_channel_open(CHANNEL_NUMBER);
APP_ERROR_CHECK(err_code);
}