Commit Graph

86519 Commits

Author SHA1 Message Date
Benjamin Lucke 9c323d685b Bluetooth: BAP: Shell: Fixed some bap shell cmds
Added missing initialization for cmd_stream_qos and cmd_sync_broadcast.

Signed-off-by: Benjamin Lucke <git@lucke.tech>
2023-10-30 14:57:33 -05:00
Benjamin Lemouzy 9fd0185c3b drivers: audio: add Audio Codec shell commands
Add shell commands to start, stop and set properties of an Audio Codec
device.

Signed-off-by: Benjamin Lemouzy <blemouzy@centralp.fr>
2023-10-30 13:51:28 -04:00
Benjamin Lemouzy 5690387462 drivers: audio: add errors management
Add audio_codec_clear_errors and audio_codec_register_errors_callback
functions to manage audio codec errors.
Callback has to be called from dedicated thread to allow I2C or SPI
operations.

Signed-off-by: Benjamin Lemouzy <blemouzy@centralp.fr>
2023-10-30 13:50:37 -04:00
Simon Hein 169de2c0ee scripts: utils: add guidelines converter script
Add a guidelines rst converter script
to convert the rst document written coding guidelines
into another format.
First supported format is the format for cppcheck

Signed-off-by: Simon Hein <Shein@baumer.com>
2023-10-30 13:46:23 -04:00
Benedikt Schmidt d28262905e tests: kernel: fix thread function signatures
Fix thread function signatures to avoid stack corruption on exit.
Fixes #64578

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-10-30 17:45:59 +00:00
Alberto Escolar Piedras 08f6532b67 Bluetooth: Controller: Fix corruption during BIG_CHANNEL_MAP_IND
radio_pkt_big_ctrl_get() returns a statically allocated
buffer of type pdu_big_ctrl, but the callers expect a
buffer where a whole PDU for a BIG control packet can fit
(not just space for the payload),
and use it as such, overflowing this statically
allocated buffer, and smashing other variables after.

Let's fix it by allocating a buffer of the correct size
to fit a BIG control PDU.

Fixes https://github.com/zephyrproject-rtos/zephyr/issues/64497

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-30 18:36:39 +01:00
Franciszek Zdobylak 0249f15767 tests: drivers: Fix adc labels in sensors test
Fix the labels used in io-channels to be consistent in whole
tests/drivers/build_all/sensor/adc.dtsi file.

Signed-off-by: Franciszek Zdobylak <fzdobylak@antmicro.com>
2023-10-30 12:51:20 -04:00
Flavio Ceolin ecc544d69f headers: arch/cache: Drop extern attr from functions
Drop extern attribute from function signature.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-30 12:51:04 -04:00
Flavio Ceolin 8aa215ff45 headers: syscall_handler: Drop extern attr from functions
Drop extern attribute from function signature.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-30 12:51:04 -04:00
Flavio Ceolin 9910702378 headers: sw_isr_table: Drop extern attr from functions
Drop extern attribute from function signature.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-30 12:51:04 -04:00
Flavio Ceolin f1482c18c2 headers: posix/dirent: Drop extern attr from functions
Drop extern attribute from function signature.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-30 12:51:04 -04:00
Flavio Ceolin 079a83d7f1 headers: sys/printk: Drop extern attr from functions
Drop extern attribute from function signature.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-30 12:51:04 -04:00
Flavio Ceolin b7c3965991 headers: kernel_structs: Drop extern attr from functions
Drop extern attribute from function signature.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-30 12:51:04 -04:00
Flavio Ceolin 49a2ff75d3 headers: kernel_version: Drop extern attr from functions
Drop extern attribute from function signature.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-30 12:51:04 -04:00
Flavio Ceolin a629ac5fac headers: posix/unistd: Drop extern attr from functions
Drop extern attribute from function signature.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-30 12:51:04 -04:00
Flavio Ceolin 51754e3a53 headers: sys/atomic_arch: Drop extern attr from functions
Drop extern attribute from function signature.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-30 12:51:04 -04:00
Flavio Ceolin a077079f45 headers: sys/atomic: Drop extern attr from functions
Drop extern attribute from function signature.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-30 12:51:04 -04:00
Flavio Ceolin 1f86454d1a headers: sys/reboot: Drop extern attr from functions
Drop extern attribute from function signature.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-30 12:51:04 -04:00
Flavio Ceolin 01d61ba18b headers: kernel: Drop extern attr from functions
Using extern attribute in function signatures is not
necessary and it is not consistently across Zephyr headers.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-30 12:51:04 -04:00
Grzegorz Chwierut bbab631021 twister: unittests: Use mock for os.name in unittests
Use mock.patch instead of monkeypatch for os.name in unittests
to fix error when executing tests under VSCode

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2023-10-30 11:50:48 -04:00
Andrej Butok f289c3149b doc: kernel: Fix double "the" for k_thread_deadline_set()
Fix double "the" in the k_thread_deadline_set() description.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2023-10-30 11:50:16 -04:00
Yong Cong Sin 1782011d2c tests: devicetree: api: add tests for new DT APIs
Add tests for new DT APIs added in the previous commit:
- `DT_IRQN_BY_IDX`
- `DT_INST_IRQN_BY_IDX`

