Serial DFU transport layer

nRF5 SDK v13.1.0

Device Firmware Update (DFU) transport layer using UART. More...

Data Structures

struct serial_dfu_t
DFU transport layer state. More...

Functions

uint32_t serial_dfu_transport_init (void)
Function for initializing the transport layer. More...
uint32_t serial_dfu_transport_close (void)
Function for closing down the transport layer. More...

Detailed Description

Device Firmware Update (DFU) transport layer using UART.

The transport layer can be used for performing firmware updates over UART. The implementation uses SLIP to encode packets.

Enumeration Type Documentation

Serial DFU opcodes.

Enumerator
SERIAL_DFU_OP_CODE_CREATE_OBJECT

Value of the opcode field for a 'Create object' request.

SERIAL_DFU_OP_CODE_SET_RECEIPT_NOTIF

Value of the opcode field for a 'Set Packet Receipt Notification' request.

SERIAL_DFU_OP_CODE_CALCULATE_CRC

Value of the opcode field for a 'Calculating checksum' request.

SERIAL_DFU_OP_CODE_EXECUTE_OBJECT

Value of the opcode field for an 'Initialize DFU parameters' request.

SERIAL_DFU_OP_CODE_SELECT_OBJECT

Value of the opcode field for a 'Select object' request.

SERIAL_DFU_OP_CODE_GET_SERIAL_MTU

Value of the opcode field for a 'Get Serial MTU' request.

SERIAL_DFU_OP_CODE_WRITE_OBJECT

Value of the opcode indicating a write to the current object.

SERIAL_DFU_OP_CODE_RESPONSE

Value of the opcode field for a response.

Function Documentation

uint32_t serial_dfu_transport_close ( void )

Function for closing down the transport layer.

Return values
NRF_SUCCESS If the transport layer was correctly closed down.
uint32_t serial_dfu_transport_init ( void )

Function for initializing the transport layer.

Return values
NRF_SUCCESS If the transport layer was successfully initialized. Otherwise, an error code is returned.