|
USBIP C library 0.7.0
Virtual USB devices & host drivers over USB/IP
|
USB DFU (Device Firmware Upgrade) device class, DFU 1.1. More...
#include "usb_class.h"Data Structures | |
| struct | dfu_target |
| One DFU target == one alternate setting == one app-supplied linear byte store. More... | |
| struct | dfu_opts |
| DFU configuration: the target table + DFU functional-descriptor parameters. More... | |
Typedefs | |
| typedef struct dfu_iface | dfu_iface |
| One DFU interface: a single instance of the class on a device. | |
Enumerations | |
| enum | dfu_status { DFU_STATUS_OK , DFU_STATUS_errTARGET , DFU_STATUS_errFILE , DFU_STATUS_errWRITE , DFU_STATUS_errERASE , DFU_STATUS_errCHECK_ERASED , DFU_STATUS_errPROG , DFU_STATUS_errVERIFY , DFU_STATUS_errADDRESS , DFU_STATUS_errNOTDONE , DFU_STATUS_errFIRMWARE , DFU_STATUS_errVENDOR , DFU_STATUS_errUSBR , DFU_STATUS_errPOR , DFU_STATUS_errUNKNOWN , DFU_STATUS_errSTALLEDPKT } |
| DFU bStatus codes (DFU 1.1 Sec.6.1.2), reported to the host via DFU_GETSTATUS. More... | |
Functions | |
| dfu_iface * | dfu_add (usbip_device *dev, const dfu_opts *opts) |
| Add a DFU interface to a device (one alternate setting per target). | |
Variables | |
| const usbip_device_class | usbip_device_dfu |
| The DFU class, for usbip_device_add_class() | |
USB DFU (Device Firmware Upgrade) device class, DFU 1.1.
Presents a DFU-mode device (bInterfaceProtocol 0x02, already in dfuIDLE) that dfu-util can UPLOAD from / DOWNLOAD to. One alternate setting per target. The class makes NO assumption about what backs a target - a file, a flash part, whatever: each target is a linear byte store described by the callbacks below, supplied by the application (see examples/device/dfu_device.c for a file backend). DFU is entirely EP0 control transfers, so this needs no USB/IP transport support. Pairs with usbip_function_enable_winusb() (done for you when opts.winusb is set) for automatic WinUSB binding on Windows.
Built only on the public API (usbip_device.h). Mirrors python classes/device/dfu.py.