Implement the selection of the picolibc source in a Kconfig
choice as they are mutually exclusive.
The following table represents the possible choices, where 'X'
means that `PICOLIBC_SUPPORTED=n` and is guarded in the parent
level as `PICOLIBC=n`, so we do not need to care.
Module Toolchain C++ | Choice
0 0 0 | X
0 0 1 | X
0 1 0 | Toolchain only
0 1 1 | Toolchain only
1 0 0 | Module only
1 0 1 | X
1 1 0 | Toolchain/Module
1 1 1 | Toolchain only
The current implementation favors `PICOLIBC_USE_TOOLCHAIN` over
`PICOLIBC_USE_MODULE` whenever possible, that preference is
maintained in this implementation as well - the TOOLCHAIN
source will be the default choice when the toolchain supports
it or when the C++ is enabled. Otherwise, fallback to MODULE.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Add maintainer and collaborator for DP drivers and DAP controller.
Followup on the commit 7c9259abbc
("dap: add CMSIS-DAP compatible controller")
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
There are instances where on hardware tests would result in
multiple dictionary logging blocks. This is usually due to
flashing and running via twister in separate steps. Once
flashing is done, the device starts running and sending
logging string to output, but twister is not ready to read
them, thus leaving the strings in the host's UART buffer.
Then twister starts its testing run by resetting the device
which results in another dictionary logging block to show
up. So the pytest script has to be updated to only look at
the last dictionay logging block.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Since only the UART backend supports output in hexidecimal form
with dictionary logging, so filter for that or else the pytest
would fail due to none, or wrong captured output.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit changes the adc_api test to use the proper printf
format specifier when printing the ADC samplings. This ensures
that all values are printed on 16-bit. Without this specifier,
negative values are sign-extended and printed on full integer
size (e.g., 0x8000 -> "0xFFFF8000").
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
Remove the reset vector setting from driver layer,
the reset vector is more suitable to be set at the board layer.
Signed-off-by: Kevin Wang <kevinwang821020@google.com>
Adds ability to process synchronous requests in an asynchronous
fashion, relying on dedicated P4WQ's and pre-allocated work items.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
In order to support back-to-back readings, it's required that the
RTIO workq threads priority is higher than the caller issuing the
back-to-back requests, otherwise the requests will fail as P4WQ won't
have the opportunity to clear the is_done semaphore, and the subsequent
request will be rejected.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
In order to decouple the read request from its implementation, we need
to be able to yield to potential lower-priority threads, which is not
possible with k_yield() itself. As such, using RTIO Consume semaphore
enables us to achieve this.
This patch also refactors blocking API (sensor_read) to also block upon
consumption, so as not to require RTIO_SUBMIT_SEM enabled.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
- enabled GPT(PWM) peripheral for sleep/deepsleep mode in init_pwm()
- Fixed: undefined behaviour when using k_sleep()
Signed-off-by: Devansh Tanna <devansht0210@gmail.com>
c8d8dce755 introduced a regression whereby driver config should hold
module device pointer, except it didn't.
This commit adds module_dev to the driver config.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
When multiple devices are on the bus, and no slave matches
the sent rom, the master receives only ones.
This should be handled explicitly and the error reporting
should not rely on the crc mismatch of the scratchpad.
Note: Make sure that the sensor configuration is loaded to the
eeprom (copy scratchpad), otherwise the resolution will not match
the expectations in case a node looses power and recovers.
As in that case the configuration will not be applied again.
Also the sensor may still report the power on reset value
of +85°C just after the sensor powered up.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
After each read of the scratchpad the crc of the data
is checked and in case of a mismatch an error is returned.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
- Move the content of the header file into the source file,
and drop unnecessary includes.
- Also, drop the bus access function.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
An off by one error in the channel range check results in an out of
bound access to the channel lookup array.
Signed-off-by: Brett Witherspoon <brett@witherspoon.engineering>
Thalley is not working with BT mesh nor BT classic
and shouldn't be assigned as reviewer for those.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The existing configuration of the ESP32 UART FIFO thresholds
was fixed, leading to inefficiencies in handling
Modbus RTU packages exceeding this size.
This commit introduces two new Kconfig options,
allowing users to adjust the esp32 fifo thresholds as needed.
fixes#74311
Signed-off-by: Omer Gozderesi <omer.gozderesi@enda.com>
config: esp32: configurable UART FIFO thresholds
The existing configuration of the ESP32 UART FIFO thresholds
was fixed, leading to inefficiencies in handling
Modbus RTU packages exceeding this size.
This commit introduces two new Kconfig options,
allowing users to adjust the esp32 fifo thresholds as needed.
fixes#74311
Signed-off-by: Omer Gozderesi <omer.gozderesi@enda.com>
Remove references to a timline for the coding guidelines enforcement
stages. Mark the current stage better and add notes about the
current stage.
Signed-off-by: Simon Hein <Shein@baumer.com>
DTC warning caused by reg address not matching unit address,
but SRAM node address is translated by ranges property anyways.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The unit address didn't match reg which causes the warning, but
flexspi should be part of the peripheral node space anyways.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The information about replied headers or END_OF_STREAM flag are
stream-specific and not general for a client. Hence, need to move them
to the stream context.
For the upgrade case, we need to allocate a new stream now when HTTP1
request /w upgrade field is received. The stream ID in such case is
assumed to be 1 according to RFC.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
In case client decides to send a trailing headers frame, the last data
frame will not carry END_STREAM flag. In result, with current logic
server would not include END_STREAM flag either, causing the connection
to stall. This commit fixes this logic, so that the server replies
accordingly in case END_STREAM flag is present in the trailing headers
frame.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
CONTINUATION frames are tricky, because individual header fields can be
split between HEADERS frame and CONTINUATION frame, or two CONTINUATION
frames. Therefore, some extra logic is needed when header parsing
returns -EAGAIN, as we may need to remove the CONTINUATION frame header
from the stream before proceeding with headers parsing.
This commit implements the above logic and additionally adds more checks
to detect when CONTINUATION frame is expected. Not receiving a
CONTINUATION frame when expect should be treated as a protocol error.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Frame printouts should not be done from the state handlers, but rather
during state transition, otherwise a single frame can be printed several
times as new data arrive. This also simplifies code a bit, as we just
print the frame in a single place, instead of duplicating code.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
There's really no good reason to have an upper bound on the buffer sizes
and this limits testing in some cases, so just remove them.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
In case RST_STREAM frame is received it should not be ignored, but the
corresponding stream should be closed.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
In case priority flag is present in the HTTP2 headers frame header, we
should expect additional priority fields before the actual frame
content.
The stream priority signalling has been deprecated by RFC 9113, however
we should still be able to handle this in case some implementation
(nghttp for instance) sends them.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Data and header frames can contain padding - we need to take this into
account when parsing them, otherwise the stream is broken.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Instead of multiplying function to check header flags, just have a
single one, with flag mask as parameter.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
For HTTP2-specific structures and enums, use "http2_" prefix to clearly
indicate the distinction from the generic HTTP stuff.
Additionally, some structures/enums describing HTTP2 protocol details
had "server" in the name, while in reality they describe nothing
server-specific. Hence, drop the "server" part where applicable.
Remove unused macros.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
* Remove unneeded variable.
* Use system utilities to read big endian numbers instead of parsing
manually.
* Remove `payload` member from the http_frame structure. It's not used
for anything useful, and could actually be misleading, as in case of
large frames, where not entire frame is parsed at once it will point
to incorrect location.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Those platfroms use rtt as debug port that conflicts with usermode, as
in 27d519b260.
Fixes#75617
Signed-off-by: Guy Morand <guy.morand@bytesatwork.ch>
If newly introduced interface type is unset then return the first Wi-Fi
interface as a fallback, this fixes backward compatibility.
Also, add NM APIs and use them for type checks, rather than directly
using the type enumeration.
Fixes#75332.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
WPA supplicant as a network manager monitors interface events and
registers to the Wi-Fi NM module, so, adding a check for NM type before
registering the interface is wrong.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>