Atmel Software Framework

usb_protocol_dfu.h File Reference

USB Device Firmware Upgrade (DFU) protocol definitions.

Copyright (c) 2011-2012 Atmel Corporation. All rights reserved.

Data Structures

struct  dfu_file_suffix_t
 DFU File Suffix. More...
 
struct  dfu_status_t
 DFU Status. More...
 
struct  usb_dfu_functional_desc_t
 DFU Descriptor. More...
 

Macros

#define USB_DFU_V1_0   0x0100
 Value for fields bcdDFU(Version) More...
 
Class value
#define DFU_CLASS   0xFE
 
SubClass value
#define DFU_SUBCLASS   0x01
 
protocol value
#define DFU_PROTOCOL   0x01
 
USB DFU Status IDs
#define DFU_STATUS_OK   0x00
 
#define DFU_STATUS_ERRTARGET   0x01
 
#define DFU_STATUS_ERRFILE   0x02
 
#define DFU_STATUS_ERRWRITE   0x03
 
#define DFU_STATUS_ERRERASE   0x04
 
#define DFU_STATUS_ERRCHECK_ERASED   0x05
 
#define DFU_STATUS_ERRPROG   0x06
 
#define DFU_STATUS_ERRVERIFY   0x07
 
#define DFU_STATUS_ERRADDRESS   0x08
 
#define DFU_STATUS_ERRNOTDONE   0x09
 
#define DFU_STATUS_ERRFIRMWARE   0x0A
 
#define DFU_STATUS_ERRVENDOR   0x0B
 
#define DFU_STATUS_ERRUSBR   0x0C
 
#define DFU_STATUS_ERRPOR   0x0D
 
#define DFU_STATUS_ERRUNKNOWN   0x0E
 
#define DFU_STATUS_ERRSTALLEDPK   0x0F
 
USB DFU State IDs
#define DFU_STATE_APPIDLE   0x00
 
#define DFU_STATE_APPDETACH   0x01
 
#define DFU_STATE_DFUIDLE   0x02
 
#define DFU_STATE_DFUDNLOAD_SUNC   0x03
 
#define DFU_STATE_DFUDNBUSY   0x04
 
#define DFU_STATE_DFUDNLOAD_IDLE   0x05
 
#define DFU_STATE_DFUMANIFEST_SYNC   0x06
 
#define DFU_STATE_DFUMANIFEST   0x07
 
#define DFU_STATE_DFUMANIFEST_WAIT_RESET   0x08
 
#define DFU_STATE_DFUUPLOAD_IDLE   0x09
 
#define DFU_STATE_DFUERROR   0x0A
 

Enumerations

enum  usb_descriptor_type_dfu { USB_DT_DFU_FUNCTIONAL = 0x21 }
 DFU USB descriptor types. More...
 
enum  usb_dfu_functional_attributes {
  USB_DFU_FONC_CAN_DNLOAD = (1 << 0),
  USB_DFU_FONC_CAN_UPLOAD = (1 << 1),
  USB_DFU_FONC_MANIFEST_TOLERANT = (1 << 2),
  USB_DFU_FONC_WILL_DETACH = (1 << 3)
}
 DFU Functional attributes. More...
 
enum  usb_reqid_dfu {
  USB_REQ_DFU_DETACH = 0x00,
  USB_REQ_DFU_DNLOAD = 0x01,
  USB_REQ_DFU_UPLOAD = 0x02,
  USB_REQ_DFU_GETSTATUS = 0x03,
  USB_REQ_DFU_CLRSTATUS = 0x04,
  USB_REQ_DFU_GETSTATE = 0x05,
  USB_REQ_DFU_ABORT = 0x06
}
 DFU USB requests (bRequest) More...