|
PebbleOS v4.47.0-757-g12b6c531f
|
Device Firmware Upgrade 1.1, in DFU mode: a host downloads an image to a flash partition and uploads it back, as with dfu-util. More...
Data Structures | |
| struct | pbl_usb_dfu_region |
| A flash partition the host can download to and upload from. More... | |
Macros | |
| #define | PBL_USB_DFU_REGION_DEFINE(_name, _part) |
| Define a region of the function. | |
Device Firmware Upgrade 1.1, in DFU mode: a host downloads an image to a flash partition and uploads it back, as with dfu-util.
The function takes the interface after the serial port's, or interface 0 without it, and only endpoint 0. The partition it writes is a region the application defines with PBL_USB_DFU_REGION_DEFINE(): the function erases its subsectors as the download reaches them, and never writes outside it. A download starts at the beginning of the region, an upload reads it whole, ending with a short block. The flash work runs on the system work queue, while the host polls the status.
| struct pbl_usb_dfu_region |
A flash partition the host can download to and upload from.
| Data Fields | ||
|---|---|---|
| struct pbl_flash_partition | part | Partition. |
| #define PBL_USB_DFU_REGION_DEFINE | ( | _name, | |
| _part | |||
| ) |
Define a region of the function.
Only one region is supported, alternate setting 0 of the interface.
| _name | Name of the region. |
| _part | Partition, as the prefix of its _OFFSET and _SIZE constants, e.g. PART_DFU. |