Use the same scheme as for string descriptors. Descriptors can be added
or removed using the existend interface.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
We could reuse the BOS header, but there are parts that are only needed
in the legacy device support or used internally and the tests. Move this
parts to the appropriate places.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
It simplifies the macros to create the string descriptors. We also no
longer need placeholders for the SerialNumber descriptor when it is
generated from hwid. In the future, we can store other descriptor types
in the same list.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Move and rework string descriptor data to a separate structure so we can
share memory with another type. Also add description to the
USBD_DESC_STRING_DEFINE macro.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Add function to get string descriptor index and function
to remove linked descriptor from a device. This abstracts
it a bit so that the user does not need to know how it is
handled internally.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
s2ram procedure used RAM magic word for marking suspend-to-RAM. This
method may not work in some cases, e.g. when global reset does not
reset RAM content. In that case resuming from s2ram is detected when
global reset occurred.
RAM magic word method is the default but with
CONFIG_PM_S2RAM_CUSTOM_MARKING a custom implementation can be provided.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This commit upgrades the LE audio API and implementation
from experimental to unstable.
LE Audio have existing for quite a few years in Zephyr
and is not going anywhere, but at the same time it still
has significant effort remaining before it can be
considered stable.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Improve coap_client_cancel_requests(). Ensure it can be
called from a callback. Report error to waiting callbacks.
Clear active flag.
This is useful when the network becomes unavailable
or prior to disconnecting in order to save power.
Signed-off-by: Pete Skeggs <peter.skeggs@nordicsemi.no>
Use a structured channel specifier rather than a single enum when
specifying channels to read in the new read/decoder API.
Replaces usages of a seperate channel and channel_index parameter
where previously used with a struct sensor_chan_spec.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
adds size, offset and divice access macros that are
operating with nodes as an argumet.
Signed-off-by: Mateusz Michalek <mateusz.michalek@nordicsemi.no>
In order to support Linux rproc loading, some SOCs require
the boot-vector and irq-vectors to be placed into a defined
memory area for the mcu to boot.
This is necessary for NXP's IMX SOCs for instance but
can be leveraged by other SOCs that have multiple
zephyr,flash choices.
Signed-off-by: Jérémy LOCHE - MAKEEN Energy <jlh@makeenenergy.com>
Since a long is 64-bits on 64-bit architectures, and 32-bits
on 32-bit architectures, we can simplify the definition of
PRIQ_BITMAP_SIZE by defining it in terms of BITS_PER_LONG.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Set the default initial bitrates globally via Kconfig. The initial bitrates
can still be overridden using the "bus-speed" and "bus-speed-data"
devicetree properties.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
SDMMC framework frequency and timing selection logic has several
longstanding issues, including:
- requiring that SD hosts support the maximum frequency possible for a
given UHS mode in order to apply that timing
- selecting SDHC_TIMING_SDR25 for high speed mode, when SDHC_TIMING_HS
would be correct
Rework the frequency and timing selection logic within the SD framework
to resolve these issues.
Fixes#52589Fixes#67943
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Add UNSUPPORTED frequency macro for HS mode frequencies, used when a
card does not support any high speed mode frequencies
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Use frequency macros to define SD frequencies, this should increase
readability of the file and reduce errors.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
The default stack size of RFCOMM DLC is 256.
The default value is sufficient for basic operation.
If more stack space is used (such as call function printk)
in context of callback disconnected of RFCOMM DLC, the
default stack size is not sufficient.
Add a configuration BT_RFCOMM_DLC_STACK_SIZE to configure
the RFCOMM DLC stack size.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add macros to get Major Service Classes, Major Device
Class and Minor Device Class.
Define Major Device Class code.
Define Minor Device Class field for Computer Major
Class.
Define Minor Device Class field for Phone Major Class.
Define Minor Device Class field for Audio/Video Major
Class.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
There are controllers with capability to detect VBUS state change. This
can be used in a generic application to explicitly handle the VBUS
detected event after usbd_init() and for example allow the PMIC to
detect to what type of port device controller is connected.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
When Block-Wise transfer restarts, the post-write callback should
receive some indication that the block is actually a beginning of new,
instead of part of previous transfer.
Fixes#71351
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
The callback is only ever called when we received a
notification from the BASS server that the receive state is
removed, which cannot contain an error code.
Thus it does not make sense for the callback to have an
error code.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The new bindings for the stm32 xspi is for new stm32 devices with
XSPI peripherals like the stm32h5 serie. This is close to the octo-spi.
Adapt the flash controller constants to the XSPI model especially.
This is done through a new xspi.h definition file.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Add initial HID device support. Unlike the existing HID implementation,
the new implementation uses a devicetree to instantiate a HID device.
To the user, the HID device appears as a normal Zephyr RTOS device.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
For upcoming HID support in the new device stack and to provide API
backward compatibility, there must be no conditional definitions in the
header.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This function was used to shortcut HCI for combined host + controller
builds. It doesn't provide much value and adds complexity to the HCI
driver interface, so just remove it. This means vendor-specific HCI
commands is now the only way for the host to access the same
information.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
If CONFIG_HTTP_SERVER is not enabled, then we must not use
Kconfig symbols that are only available when HTTP server is
enabled.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Makes the update channels function optional, this is only
implemented in one driver so can be safely omitted from most
drivers
Signed-off-by: Jamie McCrae <spam@helper3000.net>
Checks that the supplied length is valid for the given driver
before passing it to the update function
Signed-off-by: Jamie McCrae <spam@helper3000.net>
Add a helper function for retrieving the system uptime in seconds
without having to do a second division.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Move the warning about code being autogenerated into the doxygen comment
instead of being added as a separate comment that then appears in the
`@return` text.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Doing a normal close for a websocket does not close the underlying
real socket. If we do not have fd for the real socket, then it is
not possible to fully close a websocket connection. As we are allocating
a websocket using websocket_register() in HTTP server use case,
create a websocket_unregister() that will close both the real
socket and the websocket socket.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
There are use cases where it's beneficial to trigger the log
thread to process log messages as soon as able instead of waiting
for the processing timer or threshold triggers. An example would be
to flush the log buffer before entering the idle thread after
forcing a system power state.
Signed-off-by: Corey Wharton <xodus7@cwharton.com>
Introduce z_page_frame_set() and z_page_frame_clear() to manipulate
flags. Obtain the virtual address using the existing
z_page_frame_to_virt(). This will make changes to the page frame
structure easier.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>