| 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 | Functions
DFU transport
Bootloader modules

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

## Data Structures
struct | nrf_dfu_transport_t
| DFU transport registration. More...

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

## Typedefs
typedef uint32_t(* | nrf_dfu_init_fn_t )(void)
| Function type for initializing a DFU transport. More...
typedef uint32_t(* | nrf_dfu_disconnect_fn_t )(void)
| Function type for closing down a DFU transport. More...

## Functions
uint32_t | nrf_dfu_transports_init (void)
| Function for initializing all the registered DFU transports. More...
uint32_t | nrf_dfu_transports_close (void)
| Function for closing down all 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_VARS_REGISTER_VAR(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_disconnect_fn_t)(void)

Function type for closing down a DFU transport.

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

Return values

  NRF_SUCCESS | If 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)(void)

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.

Return values

  NRF_SUCCESS | If 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 | ( | void |  | ) |

Function for closing down all the registered DFU transports.

Return values

  NRF_SUCCESS | If 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 | ( | void |  | ) |

Function for initializing all the registered DFU transports.

Return values

  NRF_SUCCESS | If all DFU transport were initialized successfully. Any other error code indicates that at least one DFU transport could not be initialized.