nRF5 SDK v12.1.0
Data Structures | Macros | Typedefs | Enumerations | Functions
Buttonless DFU Service

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

Enumerator
DFU_OP_RESERVED 

Reserved for future use.

DFU_OP_ENTER_BOOTLOADER 

Enter bootloader.

DFU_OP_RESPONSE_CODE 

Response code.

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.

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_dfuDFU Service structure.
[in]p_dfu_initThe 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_dfuDFU Service structure.
[in]p_ble_evtEvent received from the BLE stack.

Documentation feedback | Developer Zone | Subscribe | Updated