Commit graph

15409 commits

Author SHA1 Message Date
Bjarki Arge Andreasen
125ae53431 modem: modem_pipe: Update documentation
This commit updates the documentation for the modem_pipe
modem module.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-10-17 21:58:30 +03:00
Bjarki Arge Andreasen
a7564220cf modem: modem_cmux: Update documentation
This commit updates the documentation for
the modem_cmux modem module.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-10-17 21:58:30 +03:00
Håvard Reierstad
0ec6f18434 Bluetooth: mesh: update model extension
Specifies that if Composition Data Page 1 is enabled, the models passed
to 'bt_mesh_model_extend' needs to be initialized prior to the call.
This is to ensure that the composition data is registered correctly.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2023-10-17 19:11:42 +03:00
Pieter De Gendt
1244f109ee zbus: Remove obsolete function from header
_zbus_timeout_remainder was removed in a7b3584 however 7e44469
re-introduced it in the header.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-10-17 14:27:21 +03:00
Benjamin Cabé
14c1ff25b1 doc: ring_buffer: Properly expose Doxygen doc for ring_buf struct
Move the ring_buf struct in the Doxygen group containing all other APIs.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-14 18:42:34 +03:00
Artur Lipowski
ded2c49e8a fs: nvs: Note about nvs_write with len equal to 0.
Add a note to explain what happens when entry with 0 data length is
written to NVS storage.

Signed-off-by: Artur Lipowski <artur.lipowski@hidglobal.com>
2023-10-13 19:10:57 +01:00
Wilfried Chauveau
f6fe61e598 arch: arm: cortex_m: Fix constraint on inline assembly for armv8-m.baseline
`mov` on armv8-m.baseline, when used with an immediate value is limited to
registers `r0` to `r7`. `=r` tells the compiler any register can be used.
`=l` needs to be used instead.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2023-10-13 13:56:42 +01:00
Henrik Brix Andersen
912fc489b8 net: socketcan: only copy data payload for non-RTR frames
Only copy the data payload for non-RTR frames as RTR frames do not carry
any data.

Fixes: #57002

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-10-13 10:08:45 +03:00
Peter Mitsis
a35e40f410 kernel: Remove mempool_heap
Removes the mempool_heap.h header file as nothing needs it anymore.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2023-10-13 09:56:02 +03:00
Peter Mitsis
e9987aabbc kernel: Remove legacy mem block from mailbox
Memory blocks are a legacy feature and are to be removed from
mailboxes.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2023-10-13 09:56:02 +03:00
Peter Mitsis
2b3821212d kernel: remove unused mailbox message field
Removing the legacy field '_rx_data' from  the mailbox message
structure 'k_mbox_msg' as the mailbox code that used it was removed
over six years ago.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2023-10-13 09:56:02 +03:00
Keith Packard
362d8906a6 kernel: Support platforms with runtime timer freq for thread init_delay
Platforms that determine their basic timer frequency at runtime instead of
build time cannot compute thread initialization timeouts during
compilation.

Switch back to storing the init_delay value in milliseconds and perform the
conversion to a k_timeout_t at runtime.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-10-12 20:39:20 +03:00
Franciszek Pindel
e1647e35c0 linker: riscv: Align .last_section
Zephyr expects __rom_region_size to be aligned to 4, otherwise
assertion will fail.

This commit alignes last_section which results in aligned
__rom_region_size.

