nRF51 SDK
|
Example of ANT HRM TX profile. More...
Macros | |
#define | HRM_DEVICE_NUMBER 49u |
#define | HRM_TRANSMISSION_TYPE 5u |
#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. | |
Example of ANT HRM TX profile.
#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 5u |
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.
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.
[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. |
uint32_t hrm_tx_channel_event_handle | ( | uint32_t | ant_event | ) |
Function for processing ANT channel event.
[in] | ant_event | ANT channel event. |
NRF_SUCCESS | Operation success. |
Function for processing ANT channel event.
[in] | ant_event | ANT channel event. |
NRF_SUCCESS | Operation success. |
uint32_t hrm_tx_open | ( | void | ) |
Function for initializing HRM transmitter.
NRF_SUCCESS | Operation success. |
NRF_ANT_ERROR_CHANNEL_IN_WRONG_STATE | Operation failure. Attempt to perform an action in a wrong channel state. |
NRF_ANT_ERROR_INVALID_NETWORK_NUMBER | Operation failure. Invalid network number provided. |
NRF_ANT_ERROR_INVALID_PARAMETER_PROVIDED | Operation failure. Invalid parameter specified in a configuration message. |
Function for initializing HRM transmitter.
NRF_SUCCESS | Operation success. |
NRF_ANT_ERROR_CHANNEL_IN_WRONG_STATE | Operation failure. Attempt to perform an action in a wrong channel state. |
NRF_ANT_ERROR_INVALID_NETWORK_NUMBER | Operation failure. Invalid network number provided. |
NRF_ANT_ERROR_INVALID_PARAMETER_PROVIDED | Operation 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.
[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. |