Added additional tests for the following existing DT APIs when
`CONFIG_MULTI_LEVEL_INTERRUPTS` is enabled:
- `DT_IRQN`
- `DT_INST_IRQN`

Added `qemu_riscv32` for the multi-level interrupt tests.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-10-30 11:43:39 -04:00
Yong Cong Sin df2c0681d3 devicetree: encode multi-level interrupt number in C devicetree magic
The multi-level encoding of the interrupt number currently
happens in the `gen_defines.py`, which is called in the
`dts.cmake` module after `kconfig.cmake`. However, the number
of bits used by each level is defined in Kconfig and this means
that `gen_defines.py` will not be able to get that information
during build.

To fix this, do the multi-level encoding in C devicetree macro
magic instead of the python script. This ticks one of a
long-standing TODO item from the `gen_defines.py`.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-10-30 11:43:39 -04:00
Yong Cong Sin d7302f417e irq: relocate multi-level irq out of irq.h
Relocate multi-level interrupts APIs out of `irq.h` into
a new file named `irq_multilevel.h` to provide cleaner
separation between typical irq & multilevel ones.

Added preprocessor versions of `irq_to_level_x` as `IRQ_TO_Lx`.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-10-30 11:43:39 -04:00
Bjarki Arge Andreasen 42676e322b doc: gnss: Add GNSS documentation
- Added GNSS documentation entry to peripherals
- Added GNSS API entry to the API overview as 3.6 experimental

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-10-30 11:43:19 -04:00
Bjarki Arge Andreasen b6a8424e95 samples: gnss: Add GNSS sample application
This commit adds a sample which configures a GNSS modem
to enable all available systems, registers callbacks to
the GNSS data and satellites callbacks, and prints the
GNSS data and satellites from the callbacks when invoked
using printk.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-10-30 11:43:19 -04:00
Bjarki Arge Andreasen b60eb1881b drivers: gnss: Add GNSS driver for Quectel LCX6G
This commit adds a GNSS driver for the Quectel LCX6G
series of GNSS modems (LC26G, LC76G, LC86G). It is
based on the modem subsystem, and the GNSS utilities
added in the two previous commits.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-10-30 11:43:19 -04:00
Bjarki Arge Andreasen 2b14e5d84a drivers: gnss: Add nmea0183 match utilities
This commit adds generic matches and handlers for the RMC,
GGA and GSV messages to be implemented as part of all
NMEA0183 based GNSS modems.

NMEA0183 based GNSS modems must place the
struct gnss_nmea0183_match_data struct as the first struct
in their data struct. Their data struct shall then be set
as the user_data for the modem_chat instance.

Lastly, the gnss_nmea0183_match callbacks must be included
in the unsolicited matches for the modem_chat instance.

The GNSS modems will initialize the NMEA0183 match instance
using gnss_nmea0183_match_init.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-10-30 11:43:19 -04:00
Bjarki Arge Andreasen d8bb7c87cf drivers: gnss: Add parsing utils for NMEA0183
This commit adds utilites to parse the RMC and GGA
NMEA0183 messages, which contain all data which shall be
published using the struct gnss_data.

It also adds a test suite for the added utilities.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-10-30 11:43:19 -04:00
Bjarki Arge Andreasen 4cfea4a520 drivers: gnss: Add GNSS parsing utilities
This commit adds parsing utilites for common string
representations of values contained in GNSS messages.

These utilites both parse and validate the integrity of
the data.

Unit tests are also added to validate the parsing
utilities.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-10-30 11:43:19 -04:00
Bjarki Arge Andreasen 03d2671ddd drivers: gnss: Add GNSS dump to log feature
This commit adds dumping of GNSS data and satellites to
the log if CONFIG_GNSS_DUMP_TO_LOG is selected

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-10-30 11:43:19 -04:00
Bjarki Arge Andreasen 2a81c22489 drivers: gnss: Add gnss_dump library
This commit adds a library which dumps the contents of the
gnss structures gnss_info, navigation_data, gnss_time and
gnss_satellite as a string.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-10-30 11:43:19 -04:00
Bjarki Arge Andreasen 28f5f2d1ed drivers: Add GNSS API public header
This commit adds the public header for the GNSS API, along
with the initial GNSS Kconfig file and an entry in the
common linker file for registered GNSS data callbacks.

