nRF51 SDK: ANT HRM RX example

| nRF51 SDK

- Home
- Related Pages
- API Reference
- Data Structures

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Data Structures | Macros | Functions
ANT HRM RX example
ANT HRM examples

Example of ANT HRM RX profile. 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...

## Macros

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

## Functions

void | hrm_rx_open (void)
| Function for setting ANT module ready for HRM RX. More...
void | hrm_rx_channel_event_handle (uint8_t const *p_event_message_buffer)
| Function for processing channel event messages for the HRM. More...
void | SD_EVT_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. More...

## Detailed Description

Example of ANT HRM RX profile.

## Macro Definition Documentation

#define ANT_EVENT_MSG_BUFFER_MIN_SIZE 32u

Minimum size of an ANT event message buffer.

#define UART_RX_BUF_SIZE 1u

UART RX buffer size.

#define UART_TX_BUF_SIZE 256u

UART TX buffer size.

## Function Documentation

void app_error_handler | ( | uint32_t | error_code,
|  | uint32_t | line_num,
|  | const uint8_t * | p_file_name
| ) |  |

Function for handling an error.

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

Parameters

  [in] | error_code | Error code supplied to the handler.
  [in] | line_num | Line number where the error occurred.
  [in] | p_file_name | Pointer to the file name.

void hrm_rx_channel_event_handle | ( | uint8_t const * | p_event_message_buffer | ) |

Function for processing channel event messages for the HRM.

Parameters

  [in] | p_event_message_buffer | ANT event message buffer.

< Index for Message ID.

void hrm_rx_open | ( | void |  | ) |

Function for setting ANT module ready for HRM RX.

< Network number.

< Default ANT Channel.

< Channel Type Slave RX only.

< Network number.

< ANT Ext Assign.

< Default ANT Channel.

< Device Number.

< Channel ID device type.

< Transmission Type.

< Default ANT Channel.

< Frequency, Decimal 57 (2457 MHz).

< Default ANT Channel.

< Message Periods, decimal 8070 (4.06Hz).

< Default ANT Channel.

int main | ( | void |  | ) |

Function for application main entry, does not return.

< Minimum size of an ANT event message buffer.

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.

Traces out the user supplied parameters and busy loops.

Parameters

  [in] | pc | Value of the program counter.
  [in] | line_num | Line number where the assert occurred.
  [in] | p_file_name | Pointer to the file name.