Signed-off-by: Franciszek Pindel <fpindel@internships.antmicro.com>
2023-10-12 18:20:35 +03:00
Aleksandr Khromykh
625faa7f03 Bluetooth: Mesh: fix proxy solicitation
Commit makes workable proxy solicitation functionality
only server part without dependencies on client part.
Only on demand proxy server is required.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-10-12 18:07:50 +03:00
Emil Gydesen
24e3966c98 Bluetooth: Improve bt_le_per_adv_sync_create documentation
The bt_le_per_adv_sync_create documentation did not mention
anything about the (lack of) timeout when using the function.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-10-12 16:02:31 +03:00
Jamie McCrae
c67560cbbd mcumgr: grp: settings_mgmt: Handle settings return values
Handles return values from settings handlers which were missing
and would return "Unknown error" to clients instead of the read
error

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-10-12 11:54:30 +01:00
Jamie McCrae
828940b420 mcumgr: grp: fs_mgmt: Fix error on hash/checksum of empty file
Fixes the error code being returned when trying to perform a
hash/checksum on an empty file to show it is because the file is
empty, not because a paramter (which was not provided) was too
large.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-10-12 11:54:01 +01:00
Daniel Leung
04a0cf7d79 kernel: deprecate K_THREAD_STACK_MEMBER
The macro K_THREAD_STACK_MEMBER has actually been deprecated
since v2.4.0 in the macro doxygen description, but it was
never marked with __DEPRECATED_MACRO. Since this was being
used in various drivers, make it follow the deprecation
process.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-10-12 11:07:00 +01:00
Manuel Argüelles
a034cce23c gpio: nxp_s32: support passing external interrupts to WKPU
Extend the NXP S32 GPIO driver to be able to route external interrupts
to either SIUL2 EIRQ interrupt controller or, when available on the
SoC, WKPU interrupt controller.

Since WKPU can support up to 64 external interrupt sources and SIUL2
EIRQ up to 32, gpio_get_pending_int() is removed and the interrupt
controller specific API must be used instead.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-10-11 16:38:34 +01:00
Manuel Argüelles
c8a5cf6728 intc: add NXP S32 WKPU interrupt controller driver
Introduce an interrupt controller for the NXP S32 WKPU peripheral
that can be integrated with GPIO to trigger interrupts through
external interrupt pad inputs.

WKPU can trigger interrupts from certain input pads that support this
function, as well as wake-up events to the power management domain. This
patch only adds WKPU functionality as an interrupt controller to extend
the number of input pads that can interrupt the core. Power management
functionalities are not supported.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-10-11 16:38:34 +01:00
Pavel Vasilyev
7154f356af Bluetooth: Mesh: Ignore duplicate OOB upload request
If a Fw Distribution Client sends the Upload OOB Start message, but the
application layer didn't call bt_mesh_dfd_srv_oob_check_complete yet,
we have no other option other than ignore the message. The next phase
in this case could be Transfer Active, Transfer Success or Failed and it
will be set only after Check Firmware OOB procedure completes.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-10-11 14:04:11 +03:00
Daniel Leung
2d25fae42e kernel: remove deprecated STACK EXTERN macros
These macros have been deprecated since v3.2.0. So remove them.

() K_KERNEL_STACK_EXTERN
   Use K_KERNEL_STACK_DECLARE instead.

() K_KERNEL_STACK_ARRAY_EXTERN
   Use K_KERNEL_STACK_ARRAY_DECLARE instead.

() K_KERNEL_PINNED_STACK_ARRAY_EXTERN
   Use K_KERNEL_PINNED_STACK_ARRAY_DECLARE instead.

() K_THREAD_STACK_EXTERN
   Use K_THREAD_STACK_DECLARE instead.

() K_THREAD_STACK_ARRAY_EXTERN
   Use K_THREAD_STACK_ARRAY_DECLARE instead.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-10-11 11:05:45 +03:00
Keith Packard
eb024b655f libc: Control Z_LIBC_PARTITION_EXISTS from Kconfig
Instead of adding every possible subsystem which places variables in the C
library memory partition in libc-hooks.h, place those conditions in the
related Kconfig files and simplify the libc-hooks.h to just looking at
CONFIG_NEED_LIBC_MEM_PARTITION.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-10-10 23:39:40 +03:00
Robert Lubos
fdaba20b2c doc: net: Add page for net_time
So that the type is visible and "referencable" in the documentation.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-10-10 16:27:32 +03:00
Flavio Ceolin
e7bd10ae71 random: Rename random header
rand32.h does not make much sense, since the random subsystem
provides more APIs than just getting a random 32 bits value.

Rename it to random.h and get consistently with other
subsystems.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-10 14:23:50 +03:00
Aleksander Wasaznik
e5240422cb Bluetooth: hci_driver: Require coop prio bt_recv
Document the general consensus among maintainers that `bt_recv` may not
be called from preemptible priorites.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2023-10-09 19:03:59 +03:00
Aaron Massey
771770a772 fuel_gauge: Remove keep alphabetized comment
The fuel gauge header asks to alphabetize the properties in order to keep
them organized and easy to read. However, this is difficult to enforce
without adding an adhoc script for just this header. In addition, there
aren't so many properties such that it's difficult to parse unsorted. Since
the alphabetization is already not followed and not likely to be easily
followed in the future, remove this ask from the header.