A very naive implementation of the GNSS data callback is
provided as well in drivers/gnss/gnss_publish.c

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-10-30 11:43:19 -04:00
Bjarki Arge Andreasen ed92612689 data: Add navigation utils header
This commit adds the initial navigation data type and tools
which will lay the foundation to share and process navigation
data between the application and navigation systems like GNSS
and similar triangulation technologies.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-10-30 11:43:19 -04:00
Maciej Perkowski 3314b8e0c3 twister: bugfix: Fix infinite loop in test_plan.py script
Commit 72f416f382 added a horizontal
scan for .yaml files when a modification was made in "common" folder.
If yamls were found in such way, the loop ended. However, the
implementation didn't address what happens if such yamls are not found.
This made the script going into an infinite loop. If yamls are not
found next to "common", the script should proceed as before, i.e. go
to the directory above an start looking there.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2023-10-30 10:54:57 -04:00
Krzysztof Chruściński b1c207b257 logging: Use optimization for simple messages only in kernel
Optimized version of logging for simple messages can work
only in kernel space. Do not use it in user space.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2023-10-30 10:15:49 -04:00
Krzysztof Chruściński a33fff38ae tests: logging: log_benchmark: Fix integration platform
Userspace test was using native_posix which does not support
userspace. Change to qemu_x86.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2023-10-30 10:15:49 -04:00
Andrei Emeltchenko c243991000 tests: work_queue: Change TC_PRINT to LOG_DBG
There are many TC_PRINT()'s in the work_queue test and it make sense
to change them to LOG_DBG() which are disabled by default. Other issue
is that some of TC_PRINT() are inside works for which execution time
is measured.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-10-30 09:29:25 -04:00
Flavio Ceolin a36c016dff kernel: mmu: Fix possible null de-reference
virt_page_phys_get can be called with phy parameter NULL when
the intention is just checking if a virtual address is mapped.

This function is generally overwritten by a an arch API that checks if
phys is null before using it but this default implementation doesn't.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-30 09:23:23 -04:00
Lukasz Mrugala 471cff50e8 scripts: tests: twister: Jobserver tests
Jobserver module was not covered by unit tests.
This change brings its coverage to 100%.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2023-10-30 08:28:02 -04:00
Lukasz Mrugala 3c7968172e scripts: tests: twister: Add error testing
Errors did not have their dedicated test file.
This change adds it to the repo and
checks the only non-def statement there.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2023-10-30 08:27:43 -04:00
Benjamin Cabé 26d7c61370 doc: samples: Show related code samples contents by default
Add required class so that sphinx-togglebutton admonition is expanded by
default.

Also remove sphinx-immaterial code that should not be there.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-30 12:27:00 +01:00
Benjamin Cabé cf1fdc3ea8 doc: samples: Use definition list for code samples
Using an UL with "manually" formatted text was probably an oversight.
Show related samples as a "definition list", with sample name as the
"term" and the description as the "definition".

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-30 12:27:00 +01:00
Benedikt Schmidt be8408cbac usb: fix thread function signatures
Fix thread function signatures to avoid stack corruption on thread exit.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-10-30 12:24:34 +01:00
Benedikt Schmidt c5b252d8f1 testssuite: fix thread function signatures
Fix thread function signatures to avoid stack corruption on thread exit.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-10-30 12:24:34 +01:00
Benedikt Schmidt 24de378986 portability: fix thread function signatures
Fix thread function signatures to avoid stack corruption on thread exit.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-10-30 12:24:34 +01:00
Benedikt Schmidt d7f0da1c78 net: fix thread function signatures
Fix thread function signatures to avoid stack corruption on thread exit.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-10-30 12:24:34 +01:00
Benedikt Schmidt aa25e212d1 tests: fix thread function signatures
Fix thread function signatures to avoid stack corruption on thread exit.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-10-30 12:24:34 +01:00
Benedikt Schmidt 6202459d9f samples: fix thread function signatures
Fix thread function signatures to avoid stack corruption on thread exit.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-10-30 12:24:34 +01:00
Benedikt Schmidt a03f1010b8 drivers: fix thread function signatures
Fix thread function signatures to avoid stack corruption on thread exit.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-10-30 12:24:34 +01:00