nRF51 SDK - S210 SoftDevice
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
ANT HRM TX example

Example of ANT HRM TX profile. More...

Macros

#define HRM_DEVICE_NUMBER   49u
 
#define HRM_TRANSMISSION_TYPE   1u
 
#define HRMTX_ANT_CHANNEL   1u
 
#define HRMTX_MFG_ID   2u
 
#define HRMTX_SERIAL_NUMBER   0xABCDu
 
#define HRMTX_HW_VERSION   5u
 
#define HRMTX_SW_VERSION   0
 
#define HRMTX_MODEL_NUMBER   2u
 
#define ANTPLUS_NETWORK_NUMBER   0
 
#define ANTPLUS_RF_FREQ   0x39u
 
#define UART_TX_BUF_SIZE   256u
 
#define UART_RX_BUF_SIZE   1u
 

Functions

uint32_t hrm_tx_open (void)
 Function for initializing HRM transmitter. More...
 
uint32_t hrm_tx_channel_event_handle (uint32_t ant_event)
 Function for processing ANT channel event. More...
 
void main_hrm_tx_run (void)
 Function for configuring the device simulator and HRM TX channel, does not return. More...
 
void softdevice_assert_callback (uint32_t pc, uint16_t line_num, const uint8_t *p_file_name)
 Function for handling SoftDevice asserts, 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.
 

Detailed Description

Example of ANT HRM TX profile.

Macro Definition Documentation

#define ANTPLUS_NETWORK_NUMBER   0

Network number.

#define ANTPLUS_RF_FREQ   0x39u

Frequency, Decimal 57 (2457 MHz).

#define HRM_DEVICE_NUMBER   49u

Denotes the used ANT device number.

#define HRM_TRANSMISSION_TYPE   1u

Denotes the used ANT transmission type.

#define HRMTX_ANT_CHANNEL   1u

Default ANT Channel.

#define HRMTX_HW_VERSION   5u

HW Version.

#define HRMTX_MFG_ID   2u

Manufacturer ID.

#define HRMTX_MODEL_NUMBER   2u

Model Number.

#define HRMTX_SERIAL_NUMBER   0xABCDu

Serial Number.

#define HRMTX_SW_VERSION   0

SW Version.

#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_codeError code supplied to the handler.
[in]line_numLine number where the error occurred.
[in]p_file_namePointer to the file name.
uint32_t hrm_tx_channel_event_handle ( uint32_t  ant_event)

Function for processing ANT channel event.

Parameters
[in]ant_eventANT channel event.
Return values
NRF_SUCCESSOperation success.

Function for processing ANT channel event.

Parameters
[in]ant_eventANT channel event.
Return values
NRF_SUCCESSOperation success.
uint32_t hrm_tx_open ( void  )

Function for initializing HRM transmitter.

Return values
NRF_SUCCESSOperation success.
NRF_ANT_ERROR_CHANNEL_IN_WRONG_STATEOperation failure. Attempt to perform an action in a wrong channel state.
NRF_ANT_ERROR_INVALID_NETWORK_NUMBEROperation failure. Invalid network number provided.
NRF_ANT_ERROR_INVALID_PARAMETER_PROVIDEDOperation failure. Invalid parameter specified in a configuration message.

Function for initializing HRM transmitter.

Return values
NRF_SUCCESSOperation success.
NRF_ANT_ERROR_CHANNEL_IN_WRONG_STATEOperation failure. Attempt to perform an action in a wrong channel state.
NRF_ANT_ERROR_INVALID_NETWORK_NUMBEROperation failure. Invalid network number provided.
NRF_ANT_ERROR_INVALID_PARAMETER_PROVIDEDOperation failure. Invalid parameter specified in a configuration message.
void main_hrm_tx_run ( void  )

Function for configuring the device simulator and HRM TX channel, does not return.

< Value of the RTC1 PRESCALER register.

< Maximum number of simultaneously created timers.

< Size of timer operation queues.

< Maximum number of users of the GPIOTE handler.

< Value of the RTC1 PRESCALER register.

< Delay from a GPIOTE event until a button is reported as pushed (in number of timer ticks).

< Value of the RTC1 PRESCALER register.

< Maximum number of simultaneously created timers.

< Size of timer operation queues.

< Maximum number of users of the GPIOTE handler.

< Value of the RTC1 PRESCALER register.

< Delay from a GPIOTE event until a button is reported as pushed (in number of timer ticks).

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

Function for handling SoftDevice asserts, does not return.

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.