implement a method that can set SN string descriptor at runtime.
but runtime SN and default SN configured in Kconfig must has the
same length.
Fixes: #6593
Signed-off-by: qianfan Zhao <qianfanguijin@163.com>
This patch reworks composite device support. It allows the
functions to be modular and the user to combine its own
functions with the USB functions of the Zephyr OS.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Introduce function to configure interface descriptor at runtime.
It is simple to leave the corresponding function to configure the
interface descriptor and fix bInterfaceNumber and iInterface values,
for example.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
This patch moves the descriptor parts to related class
and function drivers and extends the usb_fix_descriptor
function so that the wTotalLength and bNumInterfaces
are corrected before enumeration.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
This patch simplifies the handling of the string descriptors.
It introduces common macro for all string descriptors to
calculate the length of the bString.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
The Kconfig symbol CONFIG_USB_DEVICE_HID_BOOTP isn't defined anywhere,
so remove dead code associated with it.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This patch moves USB DFU class driver to subsys/usb/class.
For the first the USB DFU class driver depends on DFU image
manager and partition layout and is limited to use as an
application for the bootloader. The driver fetches the
information about the flash, erase block size, write block
size and partitions offset from the DT now. The driver has
two interfaces associated with the two partitions "SLOT-0"
and "SLOT-1". The "SLOT-0" can only be read.
In the following work the class driver can be extended so
that it can be used from the bootloader and update a flash
region directly from the bootloader.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Add CDC Ethernet Emulation Model function driver. This usb network
function can be used for ethernet over USB. Ethernet packet are
encapsulated within EEM packets. An EEM pkt contains 2-byte header
and 4-byte sentinel (or crc).
Note that EEM packets can be split across USB packets but shall not
be split across USB transfers.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Add common device descriptor for USB class devices.
The common descriptor allows easy configuration of Manufacturer,
Product, SerialNumber strings and PID/VID.
It also allows future support for composite devices.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>