nRF5 SDK v15.0.0
Modules | Data Structures | Macros | Typedefs | Functions
DFU transport

Generic Device Firmware Update (DFU) transport interface. More...

Modules

 DFU result codes
 When the DFU controller sends requests to the DFU bootloader on the DFU target, the DFU bootloader answers with any of these result codes.
 

Data Structures

struct  nrf_dfu_transport_s
 DFU transport registration. More...
 

Macros

#define DFU_TRANSPORT_REGISTER(trans_var)   NRF_SECTION_ITEM_REGISTER(dfu_trans, trans_var)
 Macro for registering a DFU transport by using section variables. More...
 

Typedefs

typedef struct nrf_dfu_transport_s nrf_dfu_transport_t
 Forward declaration of nrf_dfu_transport_t.
 
typedef uint32_t(* nrf_dfu_init_fn_t )(nrf_dfu_observer_t observer)
 Function type for initializing a DFU transport. More...
 
typedef uint32_t(* nrf_dfu_close_fn_t )(nrf_dfu_transport_t const *p_exception)
 Function type for closing down a DFU transport. More...
 

Functions

uint32_t nrf_dfu_transports_init (nrf_dfu_observer_t observer)
 Function for initializing all the registered DFU transports. More...
 
uint32_t nrf_dfu_transports_close (nrf_dfu_transport_t const *p_exception)
 Function for closing down all (with optional exception) the registered DFU transports. More...
 

Detailed Description

Generic Device Firmware Update (DFU) transport interface.

The DFU transport module defines a generic interface that must be implemented for each transport layer.

Macro Definition Documentation

#define DFU_TRANSPORT_REGISTER (   trans_var)    NRF_SECTION_ITEM_REGISTER(dfu_trans, trans_var)

Macro for registering a DFU transport by using section variables.

This macro places a variable in a section named "dfu_trans", which is initialized by nrf_dfu_transports_init.

Typedef Documentation

typedef uint32_t(* nrf_dfu_close_fn_t)(nrf_dfu_transport_t const *p_exception)

Function type for closing down a DFU transport.

This function closes down a DFU transport in a gentle way.

Parameters
[in]p_exceptionIf exception matches current transport closing should be omitted.
Return values
NRF_SUCCESSIf closing was successful for the transport. Any other return code indicates that the DFU transport could not be closed closed down.
typedef uint32_t(* nrf_dfu_init_fn_t)(nrf_dfu_observer_t observer)

Function type for initializing a DFU transport.

This function initializes a DFU transport. The implementation of the function must initialize DFU mode and stay in service until either the device is reset or the DFU operation is finalized. When the DFU transport receives requests, it should call nrf_dfu_req_handler_on_req for handling the requests.

Parameters
observerFunction for receiving DFU transport notifications.
Return values
NRF_SUCCESSIf initialization was successful for the transport. Any other return code indicates that the DFU transport could not be initialized.

Function Documentation

uint32_t nrf_dfu_transports_close ( nrf_dfu_transport_t const *  p_exception)

Function for closing down all (with optional exception) the registered DFU transports.

Parameters
[in]p_exceptionTransport which should not be closed. NULL if all transports should be closed.
Return values
NRF_SUCCESSIf all DFU transport were closed down successfully. Any other error code indicates that at least one DFU transport could not be closed down.
uint32_t nrf_dfu_transports_init ( nrf_dfu_observer_t  observer)

Function for initializing all the registered DFU transports.

Return values
NRF_SUCCESSIf all DFU transport were initialized successfully. Any other error code indicates that at least one DFU transport could not be initialized.

Documentation feedback | Developer Zone | Subscribe | Updated