Currently spinlock internals are directly accessed from the tests.
This way the test becomes bound to the particular spinlock implementation.
To remove this unnecessary dependency the distinct API to check if spinlock
is locked is introduced.
k_spin_is_locked should be used for the spinlock testing only,
so the scope of this API is intentionally restricted.
Signed-off-by: Alexander Razinkov <alexander.razinkov@syntacore.com>
The previous design with dedicated bits in the structure required a
user to explicitly set each bit.
Using one flags variable allows to extend the features more easily
in the future and avoids breaking existing code.
This change is particularly useful for the FDF and BRS flags required
for CAN-FD support.
See also previous similar change for the CAN driver in
f8a88cdb27
Signed-off-by: Martin Jäger <martin@libre.solar>
The old acpi implimentation is replaced with acpica interface
and updated x86 arch porting with the new interface.
Signed-off-by: Najumon B.A <najumon.ba@intel.com>
add support for retrieve MAD and DMAR table information. Provided
two new interface namely acpi_dmar_entry_get() and acpi_drhd_get()
for retrieve DMA Remapping Reporting and DMA-remapping hardware
unit definition (DRDH).
Signed-off-by: Najumon B.A <najumon.ba@intel.com>
This commit changes the parameter of i2c_dump_msgs function from
string name to pointer to the device structure.
It allows for comparison of device pointers and allow to use
the printed device name in i2c shell commands.
Signed-off-by: Michał Barnaś <mb@semihalf.com>
This instructs the compiler to check that arguments to
__ASSERT/__ASSERT_NO_MSG are valid for printf.
Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
Fixed several comments that were not proper Doxygen ones, causing
documentation for this file to be incomplete.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Added a few missing brief descriptions + fixed existing ones
to use proper Javadoc-style comments.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
According to the mesh 1.1 spec, section 4.4.14.1: “. The access layer
security on the On-Demand Private Proxy Client model shall use the
device key of the node supporting the On-Demand Private Proxy
Server model.“
This commit alters the API and implementation to reflect this.
Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
This splits defines to a separate file, which are commonly needed
by out-of-tree projects whereby the full MCUmgr include cannot be
used due to undefined types being used.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Add TI VIM (Vectored Interrupt Manager) interrupt controller support.
VIM is a TI specific custom interrupt controller for ARM cores.
In J721E soc, VIM aggregates interrupts to Cortex R5 cores.
TRM for J721e https://www.ti.com/lit/zip/spruil1
File: spruil1c.pdf
VIM: section 6.3.3.6
Signed-off-by: Prashanth S <slpp95prashanth@yahoo.com>
Modify the signature of the k_mem_slab_free() function with a new one,
replacing the old void **mem with void *mem as a parameter.
The following function:
void k_mem_slab_free(struct k_mem_slab *slab, void **mem);
has the wrong signature. mem is only used as a regular pointer, so there
is no need to use a double-pointer. The correct signature should be:
void k_mem_slab_free(struct k_mem_slab *slab, void *mem);
The issue with the current signature, although functional, is that it is
extremely confusing. I myself, a veteran Zephyr developer, was confused
by this parameter when looking at it recently.
All in-tree uses of the function have been adapted.
Fixes#61888.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The macro is clearly creating the listener in the enabled
state since it is calling the ZBUS_LISTENER_DEFINE_WITH_ENABLE
with 2nd argument being true. Fix the documentation, and add
the same remark to ZBUS_SUBSCRIBER_DEFINE documentation as
well.
Signed-off-by: Miika Karanki <miika.karanki@vaisala.com>
Compiling smp_dummy.h for C++ is currently
not possible due to a missing end curly bracket.
This commit add the missing end bracket on the same
condition as the start bracket is included.
Signed-off-by: Casper Jørgensen <casperej@gmail.com>
Add alignment parameter to FS_LITTLEFS_DECLARE_CUSTOM_CONFIG macro, it
speeds up read/write operation for SDMMC devices in case when we align
buffers on CONFIG_SDHC_BUFFER_ALIGNMENT, because we can avoid extra copy
of data from card bffer to read/prog buffer. See, how 'card_read_blocks'
function works.
Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
As per #26393, Local APIC is using Kconfig based option for
the base address. This patch adds DTS binding support in the driver,
just like its conunter part I/O APIC.
Signed-off-by: Umar Nisar <umar.nisar@intel.com>
Ram, ram_text and ram_ro regions will be accessed by all CPUs, so that
setting them to INNER_SHAREABLE is more reasonable.
'rbar' occupies 6 bits, correct it to 6.
Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
Add a cast to struct bt_audio_codec_qos for the macro so
that the returned value can used for e.g. sizeof or
similar.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The posix_soc_if.h header includes all functions
one can expect any native board will provide.
These two functions (to set and clear an interrupt
from SW) were missing, but they are also required.
Add them.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Rename BT_AUDIO_CODEC_QOS_[UN]FRAMED to
BT_AUDIO_CODEC_QOS_FRAMING_[UN]FRAMED and give a name
to the enum, which is then used by the
struct bt_audio_codec_qos.
The rename was needed as we had a codec_qos initializer of the
same name, so the values were renamed to avoid duplicated
macro names.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This header is private and included only in architecture code, no need for
it to be in the top of the public include directory.
Note: This might move to a more private location later. For now just
cleaning up the obvious issues.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
If CONFIG_NET_INTERFACE_NAME is enabled (default is y), then
system will automatically set a user friendly name to the network
interface like eth0, wlan0 etc.
Application can change the interface name if needed.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Add option to prefix log message with thread ID or thread name.
Align tests and add test case to the log_output test.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Add Kconfig LOG_THREAD_ID_PREFIX option which allows storing
thread id in the log message and process it as message prefix
(as id or thread name).
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This changes bt_audio_codec_cfg_get_val function to return the data
length found. Otherwise, this function gives no information about the
returned data length.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
The twt and ps helper functions were not namespaced (were missing
wifi_ prefix).
Also change wifi_get_twt_... to more logical wifi_twt_get...
like the other twt prefixed functions and wifi_get_ps... to
wifi_ps_get... like the other ps prefixed functions.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Clean up sizes of some SD data fields, as the max value of these fields
is limited by the SD specification
Specifically, the limits are as follows:
num_io: 0-7, 3 bits (SDIO only)
relative_addr: 16 bits (SDMMC/MMC)
block_size: 12 bits (Max of 2KB, uint16_t used)
sd_version: 8 bits (currently at version 3)
card_speed: 8 bits (could potentially be reduced in size)
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
The commit modifies image list command operations to use
img_mgmt_get_next_boot_slot instead of directly relying of
MCUboot flags.
The function is now used, also, by img_mgmt_slot_in_use to
figure out whether queried slot is in use.
The commit introduces two new Kconfig options
MCUMGR_GRP_IMG_ALLOW_CONFIRM_NON_ACTIVE_IMAGE_SECONDARY
MCUMGR_GRP_IMG_ALLOW_CONFIRM_NON_ACTIVE_IMAGE_ANY
that allow users to enable confirming non-active images slots.
The MCUMGR_GRP_IMG_ALLOW_CONFIRM_NON_ACTIVE_IMAGE_SECONDARY is y
by default to keep original behavior of logic that accidentally
allowed confirming secondary slot.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Implements the posix clock_nanosleep function, where both relative
and absolute sleeps are made as absolute sleeps.
The nanosleep() function is a special case of clock_nanosleep(),
and so has been refactored to simply call it.
Signed-off-by: Tom Finet <tom.codeninja@gmail.com>
This PR adds the following modem modules to the subsys/modem
folder:
- chat: Light implementation of the Linux chat program, used to
send and receive text based commands statically created
scripts.
- cmux: Implementation of the CMUX protocol
- pipe: Thread-safe async data-in/data-out binding layer between
modem modules.
- ppp: Implementation of the PPP protocol, binding the Zephyr PPP
L2 stack with the data-in/data-out pipe.
These modules use the abstract pipes to communicate between each
other. To bind them with the hardware, the following backends
are provided:
- TTY: modem pipe <-> POSIX TTY file
- UART: modem pipe <-> UART, async and ISR APIs supported
The backends are used to abstract away the physical layer, UART,
TTY, IPC, I2C, SPI etc, to a modem modules friendly pipe.
Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
Add TLS_DTLS_CID socket option, which enables to use the Connection ID
extension for the DTLS session.
The option provides control of the use of CID with the `setsockopt()`
function. The value provided can disable, enable, and control whether to
provide a CID to the peer. It uses a random self CID (if told to provide
one to the peer) unless TLS_DTLS_CID_VALUE set previously.
Add TLS_DTLS_CID_VALUE to get or set the CID sent to the peer, if any.
Add TLS_DTLS_PEER_CID_VALUE to get the CID value provided by the peer,
if any.
Add TLS_DTLS_CID_STATUS to determine if CID used, and whether
bidirectional or one way.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Signed-off-by: Pete Skeggs <peter.skeggs@nordicsemi.no>
Added HCI SCO header definition and included comments
that refer to the Bluetooth core spec sections for
the other HCI header types.
Signed-off-by: Victor Chavez <chavez-bermudez@fh-aachen.de>
Add ability to retrieve the shunt voltage if the end user wants to do
the power calculation manually to handle negative power values.
Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
The current-shunt calibration requires a factor of 4x if high-precision
mode is selected.
Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
The use of private APIs z_add_timeout() and friends is not recommended.
With this commit, usual kernel timer APIs are used.
Fixes#61738
Signed-off-by: Martin Jäger <martin@libre.solar>
The connectivity monitoring subfeature of conn_mgr is currently also
named conn_mgr, which is confusing.
This commit renames it to conn_mgr_monitor, or conn_mgr_mon for short,
for clarity.
Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
Add a helper allowing connectivity implementations to more easily access
connectivity flags on connectivity bindings.
Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
Adds conn_mgr_binding_lock/conn_mgr_binding_unlock, which connectivity
implementations can call to lock or unlock the passed in connectivity
binding.
This allows connectivity implementations to safely make direct accesses
to binding data from outside conn_mgr_conn_api callbacks, and should
allow cleaner, more robust connectivity implementations to be written.
Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
Splits many definitions from conn_mgr_connectivity.h off into their own
header, conn_mgr_connectivity_impl.h
conn_mgr_connectivity.h now focuses solely on user/application-facing
APIs, and conn_mgr_connectivity_impl now contains all functions, utils,
definitions intended for use by connectivity implementations, including
conn_mgr_if_get_binding, which is now available for use by connectivity
implementations.
This lays the foundation for allowing connectivity implementations
easier and safer access to their internal state through internal APIs.
Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
For case of 64-bit arc_v3 architecture "str" macro handles large
offsets in incorrrect way. For stl instruction limm swhoud not exceed 255.
Signed-off-by: Nikolay Agishev <agishev@synopsys.com>