move misc/util.h to sys/util.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move misc/byteorder.h to sys/byteorder.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move misc/__assert.h to sys/__assert.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move ring_buffer.h to sys/ring_buffer.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move uart.h to drivers/uart.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move gpio.h to drivers/gpio.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move flash.h to drivers/flash.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move disk_access.h to disk/disk_access.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move flash_map.h to storage/flash_map.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
USBD_CFG_DATA_DEFINE macro has not consider that a class
could have more than one set of usb_cfg_data struct.
If a class has more than one set of usb_cfg_data
then they should be sorted the same way like by
USBD_DEVICE_DESCR_DEFINE macro.
Fixes: #16240
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Found a few annoying typos and figured I better run script and
fix anything it can find, here are the results...
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Parameter of set_interface_status is no more the interface index
but a pointer to interface descriptor.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Per guidelines, all statements should have braces around them. We do not
have a CI check for this, so a few went in unnoticed.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Fix handlers call for secondary descriptor.
USB class like DFU has two sets of descriptors. In the handler
look up function, wind the pointer forward to the range
of the current descriptor.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Remove duplicated execution path for composite configuration, USB
device stack initialization is done inside stack for both cases.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Now that Standard, Class and Vendor request handlers are using the same
buffer, we do not need to keep and array installed request data pointer.
This simplifies the code.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Now that we have merged the class and vendor request buffers into the
USB device code, we can also merge the standard request buffer. We just
need to ensure it is at least 8 bytes, by using the range option in
Kconfig. The 64KiB limit is arbitrary.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
In order to unify the legacy and composite code, move the class and
vendor request handler buffer into the USB device code, just like in
composite mode. The option is renamed from USB_COMPOSITE_BUFFER_SIZE
into USB_REQUEST_BUFFER_SIZE and also replaces the USB_DFU_MAX_XFER_SIZE
and USB_HID_MAX_PAYLOAD_SIZE options.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Fixes USB3CV Tool tests. One case is enabling endpoints with Set
Interface after Set Configuration. In this case we report warning and
continue without returning error.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Send ZLP when host asks for a bigger length and the last chunk
is wMaxPacketSize long, to indicate the last packet.
Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
Interface Association descriptor has to be used with Windows 7.
Add CONFIG_CDC_ACM_IAD option to force its usage, disabled by default.
Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
Unique PID is required for each sample in order
to be recognized by host.
When creating a new sample:
- Add USB_PID_<SAMPLE_NAME>_SAMPLE
in samples/subsys/usb/usb_pid.Kconfig
- Create Kconfig file in your sample's subdirectory, containing:
config USB_DEVICE_PID
default USB_PID_<SAMPLE_NAME>_SAMPLE
source "Kconfig.zephyr"
Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
Partially revert commit ea177e785c
("usb: dfu: set bwPollTimeout dynamically")
Introduced fix does not work proper because there is no way to be
sure that a control stage had success before start erase process.
Instead IMG_ERASE_PROGRESSIVELY configuration should be used
if the erase of the flash takes longer time.
resolves: #15497
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Fix set configuration request for a configuration without
specific endpoint like USB DFU class.
The changes introduced in commit 2b58594e90
("usb: device: Use set_endpoint helper for set_config")
does not take into account that a configuration could only
contain control endpoint.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Added check to see if CONFIG_BT_CTLR_TX_BUFFER_SIZE is defined,
and use that as the BT_L2CAP_MTU if that is the case. Otherwise,
use the previously hard coded MTU size (64). This enables users
to configure the MTU, enabling longer transfers.
The fix was inspired by how this is solved in
samples/bluetooth/hci_uart/src/main.c
Tested on nrf52840_pca10056.
Signed-off-by: Dennis Wildmark <dennis.wildmark@assaabloy.com>
Use new method for defining USB CDC ACM devices using UTIL_LISTIFY and
device count from menuconfig.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
DEVICE_COUNT for some USB classes means how many instances of the
class can be supported by USB stack.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Disable bulk slot image erase when progressive erase is on.
Erase of image bank is performed by image collection procedure
progressively.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Refactor code making set_endpoint() helper which check validity of
input parameters.
Fix bug with usb_set_configuration() always returning true.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Added bBreak, bRingSignal, bFraming, bParity and bOverRun
handling in cdc_acm_line_ctrl_set.
Reference: Chapter 6.5.4 of Universal Serial Bus Communications Class
Subclass Specification for PSTN Devices rev 1.2
Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>