add bt_conn_br_switch_role and bt_conn_br_set_role_switchable to control
the role switch, add DEFAULT_ROLE_SWITCHABLE Kconfig to control the default
role switch state.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
rename gpio stepper to h bridge stepper
minor correction in stepper_stop, stepper_stop shall cancel all active
movements and should not be concerned about keeping the coils energized
or not, since that is a concern of a motion controller and not a stepper
driver.
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
Adds a I2C+GPIO Target device binding for MCTP communication over I2C.
The binding requires an i2c bus and gpio pin, along with a specified I2C
and endpoint address pair. These are then used to create an MCTP binding
which can be used to communicate in a peer to peer manner among other
MCTP endpoints.
Each message transmit signals to the bus controller using a GPIO logical
high and is unset on transmission completion. Pending transmitters are
queued using a semaphore avoiding memcpy being needed to asynchronously
transmit mctp pktbufs.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Adds a custom MCTP binding for an I2C bus controller using GPIO signaling
for write requests rather than mode switching.
This binding operates a lot like the I3C binding specification DMTF has
for MCTP. The controller expects to receive interrupts (from GPIO pins)
and upon getting an interrupt read a message from the I2C target device.
The macro does a lot of the heavy lifting to setup all the state needed
for capturing GPIOs, being able to do asynchronous reads/writes, and
such. The entire controller works using state machines driven by
interrupts leading to low latency and clear ram costs.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Added bt_le_set_default_phy in hci. This handles
the HCI_LE_Set_Default_PHY HCI command.
Added call to bt_conn_le_set_default_phy in central_gatt_write and
peripheral_gatt_write samples.
Signed-off-by: Ravinder Singh <ravinder.singh2@infineon.com>
Added configurable support for L1 cache region operations,
which offers improved performance over line operations.
Added configurable support for SLC (system level cache).
Added support for entire cache operations: flush_all,
invd_all, flush_and_invd_all.
Reviewed-by: Aaron Komisar <aaron.komisar@tandemg.com>
Signed-off-by: Yanir Levin <ylevin@gsitechnology.com>
- Add a new callback to support the situation when a unit info command is
received, and add an API to respond to the unit info command.
Signed-off-by: Make Shi <make.shi@nxp.com>
- Only AVRCP connect and disconnect api for AVRCP common functions.
- Added _ct prefixes to all CT callback functions and feature APIs.
- Updated shell demo code for AVRCP API changes.
Signed-off-by: Make Shi <make.shi@nxp.com>
It is not possible to build anymore in that mode, so we do not
need to support building the constructors and initialization arrarys
in a way that support it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This ifdef was changed to use another kconfig option, but
the comment in the endif was forgotten, let's fix it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The IRQ_DIRECT_CONNECT macro eventually uses _Z_ISR_DIRECT_TABLE_ENTRY,
which defines a function. IRQ_DIRECT_CONNECT is meant to be used
inside functions. While nested functions are supported as an extension
in GNU C, the nested function cannot have static storage.
https://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html:
> A nested function always has no linkage. Declaring one with extern or
> static is erroneous.
./scripts/twister -c -s arch.interrupt.gen_isr_table_local.riscv --all
tests/kernel/gen_isr_table/src/main.c: In function
'gen_isr_table_test_build_time_direct_interrupt':
include/zephyr/sw_isr_table.h:197:41: error: invalid storage class for
function '__isr_table_entry_isr1_irq_2'
#define __MK_ISR_ELEMENT_NAME(func, id) __isr_table_entry_ ## func ## _irq_ ## id
^~~~~~~~~~~~~~~~~~
Issue #92194
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Offloaded socket implementations need to create the socket operations
vtable, therefore need access to struct socket_op_vtable. So far this
has been defined in a private header, so implementations needed to add
the header location to the include path in CMake.
Therefore, move struct socket_op_vtable definition to the internal part
of the public socket header, so it's no longer needed to include a
private header. This is also more consistent with the rest of the public
header content, as for example macros needed to register a socket
implementation are already there.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The .rodata_in_data section is produced by MWDT toolchain with -Hccm
option enabled. This option moves read-only data from the executable
memory (ICCM) to the data memory (DCCM), improving performance by
reducing conflicts between instruction fetches and data fetches.
Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
clang-tidy reports a bugprone-sizeof-expression warning for
sizeof((__v)) when __v is a pointer type. This is a false-positive
in contexts like logging with %p, where using a pointer is
intentional and expected.
Add a NOLINT comment to suppress the warning in static analysis.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
clang-tidy reports a performance-no-int-to-ptr warning due to the cast
(const char *)(uintptr_t)(v).
Previously, only char * was cast to const char *, but there's no downside
to constifying all pointer types.
This change updates the Z_CONSTIFY macro to apply const consistently,
which even aligns better with its name and resolves the warning.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
During #89407 a driver-specific header stm32_dcmipp.h got introduced to
support new functionnalities not yet covered by video APIs.
Move this header into a new <include/zephyr/drivers/video/> include
direcctory like what other driver classes do.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Move `@cond INTERNAL_HIDDEN` comment where it belongs (fixing what was
probably a copy-paste/refactoring error).
This also makes the previously `bap_iso`, `group`, `_prev_seq_num`
visible again.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
add doxygen groups to include/zephyr/math header files and fold them
under Utilities top-level group.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
moved docs to Utilities group (vs. top-level)
cleaned several incorrect Doxygen group definitions
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Previously, ZRESTRICT was used in aio.h without also including
zephyr/toolchain.h.
Tests may have compiled because the toolchain header was included by
some other means.
We should explicitly include it to ensure that ZRESTRICT is defined.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
When a function pointer is `NULL`, it could be that the underlying
hardware doesn't support it, or it isn't implemented.
If a function isn't supported by the hardware, its driver should
return `-ENOTSUP`, the API layer should return `-ENOSYS` when a
function isn't implemented.
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Virtio headers are moved to zephyr/drivers/ as they have no reason to be
top-level headers since virtio is a driver class.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
To avoid misalignment errors when casting between
sockaddr_storage/sockaddr and specialied sockaddr_* variants, specify
alignment for the former to match the alignment of the others.
The issue was reported by UBSAN:
utils.c:802:8: runtime error: member access within misaligned
address 0xf4aff186 for type 'struct sockaddr_in6', which requires
4 byte alignment
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
To address the misaligned access issues reported by UBSAN, introduce raw
variant of certain IPv4 functions used in the critical data path of the
network stack, operating on plain uint8_t buffers in stead of IPv4
address struct.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
To address the misaligned access issues reported by UBSAN, introduce raw
variant of certain IPv6 functions used in the critical data path of the
network stack, operating on plain uint8_t buffers in stead of IPv6
address struct.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Description of parameters in st,control property didn't match the values
used in the code.
Modify the description to match with the current driver implementation.
Also add a description for reg property to help setting it properly and
add corresponding dt-bindings.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
The struct video_buffer are currently used with `struct k_fifo`, which
require them to preserve the first word of data for use by the kernel.
Move the first fields to make it possible to keep using video buffers in
FIFO safely.
Fixes#92526
Signed-off-by: Josuah Demangeon <me@josuah.net>
Rename and clarify the @defgroup SENSOR_AXIS_ALIGN to better reflect its
purpose. Replace the vague "DT Options" title with a more descriptive
name: "Sensor axis alignment DT options".
This improves documentation clarity for developers configuring sensor
orientation via Device Tree.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Some boards fail to build arch.interrupt.gen_isr_table_local.riscv test
since this region is too small:
riscv64-zephyr-elf/bin/ld.bfd: zephyr/zephyr_pre0.elf section `.intList'
will not fit in region `IDT_LIST'
riscv64-zephyr-elf/bin/ld.bfd: region `IDT_LIST' overflowed by 239 bytes
This is a bogus memory region, so increasing it has no effect on the
final binary size.
Issue #92194
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Move the IronSide APIs to soc/nordic from drivers/firmware since
these are vendor specific APIs. The header files are now included
from <nrf_ironside/*.h>. Adjust code that uses these APIs accordingly.
Also move the DT binding for "nordic,ironside-call" from
bindings/firmware to bindings/misc.
Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
SonarQube reports: cast from 'const struct _snode *' to 'struct _snode *'
drops const qualifier. Fix it by removing the const.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
(cherry picked from commit 7982ee0df13b7f9e54595f799e32f38c464b0f9e)