nRF5 SDK v14.2.0
Data Structures | Macros | Enumerations | Functions
USB DFU Transport layer

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

Data Structures

struct  usb_dfu_t
 DFU Service. More...
 

Macros

#define SECURE_DFU_USB_MTU   64
 

Enumerations

enum  usb_dfu_op_code_t {
  USB_DFU_OP_CODE_CREATE_OBJECT = 0x01,
  USB_DFU_OP_CODE_SET_RECEIPT_NOTIF = 0x02,
  USB_DFU_OP_CODE_CALCULATE_CRC = 0x03,
  USB_DFU_OP_CODE_EXECUTE_OBJECT = 0x04,
  USB_DFU_OP_CODE_SELECT_OBJECT = 0x06,
  USB_DFU_OP_CODE_GET_SERIAL_MTU = 0x07,
  USB_DFU_OP_CODE_WRITE_OBJECT = 0x08,
  USB_DFU_OP_CODE_RESPONSE = 0x60
}
 USB DFU opcodes. More...
 

Functions

uint32_t usb_dfu_transport_init (void)
 Function for initializing the transport layer. More...
 
uint32_t usb_dfu_transport_close (void)
 Function for closing down the transport layer. More...
 

Detailed Description

Device Firmware Update (DFU) transport layer using USB.

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

Enumeration Type Documentation

USB DFU opcodes.

Enumerator
USB_DFU_OP_CODE_CREATE_OBJECT 

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

USB_DFU_OP_CODE_SET_RECEIPT_NOTIF 

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

USB_DFU_OP_CODE_CALCULATE_CRC 

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

USB_DFU_OP_CODE_EXECUTE_OBJECT 

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

USB_DFU_OP_CODE_SELECT_OBJECT 

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

USB_DFU_OP_CODE_GET_SERIAL_MTU 

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

USB_DFU_OP_CODE_WRITE_OBJECT 

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

USB_DFU_OP_CODE_RESPONSE 

Value of the opcode field for a response.

Function Documentation

uint32_t usb_dfu_transport_close ( void  )

Function for closing down the transport layer.

Return values
NRF_SUCCESSIf the transport layer was correctly closed down.
uint32_t usb_dfu_transport_init ( void  )

Function for initializing the transport layer.

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

Documentation feedback | Developer Zone | Subscribe | Updated