nRF51 SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
ANT HRM RX example

Example of ANT HRM RX profile. More...

Macros

#define ANT_EVENT_MSG_BUFFER_MIN_SIZE   32u
 
#define UART_TX_BUF_SIZE   256u
 
#define UART_RX_BUF_SIZE   1u
 

Functions

void PROTOCOL_EVENT_IRQHandler (void)
 Function for stack Interrupt handling.
 
void softdevice_assert_callback (uint32_t pc, uint16_t line_num, const uint8_t *p_file_name)
 Function for handling softdevice asserts and does not return. More...
 
void app_error_handler (uint32_t error_code, uint32_t line_num, const uint8_t *p_file_name)
 Function for handling an error. More...
 
int main (void)
 Function for application main entry, does not return.
 
void hrm_rx_open (void)
 Function for setting ANT module ready for HRM RX.
 
void hrm_rx_channel_event_handle (uint8_t const *p_event_message_buffer)
 Function for processing channel event messages for the HRM. More...
 

Data Structures

struct  hrm_page0_data_t
 Data structure for HRM data page 0. More...
 
struct  hrm_page1_data_t
 Data structure for HRM data page 1. More...
 
struct  hrm_page2_data_t
 Data structure for HRM data page 2. More...
 
struct  hrm_page3_data_t
 Data structure for HRM data page 3. More...
 
struct  hrm_page4_data_t
 Data structure for HRM data page 4. More...
 

Detailed Description

This example connects to the nearest Heart Rate Monitor (HRM) in range and prints the UART data when it is received from the device.

HRM specific configuration options

The following compile time configuration options are available to suit various HRM receiver implementations:

Development phase configuration options

Depending on the selected compile time configuration, the HRM receiver will trace the profile specific state information to the UART.

The following options for the compile time configuration are available in the development phase of the HRM receiver implementation:

Note
The ANT+ Network Key is available for ANT+ Adopters. Please refer to http://thisisant.com to become an ANT+ Adopter and access the key.

Macro Definition Documentation

#define ANT_EVENT_MSG_BUFFER_MIN_SIZE   32u

Minimum size of an ANT event message buffer.

#define UART_TX_BUF_SIZE   256u

UART TX buffer size.

#define UART_RX_BUF_SIZE   1u

UART RX buffer size.

Function Documentation

void softdevice_assert_callback ( uint32_t  pc,
uint16_t  line_num,
const uint8_t *  p_file_name 
)

Traces out the user supplied parameters and busy loops.

Parameters
[in]pcValue of the program counter.
[in]line_numLine number where the assert occurred.
[in]p_file_namePointer to the file name.
void app_error_handler ( uint32_t  error_code,
uint32_t  line_num,
const uint8_t *  p_file_name 
)

Function for error handling, which is called when an error has occurred.

Parameters
[in]error_codeError code supplied to the handler.
[in]line_numLine number where the error occurred.
[in]p_file_namePointer to the file name.
void hrm_rx_channel_event_handle ( uint8_t const *  p_event_message_buffer)
Parameters
[in]p_event_message_bufferANT event message buffer.