Add a devicetree binding and corresponding dt-bindings header for
the ArduCam FFC-40 pin GPIO connector used by camera shields.
- Add dts binding schema for arducam,ffc-40pin-connector
- Add dt-bindings header with GPIO pin definitions
Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
Add a new network protocol for MIDI2.0 over the network, using UDP sockets.
This allows Zephyr to host a UMP endpoint on the network, which can be
invited by UMP clients to exchange MIDI2.0 data.
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
Add a new top-level, transport independent library to respond to UMP Stream
Discovery messages. This allows MIDI2.0 clients to discover UMP endpoints
hosted on Zephyr over the UMP protocol.
The endpoint specification can be gathered from the device tree, so that
the same information used to generate USB descriptors in usb-midi2.0
can be delivered over UMP Stream.
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
Improve the API documentation for Universal MIDI Packets definitions:
- Add link to the reference document, and make it referenceable in doxygen
- Use BIT_MASK macro instead of hexadecimal litterals to better convey the
length of various fields within UMP packets
- Add more cross-references where possible
- Use @remark when applicable
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
Retrieve the current leaf state by calling `smf_get_current_leaf_state`
and the state which is currently-executing by calling
`smf_get_current_executing_state`.
Signed-off-by: Siwei Yang <yswysc@gmail.com>
Unify external analog inputs type to be consistent
in COMP, LPCOMP and SAADC nordic drivers.
Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
Add Clock Control driver support for Renesas RZ/N2L, T2M
Signed-off-by: Quang Le <quang.le.eb@bp.renesas.com>
Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
Introduce hook for customize reset.S code even before stack is
initialized or RAM is accessed. Hook can be enabled using
CONFIG_SOC_EARLY_RESET_HOOK=y.
Hook implementation is by soc_early_reset_hook() function which should
be provided by custom code.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Pass a pointer to the CoAP packet in the response data. This allows
callback function to inspect for CoAP options.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Make it easier to modify the response callback data by passing it as a
struct pointer rather than a long list of arguments.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
The code was writing to the dst without a verification check on
size which is not appropriate. The guard on the arguements should
be enforced and so just ensure the size is larger then the
definition of the strings from POSIX and return an error in those
cases.
Signed-off-by: Charles Hardin <ckhardin@gmail.com>
As discussed on Discord, certain k_mem_slab* APIs are ISR-OK, but not
marked as such. After APIs review, the following functions should be
ISR-OK:
- k_mem_slab_free
- k_mem_slab_num_used_get
- k_mem_slab_max_used_get
- k_mem_slab_num_free_get
- k_mem_slab_runtime_stats_get
- k_mem_slab_runtime_stats_reset_max
Added the Doxygen marker where needed.
Signed-off-by: Loic Domaigne <tech@domaigne.com>
Adds snippets-text-sections.ld to arm/cortex_a_r and arm64
linker scripts.
For now, this is for the memory mapping test.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Adds snippets-text-sections.ld to x86 linker scripts.
For now, this is for the memory mapping test.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit adds the NVMEM subsystem with a basic implementation for use
with EEPROM devices.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Adds property nvmem-cells for referencing a node that stores some
configuration information. A typical use case is the reading of MAC
address from an EEPROM device.
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
There is an issue when zephyr is compiled with native_sim_64 where
size_t is 8 bytes. The socklen_t in specified as 4 bytes in Linux
even for 64 bit builds so we have a conflict between Linux and Zephyr.
To make things work properly, define socklen_t as uint32_t in order to
align with Linux. Four bytes is enough for socket address length anyway.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Automatically size the CMUX work buffers based on
`CONFIG_MODEM_CMUX_MTU`. This eliminates a Kconfig variable that would
otherwise need to manually be kept in sync. The option to extend the
size of these buffers is still provided through
`CONFIG_MODEM_CMUX_WORK_BUFFER_SIZE_EXTRA`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Extend the registration status definitions and explicitly tie them to
the values defined in 3GPP TS 27.007. Definitions were copied from
version v18.6.0.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Update the defined access technologies to align with the 3GPP standard
TS 27.007. Definitions were copied from version v18.6.0.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Setting 0 as microstep interval is invalid. If microstep_interval is
not set then the motion related functions should return -EINVAL.
drop test_run_zero_step_interval_correct_position
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
This commit adds the instrumentation subsystem.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
Adds a new '__no_instrumentation__' preprocessor definition for GCC,
mapping it to '__attribute__((__no_instrument_function__))'.
This new macro is used to disable code instrumentation (enabled when
'-finstrument-functions' flag is passed to the compiler) for specific
functions when placed before a function definition.
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
The ((0) ? (arg) : (arg)) compiler trick leads to a codechecker
violation:
"conditional operator with identical true and false expressions"
Replace it by ((0) ? (0) : (arg)) to work around this issue.
Signed-off-by: Stefan Gloor <stefan.gloor@siemens.com>
Fix the improper use of CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC for STM32WB0
drivers due to the misunderstanding of its definition.
Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
This commit applies clang-format to file include/zephyr/sys/util.h
to align them with the latest Zephyr coding style guidelines.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
Add two internal Z_INTERNAL_MAX and Z_INTERNAL_MIN macros and use those
for implementing the actual MIN and MAX. This allows a downstream
application to undefine and redefine MIN and MAX, for example to define
them to min and max, which is useful if it relies on MIN and MAX to be
the single call version.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add three argument variants of the single evaluation min and max, seems
like there's few of these in the code we may as well have them.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add support for nested min/max by using unique automatic variables. This
is heavily inspired by the Linux implementation, just reimplemented from
scratch using the Zephyr internal APIs.
Link: https://elixir.bootlin.com/linux/v6.16.8/source/include/linux/minmax.h#L314-L315
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Rename these three macros to an unprefixed lower-case variant. This is
normally not done for Zephyr macros (see container_of) but in this case
it seems like a good idea to adopt the lowercase names to:
1. have the same convention as the equivalent Linux macros, helping devs
working cross project recognizing (mis)use patterns.
2. make it somewhat intuitive that the lowercase ones are meant to be
used in functions while the uppercase ones are to be used for static
evaluation.
Add few c++ guards to avoid colliding with std::min and std::max.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
These three are single evaluation versiono of MIN, MAX and CLAMP, they
are defined in toolchain headers as they use typeof [1] and statement
expressions [2], which are compiler extensions, but given that these are
used by other macros in util.h as well, it seems to be fair to assume
that these are supported by all compilers used with Zephyr today.
[1] https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html
[2] https://gcc.gnu.org/onlinedocs/gcc/Typeof.html
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Setting the peer hostname to NULL does not skip hostname verification.
After discussion in the issue it was agreed that it's better to remove
this comment than to implement skipping hostname verification.
Also fixed a typo in the remaining part of the comment.
Fixes: #96853
Signed-off-by: Kevin ORourke <kevin.orourke@ferroamp.se>
HWSPINLOCK are used to protect accesses to shared resources between
clusters. However, we don't want to sleep or be preempted while holding
a HWSPINLOCK. This means we need to lock IRQs while holding the
HWSPINLOCK.
Moreover, in an SMP context, we need to protect accesses to a HWSPINLOCK
between cores, so it is not possible to lock or release the same
HWSPINLOCK multiple times.
Introduce a zephyr spinlock per HWSPINLOCK to counter those issues. User
facing APIs have been udpated to take into account those changes, and a new
hwspinlock_dt_spec struct has been added to align with other subsystem on
the management of complex device's data.
Take the opportunity to rename public APIs to match the naming scheme of
normal zephyr spinlocks:
hwspinlock_lock -> hw_spin_lock
hwspinlock_trylock -> hw_spin_trylock
hwspinlock_unlock -> hw_spin_unlock
Signed-off-by: Pierrick Guillaume <pguillaume@fymyte.com>
HW spinlocks are not supposed to be used by user application. They are used
to protect shared resources between clusters. Consumer of such spinlocks
should be other drivers in kernel space.
Moreover, syscalls were actually not generated properly because of
a missing call to zephyr_syscall_header() in CMakeLists.txt.
Signed-off-by: Pierrick Guillaume <pguillaume@fymyte.com>
1. Introduced GDMA support for efficient data transfer in the
NPCX FIU QSPI driver.
2. Refactor flash driver mutex handling to enhance concurrency safety,
preventing other threads from preempting erase/write operations during
UMA until mutex release.
Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
Some MCUs are supporting external resistor dividers for gain setting in
standalone mode.
Add OPAMP_FUNCTIONAL_MODE_STANDALONE to the opamp_functional_mode enum.
Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
In the enum opamp_functional_mode becomes prefix
OPAMP_FUNCTIONAL_MODE_ to avoid clash with STM32 HAL macros
The suffix _MODE were removed to make the names shorter
Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
Reordered ITCM section to appear before .text in the ARM Cortex-M linker
script.
This allows functions placed in ITCM via *(.text.<function_name>) using
snippets-itcm-section.ld to avoid being absorbed into the default .text
section, enabling more flexible code placement.
Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
support gpio wake up function.
change init stage from POST_KERNEL to PRE_KERNEL_1
because uart wrap init need to use the gpio functions.
Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>