All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
dfu.h File Reference

Definition for USB DFU interfaces. More...

Detailed Description

Definition for USB DFU interfaces.

Author
Dylan Laduranty dylan.nosp@m..lad.nosp@m.urant.nosp@m.y@me.nosp@m.sotic.nosp@m..com

Definition in file dfu.h.

#include <stdint.h>
#include "usb.h"
#include "usb/descriptor.h"
+ Include dependency graph for dfu.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  usb_desc_if_dfu_t
 USB DFU interface descriptor. More...
 
struct  dfu_get_status_pkt_t
 USB DFU get_status control request packet. More...
 

Macros

#define USB_IF_DESCRIPTOR_DFU   0x21
 USB DFU type descriptor.
 
#define USB_DFU_VERSION_BCD   0x0110
 USB DFU version in BCD.
 

Enumerations

enum  usb_dfu_state_t {
  USB_DFU_STATE_APP_IDLE , USB_DFU_STATE_APP_DETACH , USB_DFU_STATE_DFU_IDLE , USB_DFU_STATE_DFU_DL_SYNC ,
  USB_DFU_STATE_DFU_DL_BUSY , USB_DFU_STATE_DFU_DL_IDLE , USB_DFU_STATE_DFU_MANIFEST_SYNC , USB_DFU_STATE_DFU_MANIFEST ,
  USB_DFU_STATE_DFU_MANIFEST_WAIT_RST , USB_DFU_STATE_DFU_UP_IDLE , USB_DFU_STATE_DFU_ERROR
}
 USBUS DFU internal state. More...
 

Default USB detach timeout for DFU descriptor

#define USB_DFU_DETACH_TIMEOUT_MS   255
 

USB DFU interface attributes

#define USB_DFU_CAN_DOWNLOAD   0x01
 DFU Download attribute.
 
#define USB_DFU_CAN_UPLOAD   0x02
 DFU Upload attribute.
 
#define USB_DFU_MANIFEST_TOLERANT   0x04
 DFU Manifest tolerant attribute.
 
#define USB_DFU_WILL_DETACH   0x08
 DFU Detach capability attribute.
 

USB DFU interface type

#define USB_DFU_INTERFACE   0xFE /** Application Specific Interface */
 

USB DFU subclass types

#define USB_DFU_SUBCLASS_DFU   0x01
 DFU subclass.
 

USB DFU protocol types

#define USB_DFU_PROTOCOL_RUNTIME_MODE   0x01
 Runtime mode.
 
#define USB_DFU_PROTOCOL_DFU_MODE   0x02
 DFU mode.
 

USB DFU setup request

#define DFU_DETACH   0x00
 DFU Detach request.
 
#define DFU_DOWNLOAD   0x01
 DFU Download request.
 
#define DFU_UPLOAD   0x02
 DFU Upload request.
 
#define DFU_GET_STATUS   0x03
 DFU Get Status request.
 
#define DFU_CLR_STATUS   0x04
 DFU Clear Status request.
 
#define DFU_GET_STATE   0x05
 DFU Get State request.
 
#define DFU_ABORT   0x06
 DFU Abort request.