USB DFU device update API.
More...
USB DFU device update API.
◆ USBD_DFU_DEFINE_IMG
#define USBD_DFU_DEFINE_IMG |
( |
|
id, |
|
|
|
iname, |
|
|
|
ipriv, |
|
|
|
iread, |
|
|
|
iwrite, |
|
|
|
inext |
|
) |
| |
#include <include/zephyr/usb/class/usbd_dfu.h>
Value:
\
USBD_DESC_STRING_DEFINE(usbd_dfu_str_##id, iname, USBD_DUT_STRING_INTERFACE); \
\
.name = iname, \
.if_desc = &usbd_dfu_iface_##id, \
.priv = ipriv, \
.sd_nd = &usbd_dfu_str_##id, \
.read_cb = iread, \
.write_cb = iwrite, \
.next_cb = inext, \
}
#define STRUCT_SECTION_ITERABLE(struct_type, varname)
Defines a new element for an iterable section.
Definition iterable_sections.h:216
USB Standard Interface Descriptor defined in spec.
Definition usb_ch9.h:193
Define USB DFU image.
Use this macro to create USB DFU image
The callbacks must be in form:
uint8_t buf[
static CONFIG_USBD_DFU_TRANSFER_SIZE])
{
int len;
return len;
}
const uint8_t buf[
static CONFIG_USBD_DFU_TRANSFER_SIZE])
{
return 0;
}
static bool next(void *const priv,
{
return true;
}
state
Definition parser_state.h:29
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
usb_dfu_state
Definition usbd_dfu.h:80
- Parameters
-
id | Identifier by which the linker sorts registered images |
iname | Image name as used in interface descriptor |
iread | Image read callback |
iwrite | Image write callback |
inext | Notify/confirm next state |