Remove "keep properties alphabetized" from the header.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2023-10-09 19:01:49 +03:00
Aaron Massey
32b27384a6 fuel_gauge: Fix desired current/voltage units
The desired current/voltage properties make use of milliamps/volts while
the present current/voltage properties make use of microamps/volts.

Fix the desired current/voltage properties to be consistent with the
present current/voltage properties where they're most likely to be used
with.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2023-10-09 19:01:49 +03:00
Daniel Leung
c91a572b0e i3c: some doxygen API doc polishing
This polishes the doxygen doc on I3C API to make it,
hopefully, more usable. Fixed some typos too.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-10-09 10:15:49 +02:00
Daniel Leung
edfbc2d7dc kernel: userspace: fix and clean up doxygen
This fixes and cleans up the doxygen doc for architecture
specific userspace APIs.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-10-09 10:15:49 +02:00
Keith Packard
d8b276e929 sys/time_units.h: Make sys_clock_hw_cycles_per_sec() constant if possible
To be used in a global initializer, this must be a macro instead of a
static inline when the return value is constant.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-10-06 20:05:07 +03:00
Keith Packard
ea61c8c1bd sys/time_units.h: Work around clang div-by-zero warning
clang emits a warning for this code:

  foo.c:1:25: warning: division by zero is undefined [-Wdivision-by-zero]
  int i = (10 > 100 ? (20 / (10 / 100)) : (20 * (100 / 10)));
	                        ^ ~~~~~~~~~~

The warning is generated for code whose value does not affect the
expression result, but technically it is still 'undefined behavior'.

Work around this warning by checking for a zero divisor and substituting
one to make the compiler happy.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-10-06 20:05:07 +03:00
Yuval Peress
96175fcc47 sensors: Fix alignment issues
Add padding to the header and remove unnecessary memset in order to fix
alignment faults in cores such as M0 or ones that support
CONFIG_TRAP_UNALIGNED_ACCESS

Signed-off-by: Yuval Peress <peress@google.com>
2023-10-06 14:54:37 +01:00
Yuval Peress
468973513a rtio: cleanup blocking loop
The current blocking model will try calling `rtio_mpsc_pop` twice in a
row without any delay. Probably not the actual intent.

Signed-off-by: Yuval Peress <peress@google.com>
2023-10-06 09:30:11 +01:00
Yong Cong Sin
0722c621c8 util: increase several macros limit from 255 to 4095
Currently, the following macros will only work for 0 - 255:
- `IS_EQ`
- `UTIL_X2`
- `UTIL_INC`
- `UTIL_DEC`
- `LISTIFY`

This patch increases their limit to 4095.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-10-05 06:10:06 -04:00
Moritz Stötter
099d67902e bluetooth: audio: add support for cpp in bap.h
Small patch adding extern "C"

Signed-off-by: Moritz Stötter <hi@moritzstoetter.dev>
2023-10-04 16:35:04 +02:00
Rait Rääk
6c2da47e4c bluetooth: conn: Fix forced pairing request handling
BT_SECURITY_FORCE_PAIR option gets overridden when CONFIG_BT_SMP_SC_ONLY
or CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY is defined. Cache the bit value
before overrides.
Add explicit forced pair handling to existing security level check.
Functionality did not change as this was done implicitly due to integer
comparison for enums.
Add extra clarification to the method doc.
Signed-off-by: Rait Rääk <raitraak@gmail.com>
2023-10-04 14:49:58 +01:00
Benjamin Cabé
0e6bef270e doc: drivers: counter: cleanup Doxygen docs
Properly document structs and convert some @defgroups to @name'd
headings that are more appropriate.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-04 14:48:56 +01:00
Keith Packard
5b76d95a73 kernel: Re-order _static_thread_data initializer to match type
C++ compilers complain if the order of designated initializers doesn't
match the order of the members in the type. Re-order the initializers
for the _static_thread_data struct to match the new order of the type.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-10-03 18:17:47 +01:00
Florian Grandel
f3556f3f8c doc: ieee802154: fix driver API
Fixes a few minor documentation issues that slipped through in the
recent large documentation update:
- Fixes the ordering of sections to follow the ordering of the
  correspondig sections in the IEEE 802.15.4 standard.
