| LPCOpen Platform v1.03 LPCOpen Platform for NXP LPC Microcontrollers

- Main Page
- Modules
- Data Structures
- Files
- Related Pages

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations
usbd_dfu.h File Reference
`#include "usbd.h"`

Go to the source code of this file.

## Macros
#define | USB_DFU_IF_NUM 0x0
#define | USB_DFU_DESCRIPTOR_TYPE 0x21
#define | USB_DFU_DESCRIPTOR_SIZE 9
#define | USB_DFU_SUBCLASS 0x01
#define | USB_DFU_XFER_SIZE 2048
#define | USB_REQ_DFU_DETACH 0x00
#define | USB_REQ_DFU_DNLOAD 0x01
#define | USB_REQ_DFU_UPLOAD 0x02
#define | USB_REQ_DFU_GETSTATUS 0x03
#define | USB_REQ_DFU_CLRSTATUS 0x04
#define | USB_REQ_DFU_GETSTATE 0x05
#define | USB_REQ_DFU_ABORT 0x06
#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_errSTALLEDPKT 0x0f
#define | DFU_EP0_NONE 0
#define | DFU_EP0_UNHANDLED 1
#define | DFU_EP0_STALL 2
#define | DFU_EP0_ZLP 3
#define | DFU_EP0_DATA 4
#define | USB_DFU_CAN_DOWNLOAD (1 << 0)
#define | USB_DFU_CAN_UPLOAD (1 << 1)
#define | USB_DFU_MANIFEST_TOL (1 << 2)
#define | USB_DFU_WILL_DETACH (1 << 3)
#define | DFU_FUNC_DESC_SIZE sizeof(USB_DFU_FUNC_DESCRIPTOR)
#define | DFU_GET_STATUS_SIZE 0x6

## Enumerations
enum | dfu_state { DFU_STATE_appIDLE = 0, DFU_STATE_appDETACH = 1, DFU_STATE_dfuIDLE = 2, DFU_STATE_dfuDNLOAD_SYNC = 3, DFU_STATE_dfuDNBUSY = 4, DFU_STATE_dfuDNLOAD_IDLE = 5, DFU_STATE_dfuMANIFEST_SYNC = 6, DFU_STATE_dfuMANIFEST = 7, DFU_STATE_dfuMANIFEST_WAIT_RST = 8, DFU_STATE_dfuUPLOAD_IDLE = 9, DFU_STATE_dfuERROR = 10, DFU_STATE_appIDLE = 0, DFU_STATE_appDETACH = 1, DFU_STATE_dfuIDLE = 2, DFU_STATE_dfuDNLOAD_SYNC = 3, DFU_STATE_dfuDNBUSY = 4, DFU_STATE_dfuDNLOAD_IDLE = 5, DFU_STATE_dfuMANIFEST_SYNC = 6, DFU_STATE_dfuMANIFEST = 7, DFU_STATE_dfuMANIFEST_WAIT_RST = 8, DFU_STATE_dfuUPLOAD_IDLE = 9, DFU_STATE_dfuERROR = 10 }

## Macro Definition Documentation

#define DFU_EP0_DATA 4

Definition at line 94 of file usbd_dfu.h.

#define DFU_EP0_NONE 0

Definition at line 90 of file usbd_dfu.h.

#define DFU_EP0_STALL 2

Definition at line 92 of file usbd_dfu.h.

#define DFU_EP0_UNHANDLED 1

Definition at line 91 of file usbd_dfu.h.

#define DFU_EP0_ZLP 3

Definition at line 93 of file usbd_dfu.h.

#define DFU_FUNC_DESC_SIZE sizeof(USB_DFU_FUNC_DESCRIPTOR)

Definition at line 119 of file usbd_dfu.h.

#define DFU_GET_STATUS_SIZE 0x6

Definition at line 120 of file usbd_dfu.h.

#define DFU_STATUS_errADDRESS 0x08

Definition at line 67 of file usbd_dfu.h.

#define DFU_STATUS_errCHECK_ERASED 0x05

Definition at line 64 of file usbd_dfu.h.

#define DFU_STATUS_errERASE 0x04

Definition at line 63 of file usbd_dfu.h.

#define DFU_STATUS_errFILE 0x02

Definition at line 61 of file usbd_dfu.h.

#define DFU_STATUS_errFIRMWARE 0x0a

Definition at line 69 of file usbd_dfu.h.

#define DFU_STATUS_errNOTDONE 0x09

