The function reuses the ATT implementation.
To make the function simpler to use, the function handles both positive
and negative values.
Unfortunately the APIs do not document if the API returns an
errno val or a GATT return value.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
This can be useful if application developers
want to print them in the applications.
Later we can also use them in
the host to improve debuggability.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Split wifi interface into station mode and soft-AP mode, as there may be
station and soft-AP two interfaces that work concurrently.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Smartbodn does not have dedicated USB clock.
For USB to work PLL needs to be turned on.
To allow for flexible configuration artificial USB clock
is added that can be operated via clock_control subsystem.
This new clock turns on PLL when USB subsystem is enabled.
PLL can also be request in DT if application requires
more speed.
PLL can be automatically turned off when USB enters suspend
state and application did not requested it.
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
GNU ld since 2.39, produces more security related warnings.
Due to the way we ordered sections the linker may end up with
a segment in the elf which contains both executable code
and read and write data.
This results in this new versions of the linker warning us.
So, in the linker script,
let's move the executable native_sim_if section from
being placed with the other native port related segments
after .data to being placed after .text instead.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
With adding support for ARC-V architecture some additional
changes in section definitions are required.
This PR fixes https://github.com/zephyrproject-rtos/zephyr/issues/74421
Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
Add doxygen group with MSC device API and document macro to create
mapping between disk access and MSC LUN.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Created tracing APIs to trace the enter and (exit + result) of
SYS_INIT and DEVICE_DT_DEFINE (and friends).
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Add helper function which calculates the required calibration to
1 Hertz from the actual frequency of an RTC. This helper is both
functional and adds to the documentation of the RTC calibration
API.
The rtc.h header now includes zephyr/kernel.h instead of
zephyr/types.h as __ASSERT_NO_MSG is now referenced in the header.
The commit additionally extends the rtc_api_helpers test suite
with a test to validate the conversion function itself.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
The following heap-related Kconfigs shared by the picolibc &
minimal libc have been deprecated for more than 2 releases,
remove them and update the Kconfigs accordingly:
- `CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE`
- `CONFIG_MINIMAL_LIBC_REALLOCARRAY`
Cleanup the handling to support the deprecated malloc arena
size configuration values.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
These token enums been deprecated for more than 2 releases,
remove them:
- JSON_TOK_LIST_START
- JSON_TOK_LIST_END
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Currently, zbus uses a single global `net_buf`pool to publish messages to
msg_subscribers. It would be good to have a way to separate the pools for
channels related to critical parts of the systems to avoid publication
failure on these particular channels. These channels will not use the
global pool. They can set an isolated pool by calling the
`zbus_chan_set_msg_sub_pool.`
Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
If compiler optimizations are disabled, some compilers (especially
arm_cortex_m) are using unrealistic amounts of stack for dead code.
Currently, if CONFIG_LOG=y and CONFIG_NO_OPTIMIZATIONS=y,
CONFIG_LOG_ALWAYS_RUNTIME is enabled to reduce the stack used by the
logging code.
However, if CONFIG_LOG=n, CONFIG_LOG_ALWAYS_RUNTIME is not available
which causes the compiler to allocate lots of stack space for the (dead)
logging code.
This patch forces runtime message creation when CONFIG_LOG=n. Since all
logging code is dead code when logging is disabled, the behavior should
be unchanged.
Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
Function declaration does not match definition causing a compilation error
when CONFIG_TRACING_OBJECT_TRACKING is enabled.
Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
Add bus emulator support for MSPI and the MSPI controller emulator.
The mspi_emul.c not only serves as an emulator but also provides an
example implementation of the MSPI API. It does not actually do anything
other than validating parameters and forwarding transceive request back
to the device driver emulators.
Signed-off-by: Swift Tian <swift.tian@ambiq.com>
The MSPI(multi-bit SPI) is provided as a generic API to accommodate
advanced SPI peripherals and devices that typically require command,
address and data phases, and multiple signal lines during these phases.
While the API supports advanced features such as XIP eXecute In Place
and scrambling, it is also compatible with generic SPI.
Signed-off-by: Swift Tian <swift.tian@ambiq.com>
__INT16_C, __UINT16_C, __INT8_C and __UINT8_C are not defined in
zephyr_stdint.h and have to be defined in llvm.h when
CONFIG_MINIMAL_LIBC is enabled.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
When CONFIG_MINIMAL_LIBC is enabled, __INTMAX_C and __UINTMAX_C
depend on int_c. Move the build guard to ensure that it is defined
when CONFIG_MINIMAL_LIBC is enabled.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Let eviction algorithms be notified when a given page frame:
- should be considered as possible candidate
- should no longer be considered as candidate
- has just been marked as "accessed"
The NRU algorithm is unchanged so it implements those as empty stubs.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Add add_by_broadcast_name command that scan for broadcast sources
has BT_DATA_BROADCAST_NAME that matches with whatever name is given
to the shell command.
Fixes#70836
Signed-off-by: Babak Arisian <bbaa@demant.com>
The Xilinx AXI Ethernet subsystem is capable of RX/Tx checksum
offloading. While it supports computing IP and UDP/TCP checksums, it
does not support computing ICMP checksums and only computes IP checksums
for ICMP messages. Thus, this patch adds an additional configuration for
ethernet drivers that indicates for which protocols checksum offloading
is (to be) supported. This flag is then considered by the IP subsystem
in determining when flags need to be computed in software.
Signed-off-by: Eric Ackermann <eric.ackermann@cispa.de>
This commit refactors the SSP driver to support the Intel ACE30 PTL
platform. The changes include:
- Adding new structures ssp_rx_dir and ssp_tx_dir to hold the TDM
slot configuration for RX and TX directions
- Adjusting the dai_ssp_set_config_blob functions to work with
the new TDM slot configuration.
Signed-off-by: Damian Nikodem <damian.nikodem@intel.com>
Provide a stub for mprotect() to satisfy the requirement for the
base definitions / system interfaces and subsequently PSE51,
PSE52, PSE52, etc.
Currently, Zephyr's virtual memory-management API does not seem
to support modifying memory protection bits after pages have
already been mapped.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Make POSIX_PAGE_SIZE_BITS not user-configurable and tie it to
CONFIG_MMU_PAGE_SIZE if there is an MMU. Otherwise, simply
default it to something small.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Implement shm_open() and shm_unlink() to complete support for
the _POSIX_SHARED_MEMORY_OBJECTS Option.
Since mmap() support is not yet implemented in Zephyr, I/O is
limited to read(), write(), ftruncate(), lseek(), close(), for now.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
File offset actually varies on a per-file-descriptor basis,
and not with the resource that is abstracted behind the file
descriptor.
This is consistent with both the POSIX model and also the
ISO C/C++ model, so Zephyr should follow suit.
This is very work-around-y, but it's necessary to ensure
that shared memory objects, block devices, files and
directories all behave consistently.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Add a mode field for struct fd_entry, as well as a new
initializer, z_finalize_typed_fd().
The constants ZVFS_MODE_* may be used to differentiate
between fifo, character device, message queues, directories,
semaphores, block devices, shared memory objects, regular files,
symbolic links, and sockets.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Add support for mlockall() and munlockall(). These two functions
comprise the _POSIX_MEMLOCK Option which is required by PSE51,
PSE52, PSE53, and PSE54.
Zephyr's on-demand paging API does not yet support pinning and
unpinning *all* virtual memory regions, so these functions are
expected to fail, setting errno to ENOSYS. Any other usage is
currently categorized as undefined behaviour.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Add support for mlock() and munlock(). These two functions
comprise the _POSIX_MEMLOCK_RANGE Option which is
required by PSE51, PSE52, PSE53, and PSE54.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Add stubs for mmap(), msync(), and munmap() as required by the
_POSIX_MAPPED_FILES Option and POSIX_MAPPED_FILES and
Option Group of IEEE 1003.1-2017.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Move the zvfs_ftruncate() call from fs.c to fdtable.c, as file
types other than regular files can also be truncated.
Instead of hard-wiring zvfs_ftruncate() to fs_truncate(),
add a new ZVFS_IOCTL_TRUNCATE so that the operation can be
handled with other ioctl() operations.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Route the fstat() call (part of POSIX_FILE_SYSTEM) to
zvfs_fstat() so that other types of file descriptors can also
supply file status information.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
An invalid feature test macro was found in in sysconf.h .
It should be corrected from _POSIX_XOPEN_STREAMS to
_XOPEN_STREAMS.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>