The USB host will have to select the appropriate size for the configurtion
descriptor, and the defaults will not be enough for some classes that
encode a lot of information in the configuration descriptor.
Add logging to debug this.
Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
Add tests making sure the USB Host class APIs introduced build
and run as expected. Use USB device samples common code for
initialization.
Co-authored-by: Johann Fischer <johann.fischer@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
Allocate a larger size to keep room for a nil descriptor at the end of
the configuration descriptor. This is used to walk through the list of
descriptors until this empty descriptor happens.
Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
Make sure that there is at least enough room for the header before
dereferencing the fields such as bLength.
Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
Move the UVC header with all the definitions from the UVC standard to
share it between USB host and device class implementation.
Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
Add functions to probe/remove all classes as part of a new usbh_class.c
and a matching usbh_class.h. These functions are called from the function
usbh_init_device_intl() in usbh_core.c to initialize every class upon
connection of a device. Every class driver provide filters to match the
interfaces of the device.
Co-authored-by: Aiden Hu <weiwei.hu@nxp.com>
Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
Add basic functions to initialize and probe class drivers.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
Add helpers to parse and validate USB descriptors.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
In addition to storing the interface pointers, also store the pointers
for the interface association. Also add comments to the other fields
of the structs to adapt to a new CI check.
Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
Add API wrappers around the function pointers in struct usbh_class_api,
while also documenting the USB host class internal API.
Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
Add a "struct usbh_class_api" for the host implementation, and move all
the function poitners to it. Add more fields to "struct usbh_class_data".
Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
Add a "struct usbh_status" that contains a bitmask of flags to keep
track of the global state of the host context, like done for the
device_next implementation.
Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
Recent changes (6e65fbe585) deprecated Kconfig configuration for
TIMER that is used for bytes counting. In one place code was not
cleared correctly which results in compilation failure when
deprecated symbol is used.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
When pykwalify was changed to jsonschema in commit 58bf2dc the optionality
of 'click-through' was lost. Fix this by making sure there's always a value
in the dictionary, eliminating the following error when the key is missing:
if blob['click-through'] and not args.auto_accept:
~~~~^^^^^^^^^^^^^^^^^
KeyError: 'click-through'
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Rename variable 'ret' to 'err' in cmd_send_media() to align with
Zephyr coding conventions for error return values.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
Add additional business check to waiting SUSPF to be set so
that the loop cannot be executed forever when the dma stream
is idle.
When the stream is not busy, then there is nothing to suspend.
However, if suspend was attempted for an idle stream, then the
changed loop waited forever SUSPF to be set. This could have
happened at least when serial api tx_abort() is called with
stm32u5 and tx dma transfer becoming ready about the same time
the tx_abort() API is called.
Fixes#103042
Signed-off-by: Miika Karanki <miika.karanki@vaisala.com>
1. Rename the queue structure from i2s_txq_entry to
i2s_mcux_q_entry
2. Renamed NUM_RX_DMA_BLOCKS to NUM_DMA_BLOCKS
3. Changed config_dma_blocks function to take
struct i2s_mcux_q_entry * as an argument.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
- Name derived from Zephyr cyclictest
- Inspired by Linux realtime test program cyclictest
- Measure latency of interrupt service routine as well as thread with the
help of the timer interrupt, of which the programmed point of time is
known.
- Zyclictest thread is running in background while individual application
under test can be running in foreground.
- The interval can be set up with optional argument -i. It should be at
least double of expected worst case thread latency to get valid output.
If this is not met the measurement needs to be repeated.
- The priority can also be set up. It should be the priority of the
application which should run on the final product.
- The maximum size of the histogram is hard coded to 200 so far.
- After stopping measurement the maximum latency, number of errors /
overflows and the histogram itself is printed.
- Histogram is printed in a form which is easy to be used by plotting
programs like GNUplot or Python matplotlib.
- Example: One wants to know what is the expected maximum latency of a
cooperative task with priority of -10.
$ zyclictest start -i 400 -p -10
$ # start your application test cases
$ zyclictest stop
Count: 547329
IRQ Thread
Max-Latency: 21 27
Errors: 0 0
Overflow: 0 0
Histogram:
...
23 0 547306
24 0 2
25 0 5
26 0 5
27 0 2
Signed-off-by: Andreas Klinger <ak@it-klinger.de>
Add pressure policy to cpu_freq subsystem. The
pressure policy evaluates system load by accumulating
the priorities of runnable threads to inform P-state
transitions.
As more threads of higher priorities queue as ready
in the scheduluer, the system pressure increases
and the policy may decide to choose a more aggressive
P-state.
Signed-off-by: Sean Kyer <sean.actor@gmail.com>
Update the name of the on_demand policy sample
to be scoped to the on_demand policy instead
of the cpu_freq subsystem as a whole.
Signed-off-by: Sean Kyer <sean.actor@gmail.com>
Enchance the cpu_freq subsystem to remember the latest
pstate and skip calling the pstate_set function if
the next pstate is the same as the last.
Signed-off-by: Sean Kyer <sean.actor@gmail.com>
Currently, the driver does not acknowledge error interrupts from
the device, resulting in the IRQ being continuously set in certain
cases. Add writes to acknowledge these interrupts.
Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
Add shell command for testing BR/EDR inquiry scan parameters update.
Supports default parameter set and custom parameters via interval/
window/type arguments for inquiry scan configuration.
Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
Implement BR/EDR inquiry scan parameters update functionality with
new API bt_br_inquiry_scan_update_param(). Adds support for setting
inquiry scan interval, window and type via HCI commands. Includes
default parameter set for standard inquiry scanning.
Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
Implement BR/EDR page scan parameters update functionality with new
API bt_br_page_scan_update_param(). Adds support for setting page scan
interval, window and type (standard/interlaced) via HCI commands.
Includes predefined parameter sets for different Bluetooth versions
and use cases.
Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
This commit implements Class of Device (COD) test shell
functionality for Classic Bluetooth, supporting both
setting and retrieving COD from the controller.
Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
This commit implements Class of Device (COD) functionality for
Classic Bluetooth, supporting both setting and retrieving COD
from the controller by bt_br_write_cod and bt_br_read_cod.
Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
Add SB_CONFIG_SOC_RA_START_SECOND_CORE for Renesas RA8P1
SoC to support building a minimal launcher image that
starts the second core on Renesas RA SoCs via sysbuild
Signed-off-by: Khai Cao <khai.cao.xk@renesas.com>
Allow applications to respond to HTTP OPTIONS requests (e.g. CORS pre-
flight) by routing OPTIONS through the same dynamic handler path
as GET/DELETE.
This enables OPTIONS handling for both HTTP/1.1 and HTTP/2.
Signed-off-by: Robert Eichinger <robert.eichinger@bshg.com>
Add support for display orientation to the SDL display driver by
implementing the set_orientation API.
It will rotate around the center point.
Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
There is no need for it to have a different type than the packet data. The
variable is never checked for negativity and is only used when ts_gwinfo is
non zero, in which case client_radius must have been set as well.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
The internals of an NVMEM cell should be kept private, and needs to be
interacted with using an API.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
The AnyNode class has a `size` property which hides the value sourced from
JSON key 'size', resulting in the script displaying nonsense. Consume the
proper value by directly accessing the __dict__ which holds it instead of
relying on the dot operator.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
As per Zephyr coding guideline #59, "operands shall not be of an
inappropriate essential type". This makes sure boolean variables are
assigned true/false values, not 1/0.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
As per Zephyr coding guideline #59, "operands shall not be of an
inappropriate essential type". This makes sure boolean variables are
assigned true/false values, not 1/0.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
As per Zephyr coding guideline #59, "operands shall not be of an
inappropriate essential type". This makes sure boolean variables are
assigned true/false values, not 1/0.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
As per Zephyr coding guideline #59, "operands shall not be of an
inappropriate essential type". This makes sure boolean variables are
assigned true/false values, not 1/0.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
As per Zephyr coding guideline #59, "operands shall not be of an
inappropriate essential type". This makes sure boolean variables are
assigned true/false values, not 1/0.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
As per Zephyr coding guideline #59, "operands shall not be of an
inappropriate essential type". This makes sure boolean variables are
assigned true/false values, not 1/0.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>