nRF51 SDK: ANT Broadcast TX Example

| nRF51 SDK

- Home
- Related Pages
- API Reference
- Data Structures

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Macros | Functions
ANT Broadcast TX Example
ANT Broadcast examples

Example of basic ANT Broadcast TX. More...

## Macros

#define | CHANNEL_0 0x00
#define | CHANNEL_0_TX_CHANNEL_PERIOD 8192u
#define | CHANNEL_0_ANT_EXT_ASSIGN 0x00
#define | CHANNEL_0_CHAN_ID_DEV_TYPE 0x02u
#define | CHANNEL_0_CHAN_ID_DEV_NUM 0x02u
#define | CHANNEL_0_CHAN_ID_TRANS_TYPE 0x01u
#define | ANT_CHANNEL_DEFAULT_NETWORK 0x00
#define | ANT_EVENT_MSG_BUFFER_MIN_SIZE 32u
#define | BROADCAST_DATA_BUFFER_SIZE 8u

## Functions

void | app_error_handler (uint32_t error_code, uint32_t line_num, const uint8_t *p_file_name)
| Function for handling an error. More...
void | SD_EVT_IRQHandler (void)
| Function for stack interrupt handling. More...
void | softdevice_assert_callback (uint32_t pc, uint16_t line_num, const uint8_t *p_file_name)
| Function for handling SoftDevice asserts. More...
void | HardFault_Handler (void)
| Function for handling HardFault.
int | main (void)
| Function for application main entry. Does not return. More...

## Detailed Description

Example of basic ANT Broadcast TX.

## Macro Definition Documentation

#define ANT_CHANNEL_DEFAULT_NETWORK 0x00

ANT Channel Network.

#define ANT_EVENT_MSG_BUFFER_MIN_SIZE 32u

Minimum size of ANT event message buffer.

#define BROADCAST_DATA_BUFFER_SIZE 8u

Size of the broadcast data buffer.

#define CHANNEL_0 0x00

ANT Channel 0.

#define CHANNEL_0_ANT_EXT_ASSIGN 0x00

ANT Ext Assign.

#define CHANNEL_0_CHAN_ID_DEV_NUM 0x02u

Device number.

#define CHANNEL_0_CHAN_ID_DEV_TYPE 0x02u

Device type.

#define CHANNEL_0_CHAN_ID_TRANS_TYPE 0x01u

Transmission type.

#define CHANNEL_0_TX_CHANNEL_PERIOD 8192u

Channel period 4 Hz.

## 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.

int main | ( | void |  | ) |

Function for application main entry. Does not return.

< Minimum size of ANT event message buffer.

< Size of the broadcast data buffer.

< ANT Channel 0.

< Size of the broadcast data buffer.

void SD_EVT_IRQHandler | ( | void |  | ) |

Function for stack interrupt handling.

Implemented to clear the pending flag when receiving an interrupt from the stack.

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

Function for handling SoftDevice asserts.

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.