Add all the base controls present like they are in Linux into Zephyr,
limited to those that can apply in the current system:
- Buttons are left as integer for now.
- Some description is modified to fit the Zephyr situation.
- For the minimum number of buffer, Zephyr uses a different mechanism.
- No audio support through the video subsystem.
- Homogenize the wording
Signed-off-by: Josuah Demangeon <me@josuah.net>
This patch fixes previous overriding of ODR setting through DTS (it
would always be 25-Hz, irrespective of what the DTS property said).
While doing so, create dt-binding enum to improve settings clarity.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
A previous PR merged (to remove runtime observers' dependency with heap)
added inconsistencies and compatibility breaks to the zbus. This commit
improves that by removing the inconsistencies and still attending to the
features requested by the community.
Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
if the provided name in argument is not null this could lead to un
undefined behavior.
Use strnlen to make this safe
Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
Add a function to get the value's length of a Key. If it doesn't exist
returns 0.
Add ZMS implementation for csi_get_val_len() and a default implementation
for the other storage systems.
Add some functional tests to verify it.
Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
Add a a function settings_load_one that allows to load only one settings
entry instead of a complete subtree.
Add as well its implementation for ZMS backend.
This will allow a faster return if the Settings entry doesn't exist in
the persistent storage.
Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
Silabs siwx91x includes a memory controller for (Quad-)SPI PSRAM. It
allows the application to use the PSRAM as if it was any other RAM.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
The reference manual and the schematics of the reference designs
numbers the pins from 0 to 57. So let's also apply this scheme to the
pinctrl.
Note while PIN are numbered between 0 and 64, the GPIOs are represented
with 4 block of 16 GPIOs. This is the way the GPIOs are documented in
the reference manual, so we don't change that (In addition,
gpio_port_pins_t is a uint32_t, so it won't be possible to represent 64
GPIOs in one gpio_port_pins_t anyway).
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
We're well past the experimental stage, but there are still some things
that may change. Bumping the API version to 0.2.0 signals this.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Add a reusable uart-bridge driver that echoes data between two serial
devices. It's mainly meant to be used with one of the devices being an
USB CDC-ACM, the data is buffered, there's a pause feature to stop the
USB endpoint when the hardware UART is filling up to avoid overrun and
there's a helper function used to propagate the USB uart configuration
to the hardware one.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Change the on/off/set_brightness API to automatically use whatever
function is available, this allows dimmable drivers to not implement the
on/off wrapper and vice versa.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The API specifies that brightness is 0 to 100, no point checking it in
the individual drivers.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The led_set_brightness API says that brightness is defined as
percentage, add a macro from the max and use it everywhere.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
For the control point operations, add/modify/
remove source, callbacks are added so that Application
can decide whether to accept/reject the control point
operations.
Signed-off-by: Nithin Ramesh Myliattil <niym@demant.com>
Add enabled_clock, on / off and configure support for the clocks of
the stm32mp13. Describes the peripheral clock source selection.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
This commit adds following updates to MAX32650 SoC:
- Divide SRAM to sections according to UG.
- Add DMA and SPI nodes
- Add WDT nodes without adding clock property
- Include dma binding to SoC dts file.
Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
Signed-off-by: Burak Babaoglu <burak.babaoglu@analog.com>
gettimeofday() was already implemented, but incorrectly lumped into
POSIX_TIMERS.
putenv() is really just a wrapper around setenv().
The only one left to implement was gethostid() which was relatively
trivial.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Since we are taking a double pointer to an array owned by the user, we
should also make all but the top-level of indirection const, since we
are not planning on modifying it.
Signed-off-by: David van Rijn <david@refractor.dev>
This file previously defined an MPU access permission mode of 0x7 which
corresponded to privileged read-only, unprivileged read-only, similar to
mode 0x6. However, it appears that at least Cortex-R5 does not support
this mode, defining 0x7 as UNP (Unpredictable) or a value which should
not be used.
This value was in turn referenced by the REGION_FLASH_ATTR macro, which
caused the offending value to be used when a memory region was declared
as DT_MEM_ARM(ATTR_MPU_FLASH) in the device tree, causing such regions
to not work properly on Cortex-R5.
Since 0x6 is supported by both Cortex-M and Cortex-R and does the same
thing, there is no reason to use 0x7. Remove the RO_Msk definition which
referenced it, and change REGION_FLASH_ATTR to use P_RO_U_RO_Msk instead.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
After https://github.com/zephyrproject-rtos/zephyr/pull/72090,
`conn_tx_alloc` no longer blocks, and each buffer always has a
corresponding `bt_conn_tx` object. This eliminates the need to configure
the number of `bt_conn_tx` objects via `CONFIG_BT_CONN_TX_MAX`, since
every buffer now carries its own context even when no callback is used.
This commit deprecates `CONFIG_BT_CONN_TX_MAX` as it is no longer
necessary. Instead, `CONFIG_BT_BUF_ACL_TX_COUNT` is used to allocate
`bt_conn_tx` objects for outgoing ACL data. ZLL already uses
`CONFIG_BT_BUF_ACL_TX_COUNT` to configure the number of outgoing ACL
packets. With this change, modifying the packet count will automatically
adjust the number of corresponding contexts, preventing both context
starvatoin and underutilization.
This approach also aligns with ISO, where the number of `bt_conn_tx`
objects for outgoing ISOdata matches `CONFIG_BT_ISO_TX_BUF_COUNT`.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Set connection manager to unstable. It is now used
by multiple parts in zephyr and numerous samples.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Instead of obscure linker-file hacks providing dummy definitions before
we have the proper generated k-object lookup functions, provide weak
definitions that will be taken out by the real generated implementations
when they are available.
Signed-off-by: Björn Bergman <bjorn.bergman@iar.com>
In order to be consistant with other formats bayer formats
recently introduced, rename all 4 8 bit bayer formats with a
S prefix (SBGGR / SRGGB / SGBRG / SGRBG).
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Many cellular modems attempt to negotiate an ACCM value of 0x00000000.
While the PPP driver rejects this by default, it does not propose an
alternative. As a result, some modems default to using 0x00000000 after
LCP negotiation. Because the PPP driver expects all control characters
to be escaped, this causes issues during decoding. This change
negotiates an ACCM value of 0xffffffff to ensure compatibility with such
modems.
Signed-off-by: Vytautas Virvičius <vytautas@virvicius.dev>
The CH32V006 and others in the CH32V00x series are an evolution of the
CH32V003 and use different remap offsets for the various peripherals.
In the same way as the CH32V20x, fork the CH32V003 driver and add
CH32V00x support.
Signed-off-by: Michael Hope <michaelh@juju.nz>
Move creation of last section id from ld linker script LONG() usage to
C code with last section attribute.
The use of `LONG()` works correctly with ld but lld emits a warning
because .last_section section is not allocated as there are no matching
input sections and discards the `LONG()` call, meaning the last section
identifier will not be present in the flash.
> ld.lld: warning: ignoring memory region assignment for
> non-allocatable section '.last_section'
Placing the last section id in `.last_section` in C code makes lld
allocate the memory for the id and thereby create the output section
with the correct output.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Discard the eh_frame section when C++ exceptions are disabled.
In principle the eh_frame may be used for other purposes such as
backtracing when linking C programs, then Zephyr compiles each source
file with '-fno-asynchronous-unwind-tables', thus keeping the eh_frame
in the elf output just takes up space.
When using gcc/ld, then the eh_frame is generally generally discarded
per default, however for clang/lld it will be included but give a
warning that the section is auto-placed.
Some platforms already discards the eh_frame, so unify this for all
targets.
As eh_frame is now discarded in linker scripts then post processing step
of removing the section during hex or bin conversion can also be
removed.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
The context type PROHIBITED has been removed from
the Bluetooth assigned numbers document. It is, however,
still used in some profiles to indicate either "No context
type supported" or "None available", and thus a rename
to "NONE" makes sense.
It is still treating similar to prohibited in some cases,
as it is not a valid context type in all cases.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
For some reasons, xt-clang does not like "%hhd" or "%hd"
(for example) being fed int data (same goes for unsigned ones)
and will always complain about mismatched types. GCC and newer
LLVM/Clang do not complain. This could be due to xt-clang
being based on older LLVM/Clang. So skip the check.
Fixes: #89008
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Add the 20-pin camera connector used by at least Arducam, Waveshare,
Olimex, Arduino, NXP, ST, Adafruit that connects image sensor module
boards and devkits.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Replace `CONFIG_NET_L2_IEEE802154` with `CONFIG_NET_L2_PHY_IEEE802154`
as `NET_LINK_ADDR_MAX_LENGTH` should be set to `8` for all IEEE 802.15.4
based L2, e.g. OpenThread.
Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
Add the MSPI controller support for apollo5x.
Add the MSPI controller to mspi API test.
Updated west.yml for hal updates.
Signed-off-by: Swift Tian <swift.tian@ambiq.com>
This header uses enum mcumgr_err_t but does not include the
header where it is defined. Fixed in this commit.
Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
In uuid.h the function uuid_generate_v5 had a 'namespace'
parameter which is a reserved C++ keywork.
Renamed to 'ns'.
Signed-off-by: Daniel Nicoletti <dantti12@gmail.com>
pm_state_get() is used to get a PM state that can be forced.
Disabled states (not included in automatic state selection) can
also be forced thus they should be included in search inside
pm_state_get().
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Move OpenThread-related code from
zephyr/subsys/net/l2/openthread/openthread.c to
zephyr/modules/openthread/platform/openthread.c.
The primary goal of this refactor is to enable the use
of OpenThread as an independent module, without the necessity
of Zephyr's networking layer.
This change is particularly beneficial for simple applications
that have their own implementation of the IEEE802.15.4 driver
and do not require a networking layer. These applications can
now disable Zephyr's L2 and IEEE802.15.4 shim layers and
directly use the OpenThread module, saving valuable kilobytes
of memory.
In this approach if the CONFIG_NET_L2_OPENTHREAD
Kconfig option is set, Zephyr's L2 and IEEE802.15.4 layers
will be used, and everything will function as before.
The main difference is the Zephyr's L2 layer now uses
the OpenThread module, no longer implementing it.
While most of the functions in include/net/openthread.h
have been deprecated, they are still available for use to
maintain backwards compatibility.
Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
Add Asynchronous UART implementation, which does not drop data
when automatic hardware-flow-control is set in the device tree.
With automatic hardware flow control, the CTS pin will be
automatically deactivated when there are no more asynchronous
UART RX buffers available. After buffer space becomes available,
and UART RX is restarted, the CTS pin will be activated.
Signed-off-by: Markus Lassila <markus.lassila@nordicsemi.no>
The HTTP client would read data from a socket up to the size of the
receiving buffer, however it may not process them all. This is usually
only the case if protocol switching takes place, where the data read may
belong to another protocol. Therefore we need a way to notify the caller
about any potential data that is already present in the buffer and needs
to be processed.
Introduce an new data_len member in struct http_request to provide the
information about the data already available in the receive buffer. If,
after HTTP response processing, the value is non-zero, the data will be
available in the beginning of the user provided receive buffer.
To make this possible however, we need to track how many bytes were
actually processed by the http_parser, therefore the code will no longer
ignore the http_parser_execute() return value. To simplify processing,
it's also been changed how the receive buffer is used. Instead of using
it in a ring-buffer-like way, the offset variable will track how many
bytes are available in the buffer, and in the rare occasions when not
all data from the buffer was processed by the HTTP parser, we'll
memmomve the remaining data to the beginning of the buffer.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The description incorrectly stated that it points to last erased
offset, while it actually points to first offset that has not
yet been erased.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>