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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>