Add initial support for nuvoton numaker m55m1x SoC series
including basic init and device tree source include.
Signed-off-by: cyliang tw <cyliang@nuvoton.com>
Add new tracing API which is called when core is exiting from idle.
Current implementation is using it to track CPU load. Implementation
in tracing_none is now weak so it can be used if given backend does
not support new API call.
When CONFIG_CPU_LOAD is enabled then sys_trace_idle also calls a
hook which stores the timing information when CPU entered idle.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Add module which can measure CPU idle time. Idle time is measured in
the pre/post CPU idle hooks but they are not provided by this module.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
These struct and definitions are only used internally by this driver,
move them out of the public interface header and into the driver source.
Signed-off-by: Andrew Davis <afd@ti.com>
The struct address_trans_region_config is already defined, no reason
to pass this in as a void pointer then cast it later. Pass it in
as a struct pointer.
Signed-off-by: Andrew Davis <afd@ti.com>
Clarify the commentary about how the constructor initialization
is setup and why.
(The current text refers to native_posix, which does not
exist anymore).
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Deprecate this header which provides API compatibility since
the header was renamed in 2023, but was never deprecated.
Planned for removal in v4.4.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Fix compilation with CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME=y and
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC unset at the board/SoC level.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Improves readability by removing the need to check the table
to figure out how many antennas devices A and B are using.
Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
Make struct ring_buf 12 bytes smaller by default. This comes with a 32KB
buffer size limit which covers almost all cases. The previous limit of
2GB can be restored with CONFIG_RING_BUFFER_LARGE=y.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Add a selection of interval values that are suitable for BAP,
which will allow better coexistence between ISO and ACL,
for both broadcast and unicast. Some of these are defined
by the BAP spec, and some are defined by Zephyr, since they
do have a suggested value from BAP.
Samples and tests have been updated to use these new values.
Peripheral samples have also been updated with
CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS so that the connection
parameters from the centrals aren't updated to something else
shortly after.
The shell has also been updated to use the LE Audio (BAP) values
if audio is enabled, and the audio.conf file has disabled automatic
updating of the connection parameters as the peripheral, as we rarely
(if ever) want to do that.
Due to the connection interval change, CI hit an issue
with test_bass_broadcast_code in test_main_client_sync, where
the reading of the long receive state did not finish before we
attempted to do another procedure, so the function was updated to have
a retry.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
- Add support for Fetch/Get API.
- Add support for Read/Decode API.
- Add config settings through device-tree.
- Add bus support for SPI (although easily extensible to others as
based on RTIO).
Fetch/Get API tested with accel_polling sample.
Read/Decode API tested with sensor_shell sample.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Add a new set of macros to define devices with de-init capabilities.
This allows to move gradually to de-init without introducing breaking
changes.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Remove restrictions from device_init by allowing to perform device
initialization if the device state flags it being not initialized.
This makes the API usable in contexts where device_deinit has been
called before.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add a new API to de-initialize a device. When a device is
de-initialized, it will release any resources it has acquired
(e.g. pins, memory, clocks, DMA channels, etc.) and its status
will be left as in its reset state.
It is the responsability of the caller to ensure that the device is
ready to be de-initialized.
For now, deinit call always initializes to NULL. New macros will be
introduced to not break existing device APIs.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Instead of passing a single init function, create
struct device_ops with the init function inside. This allows to easily
extend device's capabilities in the future without too much breakage,
e.g. to add a de-init call.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Introduce a new field to store device flags. Only device deferred init
flag has been added, replacing usage of linker hackery to know wether a
device requires initialization at boot time or not. This change will be
helpful in the near future as devices will become reference counted, so we
will need to know wether they have been initialized or not.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Such union is rather redundant, considering a simple const cast can be
done when initializing the init entry. Note that the init_entry does not
need to be touched now that struct device stores the init call. It is
merely an init entry sorted by linker scripts, so we can intertwine
devices and SYS_INIT.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Device init function is no longer taken from `struct init_entry`, so
there's no need to keep such union.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
It just complicates things. It is not C99 strandard, and since C11 is
not mandatory, it is better to play safe here.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This patch adds an initial driver for the WCH DMA
controller. All hardware features and most interface
features are implemented.
Signed-off-by: Paul Wedeck <paulwedeck@gmail.com>
For the `static inline` replacement of the `hostname_set`-function add
`ARG_UNUSED`-macros, such that the compiler does not warn about the unused
arguments.
Signed-off-by: Cla Mattia Galliard <cla-mattia.galliard@zuehlke.com>
Add `extern "C"` guard around the function declarations in drv2605.h.
Without this guard, compiling code with a C++ compiler fails due to name
mangling issues.
Signed-off-by: Manu Sutela <manu.sutela@gmail.com>
Some compilers (iccarm included) does not support BUILD_ASSERT()
to check alignment of arrays.
This fix checks if an IAR compiler is used and disables the
start-alignment check if it is.
Signed-off-by: Björn Bergman <bjorn.bergman@iar.com>
The 'order_key' field in the thread structure '_thread_base' is only
required when CONFIG_SCHED_SCALABLE and/or CONFIG_WAITQ_SCALABLE are
enabled (neither of which is a default setting). Making the existence
of this field conditional slightly reduces the size of the k_thread
structure when neither of those Kconfig options are selected.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
This adds a macro to generate a C99 compound literal string, which allow
to use it in debug log messages, such as:
LOG_DBG("The pixel format is '%s'", VIDEO_FOURCC_STR(fmt->pixelformat));
Signed-off-by: Josuah Demangeon <me@josuah.net>
Adds support for directed IPIs to x86/intel64. Use of direct IPIs
can further reduce the number of schedule IPIs sent and processed
in a system. Fewer IPI related ISRs mean that ...
1. Application code is interrupted less frequently
2. Lower likelihood of scheduler spinlock contention
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
k_sleep() returns a 32 bit count of milliseconds, as that was its
historical API. But it now accepts a potentially 64 bit tick count as
an argument, leading to situations where an early wakeup will produce
sleep times that aren't representable. Clamp this instead of
truncating to an arbitrary value.
Naive code will likely do the right thing with the large return (just
sleeping an extra round), and sophisticated apps can detect INT_MAX to
enable more elaborate retry logic.
(Also fixes a somewhat unfortunate puncutation error in the docs that
implied that it returns zero on early wakeup!)
Fixes: #84669
Signed-off-by: Andy Ross <andyross@google.com>
Add compression support using the accept-encoding
header to the http server static filesystem resource.
Signed-off-by: Carlo Kirchmeier <carlo.kirchmeier@zuehlke.com>
Add stop function to stepper shell. align the function order to match
the one in __subsystem stepper_driver_api struct
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
An option is added to allow vendor specific processing at
scmi_shmem_write_message() and scmi_shmem_read_message().
Additionally code has been added specific to NXP which has
some extended validation features.
Signed-off-by: Andre Heinemans <andre.heinemans@nxp.com>
Use the newly added timeout in various send functions from within
net_context_sendto.
Signed-off-by: Cla Mattia Galliard <cla-mattia.galliard@zuehlke.com>
Allows to send with different timeouts to not block caller in some
situations. Stable API is kept and just calls `try`-variant with a timeout
of `K_FOREVER`.
Signed-off-by: Cla Mattia Galliard <cla-mattia.galliard@zuehlke.com>
The connection object is, and should not, be modified by the function.
Making it const makes it possible to do this simple operation
in functions that also won't change the conn object (i.e.
that uses `const`).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The function supports reading multiple controller-based values.
It is effectively a copy of struct bt_dev_le but in a more
application-oriented definition.
It was chosen to keep the features as an array rather than a
64-bit value, as the comparison macros work on arrays and that
there already exists new bits > 64 in the core spec which is not
yet supported by Zephyr.
It is being smoke tested in a generic GATT client test,
as the individual values may depend on several Kconfig options.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Currently, the soc/stm32/ccm.ld is not handled in
CMAKE_LINKER_GENERATOR.
This commit adds support, making STM32 supportable by
alternative linkers such as AC6 and IAR.
This commit also renames a variable to match all other
LOADADDR symbols.
Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
The coap_client has a static/internal function, has_ongoing_exchange(),
which can be an useful addition to the public API. This would provide
a mechanism to determine when it is safe to close a socket gracefully.
Signed-off-by: Povilas Selevicius <povilas.selevicius@quadigi.com>
Move macro from nrf_clock_control.h to soc_nrf_common.h. Clock control
header fetches many dependencies (e.g. onoff.h) so move macro to more
low level header.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Bugfix previous `osThreadJoin()` implementation where a thread which
exited with `osThreadExit()` could not be joined upon by other threads.
Signed-off-by: Utsav Munendra <utsavm@meta.com>
Add a variant of the SNTP API that does not block while waiting for a
response from the SNTP server. Instead it takes advantage of
`CONFIG_NET_SOCKETS_SERVICE` to read the response asynchronously when
the response is received.
Signed-off-by: Jordan Yates <jordan@embeint.com>
It shouldn't be possible to just 'enable' target mode of a device.
It is required by the specification to perform a handoff or request to
become a target or controller from the active controller. Not to just flip
a switch internally. Can the parameter from `enable` to `enabled` to report
if it is currently a target or a controller otherwise.
Also, add inline helpers for `i3c_config_get` and `i3c_configure` to ensure
the proper struct is passed in.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>