ANT pulse simulator

nRF5 SDK v9.0.0

nRF51 SDK v9.0.0

ANT pulse simulator module. More...

Macros

#define MIN_HEART_RATE_VALUE 10u
Minimum allowed instantaneous heart rate value.
#define MAX_HEART_RATE_VALUE 255u
Maximum allowed instantaneous heart rate value.
#define HEART_RATE_VALUE_INCREMENT 2u
Instantaneous heart rate value increment amount.
#define HEART_RATE_VALUE_DECREMENT HEART_RATE_VALUE_INCREMENT
Instantaneous heart rate value decrement amount.

Functions

void puls_simulate_init ( ant_hrm_profile_t *p_related_profile, uint8_t init_heart_rate, bool auto_change)
Function for initializing the pulse simulator. More...
void pulse_simulate_one_iteration (void)
Function for simulating a device event. More...
void button_event_handler ( bsp_event_t event)
Function for handling button events. More...

Detailed Description

ANT pulse simulator module.

This module simulates a pulse for the ANT HRM Profile. The module calculates abstract values, which are handled by the HRM pages data model to ensure that they are compatible. It provides a handler for changing the heart rate value manually (using bsp_button actions as defined in the Board Support Package ) and functionality to change the heart rate value automatically.

Function Documentation

void button_event_handler ( bsp_event_t event )

Function for handling button events.

This function can be used as bsp_button event handler.

Parameters
[in] event Event generated by button press.
void puls_simulate_init ( ant_hrm_profile_t * p_related_profile ,
uint8_t init_heart_rate ,
bool auto_change
)

Function for initializing the pulse simulator.

Call this function to make the simulator use a specific instance of the ANT HRM data model.

Parameters
[in] p_related_profile Pointer to the HRM data instance used for simulation.
[in] init_heart_rate Initial value for instantaneous heart rate value.
[in] auto_change Enable or disable automatic changes of the heart rate.
void pulse_simulate_one_iteration ( void )

Function for simulating a device event.

Based on this event, the transmitter data is simulated.

This function should be called in the HRM TX period according to the device profile (4.06 Hz).


Please send us your feedback about the documentation! For technical questions, visit the Nordic Developer Zone .