- Fixes a few note/detail sections that were not recognized as such.
- Removes internal TODO markers from the publicly visible docs.
- Fixes wording and typos in a few instances.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-10-03 15:10:25 +01:00
Florian Grandel
edb9aa308b doc: ieee802154: fixes L2 docs
Fixes several minor doc glitches that were overlooked in the previous
major doc update:
- Fixes some minor formatting issues.
- Fixes wording and typos in some instances.
- Adds at least a one-sentence definition to all concepts that
  previously only had a spec pointer.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-10-03 15:10:25 +01:00
Benjamin Cabé
9c7672bfbc net: coap: Improve CoAP Doxygen comments
Improve the Doxygen comments for coap.h by adding missing documentation
for most of the compilation units.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-02 16:59:14 +01:00
Benjamin Cabé
fea507faee net: coap: Capitalize and document COAP_MAKE_RESPONSE_CODE macro
- Capitalize COAP_MAKE_RESPONSE_CODE macro to align
  better with coding style
- Added missing Doxygen comments

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-02 16:59:14 +01:00
Johan Hedberg
29521a4bdd posix: Fix release name length in struct utsname
The release name length forgot to take into account the optional
EXTRAVERSION string (e.g. rc1).

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-10-01 20:29:10 +03:00
Johann Fischer
9cb777b95e drivers: uhc: rework transfer buffer handling
The current approach is a bit impractical in the upper layer.
This patch removes the two fifos that hold the transfer buffers
and replaces them with a byte array for the setup packet and
a pointer to a data buffer. The data buffer is mandatory for
all types of transfers except control without a data stage.
The waste of eight unused bytes for non-control transfers should
be insignificant, since an additional pointer would be at least
half of it, and then there would be the overhead of handling it.

This patch also clean up the transfer flags, rename owner to callback
as it reflects the upper layer use case, and add an additional member
to hold the pointer to the USB device (peripheral on the bus).

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-10-01 09:26:07 +03:00
Johann Fischer
960e758e6b drivers: uhc: move transfer status to transfer structure
Aling with the changes in UDC done in the commit ad81b3b797
("drivers: udc: move transfer status to buffer info structure")
This allows us to get the result of synchronous transfer and
simplify uhc_submit_event().

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-10-01 09:26:07 +03:00
Johann Fischer
bb3193a9f0 include: usbh: remove usbh_peripheral and rename class_code
Rename usbh_class_code to usbh_code_triple and remove reserved
member to bettter reflect the purpose of this structure.
Remove unused struct usbh_peripheral.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-10-01 09:26:07 +03:00
Tom Burdick
1369a1d152 llext: Cleanups noted in initial PR
There were a few small nits that were pointed out in the initial PR.
Fixes the LOG_ macro in the arm elf implementation, replaces a few stray
mentions of modules in llext.h with extensions.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-10-01 09:22:18 +03:00
Andrzej Kuros
3d89d58cb8 arch: arm: aarch32: Introduce z_arm_on_enter_cpu_idle_prepare() hook
Introduce an optional hook to be called when the CPU is made idle.
If needed, this hook can be used to prepare data for upcoming
call to z_arm_on_enter_cpu_idle(). The main difference is that
z_arm_on_enter_cpu_idle_prepare() hook is called before interrupts
are disabled.

Signed-off-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
2023-09-30 18:48:19 +02:00
Chandler Keep
27b4b9f4c8 mgmt/MCUmgr/mgmt: Support for finding registered command groups
This commit adds support for finding registered mcumgr command groups.

By default, supported command groups are local to the namespace where
they're registered. This api addition allows applications to get
reference to these supported command groups to deregister & re-register
them.

This adds scope for applications to support multiple implementations
of a command group alongside the default.

Signed-off-by: Chandler Keep <chandlersamkeep@gmail.com>
2023-09-30 18:48:06 +02:00