R1 code for micro:bit based train controller code, requires second micro:bit running rx code to operate - see https://meanderingpi.wordpress.com/ for more information

Fork of nrf51-sdk by Lancaster University

Embed: (wiki syntax)

« Back to documentation index

dfu.h File Reference

dfu.h File Reference

Go to the source code of this file.


typedef void(* dfu_callback_t )(uint32_t packet, uint32_t result, uint8_t *p_data)
 DFU event callback for asynchronous calls.


uint32_t dfu_init (void)
 Function for initializing the Device Firmware Update module.
void dfu_register_callback (dfu_callback_t callback_handler)
 Function for registering a callback listener for dfu_data_pkt_handle callbacks.
uint32_t dfu_start_pkt_handle (dfu_update_packet_t *p_packet)
 Function for setting the DFU image size.
uint32_t dfu_data_pkt_handle (dfu_update_packet_t *p_packet)
 Function for handling DFU data packets.
uint32_t dfu_init_pkt_handle (dfu_update_packet_t *p_packet)
 Function for handling DFU init packets.
uint32_t dfu_image_validate (void)
 Function for validating a transferred image after the transfer has completed.
uint32_t dfu_image_activate (void)
 Function for activating the transfered image after validation has successfully completed.
void dfu_reset (void)
 Function for reseting the current update procedure and return to initial state.
uint32_t dfu_bl_image_validate (void)
 Function for validating that new bootloader has been correctly installed.
uint32_t dfu_sd_image_validate (void)
 Function for validating that new SoftDevicehas been correctly installed.
uint32_t dfu_bl_image_swap (void)
 Function for swapping existing bootloader with newly received.
uint32_t dfu_sd_image_swap (void)
 Function for swapping existing SoftDevice with newly received.
uint32_t dfu_init_pkt_complete (void)
 Function for handling DFU init packet complete.

Detailed Description

Definition in file dfu.h.