ANT Search Config Library

Defines

ANT_SEARCH_SHARING_CYCLES_DISABLE 0x00

Disable search sharing.

ANT_LOW_PRIORITY_SEARCH_DISABLE 0x00

Disable low priority search.

ANT_LOW_PRIORITY_TIMEOUT_DISABLE 0xFF

Disable low priority search time-out.

ANT_HIGH_PRIORITY_SEARCH_DISABLE 0x00

Disable high priority search.

ANT_HIGH_PRIORITY_TIMEOUT_DISABLE 0xFF

Disable high priority search time-out.

DEFAULT_ANT_SEARCH_CONFIG(CHANNEL_NUMBER)

{                                                                   \

.channel_number         = CHANNEL_NUMBER,                       \

.low_priority_timeout   = CONFIG_ANT_LOW_PRIORITY_TIMEOUT,     \

.high_priority_timeout  = CONFIG_ANT_HIGH_PRIORITY_TIMEOUT,    \

.search_sharing_cycles  =

ANT_SEARCH_SHARING_CYCLES_DISABLE

,    \

.search_priority        =

ANT_SEARCH_PRIORITY_DEFAULT

,          \

.waveform               =

ANT_WAVEFORM_DEFAULT

,                 \

}


Initializes the default ANT search configuration structure.

Parameters
  • CHANNEL_NUMBER[in] Number of the channel.

Enums

enum ant_search_priority_t

Search priority.

Values:

enumerator ANT_SEARCH_PRIORITY_DEFAULT = 0

Default search priority level.

enumerator ANT_SEARCH_PRIORITY_LOWEST = ANT_SEARCH_PRIORITY_DEFAULT

Lowest search priority level.

enumerator ANT_SEARCH_PRIORITY_0 = ANT_SEARCH_PRIORITY_LOWEST
enumerator ANT_SEARCH_PRIORITY_1 = 1
enumerator ANT_SEARCH_PRIORITY_2 = 2
enumerator ANT_SEARCH_PRIORITY_3 = 3
enumerator ANT_SEARCH_PRIORITY_4 = 4
enumerator ANT_SEARCH_PRIORITY_5 = 5
enumerator ANT_SEARCH_PRIORITY_6 = 6
enumerator ANT_SEARCH_PRIORITY_7 = 7
enumerator ANT_SEARCH_PRIORITY_HIGHEST = ANT_SEARCH_PRIORITY_7

Highest search priority level.

enum ant_waveform_t

ANT search waveform.

Values:

enumerator ANT_WAVEFORM_DEFAULT = 316

Standard search waveform value.

enumerator ANT_WAVEFORM_FAST = 97

Accelerated search waveform value.

Functions

ant_err_t ant_search_init(ant_search_config_t const *p_config)

Function for configuring the ANT channel search.

Parameters

p_config[in] Pointer to the search configuration structure.

Return values

0 – If the channel was successfully configured. Otherwise, an error code is returned.

struct ant_search_config_t
#include <>

ANT search configuration structure.

Public Members

uint8_t channel_number

Assigned channel number.

uint8_t low_priority_timeout

Low priority time-out (in 2.5 second increments).

uint8_t high_priority_timeout

High priority time-out (in 2.5 second increments).

uint8_t search_sharing_cycles

Number of search cycles to run before alternating searches. Search sharing can be disabled by ANT_SEARCH_SHARING_CYCLES_DISABLE.

ant_search_priority_t search_priority

Search priority.

ant_waveform_t waveform

Search waveform. Do not use custom values.