nRF51 SDK: Types definitions for ANT support in SoftDevice handler.

| nRF51 SDK

- Home
- Related Pages
- API Reference
- Data Structures

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Data Structures | Macros | Typedefs | Functions
Types definitions for ANT support in SoftDevice handler.
SDK Common Libraries

This file contains the declarations of types required for ANT stack support. These types will be defined when the preprocessor define ANT_STACK_SUPPORT_REQD is defined. More...

## Data Structures

struct | ant_evt_t
| ANT stack event type. More...

## Macros

#define | ANT_STACK_EVT_MSG_BUF_SIZE 32
#define | ANT_STACK_EVT_STRUCT_SIZE (sizeof(ant_evt_t))

## Typedefs

typedef void(* | ant_evt_handler_t )(ant_evt_t *p_ant_evt)
| Application ANT stack event handler type.

## Functions

uint32_t | softdevice_ant_evt_handler_set (ant_evt_handler_t ant_evt_handler)
| Function for registering for ANT events. More...

## Detailed Description

This file contains the declarations of types required for ANT stack support. These types will be defined when the preprocessor define ANT_STACK_SUPPORT_REQD is defined.

## Macro Definition Documentation

#define ANT_STACK_EVT_MSG_BUF_SIZE 32

Size of ANT event message buffer. This will be provided to the SoftDevice while fetching an event.

#define ANT_STACK_EVT_STRUCT_SIZE (sizeof(ant_evt_t))

Size of the ant_evt_t structure. This will be used by the softdevice_handler.h to internal event buffer size needed.

## Function Documentation

uint32_t softdevice_ant_evt_handler_set | ( | ant_evt_handler_t | ant_evt_handler | ) |

Function for registering for ANT events.

The application should use this function to register for receiving ANT events from the SoftDevice. If the application does not call this function, then any ANT event that may be generated by the SoftDevice will NOT be fetched. Once the application has registered for the events, it is not possible to possible to cancel the registration. However, it is possible to register a different function for handling the events at any point of time.

Parameters

  [in] | ant_evt_handler | Function to be called for each received ANT event.

Return values

  NRF_SUCCESS | Successful registration.
  NRF_ERROR_NULL | Null pointer provided as input.