Definition at line 68 of file usbd_dfu.h.

#define DFU_STATUS_errPOR 0x0d

Definition at line 72 of file usbd_dfu.h.

#define DFU_STATUS_errPROG 0x06

Definition at line 65 of file usbd_dfu.h.

#define DFU_STATUS_errSTALLEDPKT 0x0f

Definition at line 74 of file usbd_dfu.h.

#define DFU_STATUS_errTARGET 0x01

Definition at line 60 of file usbd_dfu.h.

#define DFU_STATUS_errUNKNOWN 0x0e

Definition at line 73 of file usbd_dfu.h.

#define DFU_STATUS_errUSBR 0x0c

Definition at line 71 of file usbd_dfu.h.

#define DFU_STATUS_errVENDOR 0x0b

Definition at line 70 of file usbd_dfu.h.

#define DFU_STATUS_errVERIFY 0x07

Definition at line 66 of file usbd_dfu.h.

#define DFU_STATUS_errWRITE 0x03

Definition at line 62 of file usbd_dfu.h.

#define DFU_STATUS_OK 0x00

Definition at line 59 of file usbd_dfu.h.

#define USB_DFU_CAN_DOWNLOAD (1 << 0)

Definition at line 96 of file usbd_dfu.h.

#define USB_DFU_CAN_UPLOAD (1 << 1)

Definition at line 97 of file usbd_dfu.h.

#define USB_DFU_DESCRIPTOR_SIZE 9

Definition at line 46 of file usbd_dfu.h.

#define USB_DFU_DESCRIPTOR_TYPE 0x21

Definition at line 45 of file usbd_dfu.h.

#define USB_DFU_IF_NUM 0x0

If USB device is only DFU capable, DFU Interface number is always 0. if USB device is (DFU + Other Class (Audio/Mass Storage/HID), DFU Interface number should also be 0 in this implementation.

Definition at line 43 of file usbd_dfu.h.

#define USB_DFU_MANIFEST_TOL (1 << 2)

Definition at line 98 of file usbd_dfu.h.

#define USB_DFU_SUBCLASS 0x01

Definition at line 47 of file usbd_dfu.h.

#define USB_DFU_WILL_DETACH (1 << 3)

Definition at line 99 of file usbd_dfu.h.

#define USB_DFU_XFER_SIZE 2048

Definition at line 48 of file usbd_dfu.h.

#define USB_REQ_DFU_ABORT 0x06

Definition at line 57 of file usbd_dfu.h.

#define USB_REQ_DFU_CLRSTATUS 0x04

Definition at line 55 of file usbd_dfu.h.

#define USB_REQ_DFU_DETACH 0x00

Definition at line 51 of file usbd_dfu.h.

#define USB_REQ_DFU_DNLOAD 0x01

Definition at line 52 of file usbd_dfu.h.

#define USB_REQ_DFU_GETSTATE 0x05

Definition at line 56 of file usbd_dfu.h.

#define USB_REQ_DFU_GETSTATUS 0x03

Definition at line 54 of file usbd_dfu.h.

#define USB_REQ_DFU_UPLOAD 0x02

Definition at line 53 of file usbd_dfu.h.

## Enumeration Type Documentation

enum dfu_state

Enumerator:

  DFU_STATE_appIDLE |
  DFU_STATE_appDETACH |
  DFU_STATE_dfuIDLE |
  DFU_STATE_dfuDNLOAD_SYNC |
  DFU_STATE_dfuDNBUSY |
  DFU_STATE_dfuDNLOAD_IDLE |
  DFU_STATE_dfuMANIFEST_SYNC |
  DFU_STATE_dfuMANIFEST |
  DFU_STATE_dfuMANIFEST_WAIT_RST |
  DFU_STATE_dfuUPLOAD_IDLE |
  DFU_STATE_dfuERROR |
  DFU_STATE_appIDLE |
  DFU_STATE_appDETACH |
  DFU_STATE_dfuIDLE |
  DFU_STATE_dfuDNLOAD_SYNC |
  DFU_STATE_dfuDNBUSY |
  DFU_STATE_dfuDNLOAD_IDLE |
  DFU_STATE_dfuMANIFEST_SYNC |
  DFU_STATE_dfuMANIFEST |
  DFU_STATE_dfuMANIFEST_WAIT_RST |
  DFU_STATE_dfuUPLOAD_IDLE |
  DFU_STATE_dfuERROR |

Definition at line 76 of file usbd_dfu.h.