Commit graph

57 commits

Author SHA1 Message Date
Julien D'Ascenzio fdf5dc384d usb: cdc_acm: fix bug on transmission
In the function tx_work_handler, a pointer to ring buffer data is given
to usb_transfer then the ring_buf_get_finish is called. So, the data is
mark as read (by ring_buf_get_finish) while the data are not yet
transferred to usb. If later a user send data, the pointer hold by usb
stack could be rewrite.

Signed-off-by: Julien D'Ascenzio <julien.dascenzio@paratronic.fr>
2022-06-28 16:58:51 +02:00
Rubin Gerritsen 77b8252da6 usb: bt_h4: Set stack sizes using Kconfig
The previously used stack sizes where in many cases too small.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2022-06-23 14:40:01 +02:00
Keith Packard abac6ccfaf subsys/usb: Fix use of 'abs' in computing when to report on_idle
idle_rate is uint8_t, sof_cnt is uint32_t. The result is uint32_t, which
is the wrong type for 'abs'. Explicitly cast idle_rate to uint32_t,
subtract sof_cnt and then explicitly cast to int32_t and then use abs,
storing the result in another int32_t which matches the return type for
abs.

This quiets clang warnings about passing unsigned values to abs.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-06-14 01:50:36 +09:00
Daniel DeGrasse e36c31a001 usb: dfu: Enable progressive erase for MCUX FlexSPI flash
Devices using the MCUX FlexSPI flash driver erase their flash too
slowly, causing the usb stack to freeze, and USB DFU utilities to
report a timeout. Enable IMG_ERASE_PROGRESSIVELY for SOCs using the
MCUX FlexSPI driver to prevent this error.

Fixes #45359

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-09 08:54:30 -05:00
Gerard Marull-Paretas 5113c1418d subsystems: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all subsystems code to
the new prefix <zephyr/...>. Note that the conversion has been scripted,
refer to zephyrproject-rtos#45388 for more details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-09 12:07:35 +02:00
Yuval Peress 53ef68d459 include: Prefix includes to use a scope
Move include paths and add new target_include_directories to support
backwards compatibility:
* /include -> /include/zephyr
  example: <irq.h> -> <zephyr/irq.h>

Issue #41543

Signed-off-by: Yuval Peress <peress@google.com>
2022-04-08 19:03:32 +02:00
Johann Fischer 6be45c2a18 usb: move USB device stack code to own directory
Until now the whole USB device stack code is located
in the top subsys/usb directory. Move it to own directory
in preparation for upcoming extension and rework of USB support.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-03-31 18:30:14 +02:00