nRF5 SDK v13.0.0
Macros | Typedefs | Functions
Types definitions for BLE support in SoftDevice handler.

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

Macros

#define NRF_BLE_GATT_MAX_MTU_SIZE   GATT_MTU_SIZE_DEFAULT
 Default Maximum ATT MTU size. More...
 
#define BLE_STACK_EVT_MSG_BUF_SIZE   (sizeof(ble_evt_t) + (NRF_BLE_GATT_MAX_MTU_SIZE))
 
#define BLE_STACK_HANDLER_SCHED_EVT_SIZE   0
 

Typedefs

typedef void(* ble_evt_handler_t )(ble_evt_t *p_ble_evt)
 Application stack event handler type.
 

Functions

uint32_t softdevice_ble_evt_handler_set (ble_evt_handler_t ble_evt_handler)
 Function for registering for BLE events. More...
 

Detailed Description

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

Macro Definition Documentation

#define BLE_STACK_EVT_MSG_BUF_SIZE   (sizeof(ble_evt_t) + (NRF_BLE_GATT_MAX_MTU_SIZE))

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

#define BLE_STACK_HANDLER_SCHED_EVT_SIZE   0

The size of the scheduler event used by SoftDevice handler when passing BLE events using the Scheduler.

#define NRF_BLE_GATT_MAX_MTU_SIZE   GATT_MTU_SIZE_DEFAULT

Default Maximum ATT MTU size.

This define should be defined in the sdk_config.h file to override the default.

Function Documentation

uint32_t softdevice_ble_evt_handler_set ( ble_evt_handler_t  ble_evt_handler)

Function for registering for BLE events.

The application should use this function to register for receiving BLE events from the SoftDevice. If the application does not call this function, then any BLE 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 cancel the registration. However, it is possible to register a different function for handling the events at any point of time.

Parameters
[in]ble_evt_handlerFunction to be called for each received BLE event.
Return values
NRF_SUCCESSSuccessful registration.
NRF_ERROR_NULLNull pointer provided as input.

Documentation feedback | Developer Zone | Subscribe | Updated