Use slist instead of custom singly linked list to manage SDP records.
Check if the SDP record has been registered in the function
`bt_sdp_register_service()`.
Append the new SDP record to the tail of the SDP record list.
Check if the index of SDP record is overflow in the function
`bt_sdp_register_service()`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Migrate support from crc library to new crc subsystem
Add hardware acclerator backend for crc subsystem
Signed-off-by: Duy Vo <duy.vo.xc@bp.renesas.com>
Adds a generic function that will count the number of bits set in
a value.
It uses POPCOUNT (e.g. __builtin_popcount for GCC) if available,
or else it will use Brian Kernighan’s Algorithm to count bits.
POPCOUNT will likely always support unsigned ints, but the function
was implemented to use it with uint8_t for the sake of simplicity
and compatibility with Brian Kernighan’s Algorithm.
A generic solution was chosen rather than a macro/function per
type (e.g. uint8_t, uint16_t, etc.) as that is easier to maintain
and also supports array types (e.g. counting the number of bits
in 128 or 256 octet arrays).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add a new ec_host_cmd backend based on USB. The backend uses the new USB
device stack.
The backend implements a vendor-specific (Google) USB interface. It uses
three endpoints:
- bulk OUT to transfer a host command request
- bulk IN to transfer a host command response
- interrupt IN to signal an event and readiness of the response
Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
The resulting BUILD_ASSERT macro provided by
zephyr/toolchain/gcc.h is defined to be empty, making the macro
useless.
This commit ensures we define it to something that actually
performs a validation. When not compiling for C++ or >=C11,
we rely on that cdefs.h provides _Static_assert.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Add scmi_cpu_set_irq_mask function for scmi nxp cpu driver,
set cmc wakeup mask from scmi interface by this.
The CPU_IRQ_WAKE_SET is sent to the scmi platform
to determine which interrupt can wakeup the cpu platform
when the corresponding interrupt occurs
"1" means the IRQ cannot wakeup CPU platform
Each bit corresponds one-to-one with the interrupt
controller of the platform such as nvic in mcore
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
To support unprivileged mode (CONFIG_USERSPACE):
- Set unprivileged PAC key registers when system is in unprivileged
mode.
- Add `bti` after each svc call, to make sure that the indirect jumps on
`lr` while returning from an `svc` don't result in a usage fault.
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Add a config option to set unique PAC keys per thread and
make sure to retain them during context switch.
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Do not use private API prefix and move to architecture interface as
those functions are primarily used across arches and can be defined by
the architecture.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Do not use private API prefix and move to architecture interface as
those functions are primarily used across arches and can be defined by
the architecture.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Do not use private API prefix and move to architecture interface as
those functions are primarily used across arches and can be defined by
the architecture.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Do not use private API prefix and move to architecture interface as
those functions are primarily used across arches and can be defined by
the architecture.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Cleanup init.c code and move early boot code into arch/ and make it
accessible outside of the boot process/kernel.
All of this code is not related to the 'kernel' and is mostly used
within the architecture boot / setup process.
The way it was done, some soc code was including kernel_internal.h
directly, which shouldn't be done.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Not really a kernel feature, more for architecture, which is reflected
in how XIP is enabled and tested. Move it to architecture code to keep
which much of the 'implementation' and usage is.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Change utf8_count_chars return type to int and drop thesys/types.h, this
way the function does not depend on posix types.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This moves the declaration of the utf8 utils defined in lib/utils/utf8.c
in their own header. Main reason to do this is that the current setup
requried adding an include for sys/types.h in util.h, which can result
in a build falure due to a circular header depdenecy when using:
CONFIG_POSIX_API=y
CONFIG_NEWLIB_LIBC=y
_GNU_SOURCE
the loop and error are:
- include/sys/types.h:50: <- this is a NEWLIB one
- include/zephyr/posix/sys/select.h:9:
- include/zephyr/posix/posix_types.h:30:
- include/zephyr/kernel.h:17:
- include/zephyr/kernel_includes.h:25:
- include/zephyr/sys/atomic.h:18:
include/zephyr/sys/util.h:705:1:
error: unknown type name 'ssize_t'
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Provide a map from RTS5912_GPIO_NUM_000 to RTS5912_GPIO_NUM_131
for appication call be easier read.
For example:
Used: <&gpiog 6 (GPIO_OUTPUT)>
Now: <RTS5912_GPIO_NUM_102 (GPIO_OUTPUT)>
Signed-off-by: Elmo Lan <elmo_lan@realtek.com>
Ensure all top-level device driver headers have a Doxygen @file tag and
put the @file in the same group as the driver API.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Move MSPI devicetree macros documentation under MSPI group to not
clutter top-level device drivers page.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Basically just fixing the comment style to use javadoc-style comments
so that doxygen picks these up
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add function which finds contiguous number of bits which are not set
in the 32 bit mask.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This is variation of the PR to handle phantom events and hopefully
this get merged into the PR to land.
See-also: https://github.com/zephyrproject-rtos/zephyr/pull/89624
Signed-off-by: Charles Hardin <ckhardin@gmail.com>
Make the struct name match the device naming for ease of use, although
slightly longer name. Propagate the change to the subsystem, includes,
tests and samples.
Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
Add the STM32 auxiliary macro STM32_DMA_GET_CHANNEL_INSTANCE to handle
naming convention conflicts between STM32 series.
The H5, H7RS, N6, U3, MP2, U5, and WBA series use
the LL_DMA_GET_CHANNEL_INSTANCE definition, while other series use
__LL_DMA_GET_CHANNEL_INSTANCE.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Add a CPU frequency scaling subsystem, allowing a policy
algorithm to control the frequency of a given SoC/MCU
automatically at runtime.
Implement a basic, "on-demand" policy algorithm which
iterates through the P-states supported by the SoC and
selects the first P-state where it's trigger threshold is
less than the CPU load.
The CPU frequency scaling subsystem does not currently
support SMP. The CPU load measurement can be made to support
SMP since statistics are measured from the scheduler.
Co-authored-by: Eric Hay <Eric.Hay@analog.com>
Signed-off-by: Sean Kyer <Sean.Kyer@analog.com>
Implement CPU load measurement subsystem. The statistics
used to calcualte the load are taken from the scheduler.
Specifically, the number of cycles used by the idle thread.
Co-authored-by: Sean Kyer <Sean.Kyer@analog.com>
Signed-off-by: Eric Hay <Eric.Hay@analog.com>
The comments for INPUT_BTN_GEAR_DOWN and INPUT_BTN_GEAR_UP were
incorrectly swapped. This commit fixes the documentation to match
the actual button definitions.
Signed-off-by: Niu Zhihong <zhihong@nzhnb.com>
Add a Doxygen group for the GPIO pin headers macros and initially
document Arduino Uno (R3) header pin constants.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add more macros for interacting with controller/data type of
relationships (phandle arrays / cells)
Add macros for arbitrarily iterating cells of phandle specifiers
Add tests for the new macros
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Add support for setting and getting the bearer provider
name. For now the name will be duplicated by the TBS
implementation, but will be optimizied in the future
so only one copy of the name exists.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Move MIPI headers under Display group so that they don't clutter
top-level Device Drivers group.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>