| nRF5 SDK v12.0.0 |

Choose documentation: | nRF5 SDK | S130 SoftDevice API | S132 SoftDevice API | S212 SoftDevice API | S332 SoftDevice API

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
Buttonless DFU Service
BLE Services

Buttonless DFU Service module. More...

## Data Structures
struct | ble_dfu_evt_t
struct | ble_dfu_s
struct | ble_dfu_init_t

## Macros
#define | BLE_UUID_DFU_SERVICE 0x0001
#define | BLE_DFU_BASE_UUID {{0x50, 0xEA, 0xDA, 0x30, 0x88, 0x83, 0xB8, 0x9F, 0x60, 0x4F, 0x15, 0xF3, 0x00, 0x00, 0x40, 0x8E}}
#define | BLE_DFU_ENTER_BOOTLOADER 0x01

## Typedefs
typedef struct ble_dfu_s | ble_dfu_t
typedef void(* | ble_dfu_evt_handler_t )(ble_dfu_t *p_dfu, ble_dfu_evt_t *p_evt)
| Nordic UART Service event handler type.

## Enumerations
enum | ble_dfu_evt_type_t { BLE_DFU_EVT_ENTERING_BOOTLOADER, BLE_DFU_EVT_INDICATION_ENABLED, BLE_DFU_EVT_INDICATION_DISABLED }
enum | ble_dfu_rsp_code_t { DFU_RSP_RESERVED = 0x00, DFU_RSP_SUCCESS = 0x01, DFU_RSP_OP_CODE_NOT_SUPPORTED = 0x02, DFU_RSP_OPERATION_FAILED = 0x04, DFU_RSP_CCCD_CONFIG_IMPROPER = BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR }
enum | ble_dfu_buttonless_op_code_t { DFU_OP_RESERVED = 0x00, DFU_OP_ENTER_BOOTLOADER = 0x01, DFU_OP_RESPONSE_CODE = 0x20 }

## Functions
uint32_t | ble_dfu_init (ble_dfu_t *p_dfu, const ble_dfu_init_t *p_dfu_init)
| Function for initializing the Device Firmware Update module. More...
void | ble_dfu_on_ble_evt (ble_dfu_t *p_dfu, ble_evt_t *p_ble_evt)
| Function for handling the Application's BLE Stack events. More...

## Detailed Description

Buttonless DFU Service module.

Note
  Attention! To maintain compliance with Nordic Semiconductor ASA Bluetooth profile qualification listings, this section of source code must not be modified.

## Macro Definition Documentation

#define BLE_DFU_BASE_UUID {{0x50, 0xEA, 0xDA, 0x30, 0x88, 0x83, 0xB8, 0x9F, 0x60, 0x4F, 0x15, 0xF3, 0x00, 0x00, 0x40, 0x8E}}

Used vendor specific UUID.

## Enumeration Type Documentation

enum ble_dfu_buttonless_op_code_t

Enumerator
DFU_OP_RESERVED | Reserved for future use.
DFU_OP_ENTER_BOOTLOADER | Enter bootloader.
DFU_OP_RESPONSE_CODE | Response code.

enum ble_dfu_evt_type_t

Enumerator
BLE_DFU_EVT_ENTERING_BOOTLOADER | Event indicating that the bootloader will be entered after return of this event.
BLE_DFU_EVT_INDICATION_ENABLED | Indication that the control point is enabled.
BLE_DFU_EVT_INDICATION_DISABLED | Indication that the control point is disabled.

enum ble_dfu_rsp_code_t

Enumerator
DFU_RSP_RESERVED | Reserved for future use.
DFU_RSP_SUCCESS | Success.
DFU_RSP_OP_CODE_NOT_SUPPORTED | Op Code not supported.
DFU_RSP_OPERATION_FAILED | Operation Failed.
DFU_RSP_CCCD_CONFIG_IMPROPER | CCCD is improperly configured.

## Function Documentation

uint32_t ble_dfu_init | ( | ble_dfu_t * | p_dfu,
|  | const ble_dfu_init_t * | p_dfu_init
| ) |  |

Function for initializing the Device Firmware Update module.

Parameters

  [in] | p_dfu | DFU Service structure.
  [in] | p_dfu_init | The structure containing the values of characteristics needed by the service.

Returns
  NRF_SUCCESS on successful initialization of service.

void ble_dfu_on_ble_evt | ( | ble_dfu_t * | p_dfu,
|  | ble_evt_t * | p_ble_evt
| ) |  |

Function for handling the Application's BLE Stack events.

Handles all events from the BLE stack of interest to the Battery Service.

Parameters

  [in] | p_dfu | DFU Service structure.
  [in] | p_ble_evt | Event received from the BLE stack.