Renames LED_BRIGTHNESS_MAX to LED_BRIGHTNESS_MAX in led.h and all
in-tree users of the macro.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Fixes an error:
error: designator order for field 'http_service_desc::backlog'
does not match declaration order in 'const http_service_desc'
When compiled for C++
Signed-off-by: Pavel Maloletkov <pavllick@gmail.com>
Add MPS4 pinctrl support by referring to
`mps4/common/partition/platform_base_address.h`
from TF-M's main branch.
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Add a family of functions that convert to microvolts instead of
millivolts. The resolution of an ADC with a 600 mV reference and a 12
bit output (nRF SAADC for example) is an order of magnitude better than
millivolts (0.146 mV), even before considering non-unity gains.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Introduce a binary min-heap implementation as a generic data structure
for use in kernel and application code. A min-heap always maintains
the smallest element at the root, making insertion and removal of the
minimum element efficient (O(log n)).
The API allows both static and dynamic initialization, supports custom
comparators.
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
Add RTIO async and RTIO stream functionalities that enables,
among all the other things, the sensor data streaming from FIFO.
RTIO stream supports following triggers:
- SENSOR_TRIG_FIFO_WATERMARK
- SENSOR_TRIG_FIFO_FULL
- SENSOR_TRIG_DATA_READY
Following FIFO parameters has to be defined in device tree to
correctly stream sensor data:
- fifo-watermark
- accel-fifo-batch-rate
Currently the driver can decode FIFO content with Accelerometer
16-bit samples.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Fix the net_pkt_pull() documentation and mention that the
function can remove data from the start of the network packet.
The function is meant to work similar way net_buf_pull() but
it can handle multiple net_buf fragments.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The documentation did not state clearly that any zero-latency IRQ must
also be declared as a direct ISR. This is critical because failure to do
so may cause race conditions between the ZLI and regular ISRs when
executing the preable/postamble code in regular interrupts.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Adds macros to be able to use the microcontroller clock output (MCO) on the
STM32G0 microcontroller.
Signed-off-by: Andreas Schuster <andreas.schuster@schuam.de>
Add weak functions and their call within the dcmipp driver so that
externally provided ISP control functions can be called by the
driver at right timing in order to perform the control of the
ISP part of the DCMIPP.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
If `CONFIG_SYS_CLOCK_EXISTS=n`, then
`CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC` will likely not be defined at all.
Fix the compilation by moving the check for it being `== 0` to a
separate preprocessor #if statement.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Remove static struct modifier from SPSC_DECLARE macro.
This solves a warning emitted when compiling for native_sim.
Signed-off-by: Luca Arato <luca.arato@secomind.com>
Introduce work timeout, which is an optional workqueue configuration
which enables monitoring for work items which take longer than
expected. This could be due to long running or deadlocked handlers.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The APIs pm_policy_device_power_lock_get and
pm_policy_device_power_lock_put are not mocked properly as they
should be excluded based on CONFIG_PM_POLICY_DEVICE_CONSTRAINTS,
not CONFIG_PM.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Some applications require loading extensions into the memory which does
not exist during the boot time and cannot be allocated statically. Make
the application responsible for LLEXT heap allocation. Do not allocate
LLEXT heap statically.
Signed-off-by: Alex Ivanov <alexivanov@google.com>
Updates the file summary on the various arch-specific kernel
interfaces to accomplish two things:
1. Fix the path in the comment
2. Standardize on language/format.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Introduce get_startup_time API which allows users to request
clocks specs to be met in time for an event.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Introduce API which allows users to determine what the actual
minimum spec will be resulting from a requested minimum spec. This
is useful for optimizing code as the requested minimum may be
way worse than what will actually be applied.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Added new configuration item to optionally enable APIs for operation
all data cache, by default these APIs are disabled.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
In order to clean and invalidate all D-Cache, so reverts commit:
867ba172b4.
Although no software broadcast between different CPU Cores for D-Cache
maintaining operation, but the hardware bus system should make sure it
is safety for all CPU Cores, because it is common for other SMP OS.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Add driver for the microchip MCP3561/2/4R ADC. Registers lock and
CRCCFG protection mecanism is not implemented. Tested on an MCP3564R.
Signed-off-by: Johan Lafon <johan.lafon@syslinbit.com>
Basic support: initialization for sending/handling UBX messages and
run-time navigation configurability through GNSS API.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
This change would also solve that according to the C11 standard,
section 6.5, paragraph 4, the usage of bitwise operators on
signed integers is implementation defined.
Signed-off-by: Stephan Gatzka <stephan.gatzka@gmail.com>
This feature, fixing a specific corner case, is unilateraly growing
all struct device with a pointer that 99% of the time is not used.
Thus uselessly utilizing ROM.
Making the feature Kconfig controlled.
Signed-off-by: Tomasz Bursztyka <tobu@bang-olufsen.dk>
Do not add functions to the high-speed iterable section when high-speed
support is disabled.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Disable the high-speed USB device descriptor if it is not in use.
Add checks to the code where the high-speed descriptor may be used.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Allowing message callback execution from the USBD thread saves about 800
bytes. For small devices, the option can be useful to reduce flash/RAM
usage, those with enough resources should not bother about it.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
When left-shifting '1' by 31, the result is undefined. This is
something ASAN detects.
Solve this by explicitly defining that the integer is unsigned.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
This commit adds virtio section in documentation, describing
virtio-related concepts
Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
This commit adds the API for accessing VIRTIO devices, and adds a driver
for a VIRTIO PCIE device based on the newly added API.
This commit is based on the Virtual I/O Device (VIRTIO) Version 1.3
specification:
https://docs.oasis-open.org/virtio/virtio/v1.3/csd01/virtio-v1.3-csd01.pdf
Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
Add a ctrl VIDEO_CID_LINK_FREQ to indicate to a sink
the frequency at which a device streams data over
CSI2. Since not all source device currently provide the
LINK_FREQ control, add a helper function to retrieve
it, with a fall-back by doing an approximate via the
PIXEL_RATE control.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Add standard data-type macros within the video.h in order
to avoid having to redefine them all in each and every CSI
based driver.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Commit 87719828ac introduced FSR definitions
for ARMv7-A/R; however, the value 16 which is documented in the ARM[1] as
a "TLB Conflict Abort", was introduced as "TLB Conflict Fault" instead and
described as a "Table Conflict Fault".
Update all affected files to use the ARM's naming for this error instead.
[1] Architecture Reference Manual (Document ID: ARM DDI 0406C.d)
"ARM Architecture Reference Manual for ARMv7-A and ARMv7-R Edition"
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
When using clang to build a C++ file that includes this file, it warns:
include/zephyr/sw_isr_table.h:195:28: error: invalid suffix on literal;
C++11 requires a space between literal and identifier
[-Wreserved-user-defined-literal]
"." Z_STRINGIFY(prefix)"."file"." Z_STRINGIFY(counter)
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
During testing and code inspection, there were various anti-patterns
on this (and U-Blox driver) codebase(s), including obfuscation, and
lack of data validation. This made it increasingly difficult to
introduce further variants of u-blox GNSS modems.
With this patch, both the UBX modem and the M8 driver have been
refactored to ease the reliability and maintainability of these
codebases. Here are some highlights:
WRT UBX modem:
- Helper macros to easily create UBX frames, (including checksum
calculation), at compile time; thus, making it easier to extend UBX
commands.
- Logic validation by the inclusion of the modem_ubx testsuite, used to
refactor the code through TDD.
- Ability to receive unsolicited messages, in order to enable U-Blox
drivers to rely on modem_ubx to transceive all commands, and avoid
hopping between modem_ubx and modem_chat.
WRT M8 driver:
- Remove GNSS specific protocol header files. Instead, unify them under
modem/ubx/protocol.h. Background: After a survey and looking at ubxlib
SDK I conclude the UBX protocol is by definition a GNSS protocol (there
are non-GNSS u-blox modems, but they're not interfaced through UBX
protocol).
- Establish pattern to create and send/receive commands using new
foundations on modem ubx.
- Remove dependency of Modem chat, and instead use UBX unsolicited
messages to get Navigation and Satellites data.
- Switch from the auto-baudrate detection pattern to a pattern of
transitioning between an initial known baudrate to a desired baudrate,
in order to improve initialization time.
- Add dts property to configure default fix-rate.
Signed-off-by: Luis Ubieda <luisf@croxel.com>