Commit graph

9378 commits

Author SHA1 Message Date
Jeff Daly
f868d391ec Samples: Fix XEC clock control sample code for MEC172x using new GPIOs.
The XEC clock control driver sample code uses enum indexes to offset to
the desired GPIO CTRL register of the package.  These enums are only
used in this example code and are being removed in favor of calculated
indexing into the specific GPIO register memory map.

Signed-off-by: Jeff Daly <jeffd@silicom-usa.com>
2023-08-23 10:06:13 +02:00
romain pelletant
4a49b1d867 sample: net: add tftp client sample
Add simple TFTP client code using TFTP client library
Initiate connection (IPv4) with optional DNS resolution
Operate get operation then put operation in octet mode
Tested on native_posix
Issue/Discussion #60985

Signed-off-by: romain pelletant <romain.pelletant@fullfreqs.com>
2023-08-23 10:05:19 +02:00
Florian La Roche
88a3620ff9 samples/basic: print_sys_memory_stats() removed from hash_map, static
Remove print_sys_memory_stats() from hash_map example as it is not used
there at all. For sys_heap make this a static function.

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
2023-08-22 19:12:59 -04:00
Henrik Brix Andersen
b9585ad96d samples: canbus: isotp: exit if RX thread creation failed, name threads
Exit the sample if creation of any of the RX threads failed. Name the
threads to aid in debugging and monitoring of this sample.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-08-22 18:07:43 +02:00
Henrik Brix Andersen
1f42e14635 samples: canbus: isotp: increase stack size and make it configurable
Increase the stack size of the two RX threads used in the ISO-TP sample
from 512 to 1024 bytes as the former is too small for some CAN
controller/SoC combinations.

Make both the RX thread stack size and priority configurable via Kconfig.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-08-22 18:07:43 +02:00
Daniel Leung
dc0cec972d samples: usb: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung
a52abe157b samples: sensors: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung
196b6959d7 samples: philosophers: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung
732fd2dd0d samples: net: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung
b2f2f85ebd samples: lorawan: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung
8f756af1e1 samples: ipc: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung
ff9ebcb946 samples: fs: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung
cf23bac815 samples: drivers: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung
f0e0c57ad2 samples: boards: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung
081d5a32f0 samples: arch: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Mariusz Skamra
d28f180473 Bluetooth: audio: ascs: Move metadata validation to stack
As the metadata has to be validated anyway, let the initial vaidation of
metadata to be done in ASCS. The application can still reject the
metadata, but the length validation and supported type validation can be
performed by the stack.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-08-22 09:59:53 +02:00
Jaxson Han
2218e80bc2 samples: posix: uname: Set to 1cpu as shell_thread is not SMP-safe
The sample will leverage shell_thread function, which is not SMP-safe.
This will cause issues on some SMP platform. Set CONFIG_MP_MAX_NUM_CPUS
to 1 to fix the issue.

Signed-off-by: Jaxson Han <jaxson.han@arm.com>
2023-08-21 13:27:07 +02:00
Andy Sinclair
f9f246fd7e samples: shields: npm1300_ek: Event callbacks added
Added event callback configuration example to npm1300_ek
shield.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-08-21 10:04:03 +02:00
Grant Ramsay
47ca788185 samples: posix: eventfd: Use NET_TEST config
NET_TEST is the approprite config for networking tests that do not
require a network device. This has the same effect of disabling
NET_SLIP_TAP, but also disables other network devices. This is required
to disable e1000 Ethernet driver on the qemu_cortex_a53 board.

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-08-18 10:13:12 +02:00
Grant Ramsay
3b7bcfa4ab samples: net: sockets: echo_server: Add QEMU A53 as a supported platform
Add qemu_cortex_a53 as a supported platform

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-08-18 10:13:12 +02:00
Jilay Pandya
7a9cda9199 samples: zbus: fix benchmark duration output
The benchmark duration is in nanoseconds, and it logs the duration to
the console in seconds. The conversion is wrong for scenarios where
the execution lasts less than 100 milliseconds. Fix that by adding
leading zeros while printing duration.

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2023-08-18 10:12:50 +02:00
Rodrigo Peixoto
a658eeecd2 samples: zbus: add confirmed channel sample
This commit adds a new sample to zbus that shows how to implement a
confirmed channel. Developers commonly asked about similar features on
zbus discord channel and RFC (in the past). Adding this sample, we can
show developers how to solve their needs (confirmed channels) without
zbus changes.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2023-08-18 10:12:43 +02:00
Anas Nashif
c8a9e445bb Bluetooth: BT_OTS_OACP_CHECKSUM_SUPPORT implies CRC support
BT_OTS_OACP_CHECKSUM_SUPPORT requires CRC to be enabled.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-08-18 08:52:16 +03:00
Yong Cong Sin
96dee583c0 sample: tracing: update README for USER
Update the README.rst to include build instruction for
tracing_user.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-08-17 15:13:17 +02:00
Yong Cong Sin
8e27b2ea8b sample: tracing_user: check for lines from the implementation
Updated the sample to check for lines from the tracing user
implementation to make sure that the glue works.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-08-17 15:13:17 +02:00
Yong Cong Sin
3337c15707 tracing_user: let user implementation to do everything
Let's just let the user implementation to its things, like
checking, locking and stuff.
The tracing_user.c now just acts as a glue.

Moved previous implementation to its sample, and cleaned up
headers.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-08-17 15:13:17 +02:00
Ryan McClelland
57f49ca2d2 samples: bluetooth: fix double promotions
Double promotion warnings are generated with the flag -Wdouble-promotion

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-08-17 13:07:10 +02:00
Daniel Leung
eedc0bf0fa samples: bluetooth: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-17 13:00:09 +02:00
Gerard Marull-Paretas
f623fcf398 samples: hello_world: use printf
Instead of printk. This change aligns the sample a bit more to the
canonical "hello world" sample in C. Also, samples should in general be
as portable as possible.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-17 10:38:26 +02:00
Johann Fischer
42ddc614b1 samples: hid-mouse: rework sample to use input subsys
Overall, this makes the sample code much simpler and smaller.
Whit the changes introduced in commit commit 57e0da4d80
("boards: add zephyr,code properties to the various gpio-keys nodes")'
this example will work out of the box with any board that has at least
zephyr,code = <INPUT_KEY_0>; in its devicetree.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-08-17 09:37:03 +01:00
Eric Holmberg
ef2d7283b2 samples/drivers/adc: add esp32s3 sample support
Add single-shot sample mode support for ESP32-S3 and update documentation.

Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
2023-08-17 10:36:20 +02:00
Gerard Marull-Paretas
2f18ee0664 samples: application_development: drop oot board/driver samples
Because there are more comprehensive examples in the Zephyr's
example-application repository. Application development samples page now
points to example-application as well.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-16 20:31:35 +02:00
Gerard Marull-Paretas
f08a652fed samples: application_development: add link to example-application
Because example-application contains relevant sample code related to
application development.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-16 20:31:35 +02:00
Andrzej Głąbek
993cb30240 samples: blinky_pwm: Use nRF SW PWM driver on nRF DKs
The default nRF hardware PWM driver is not very suitable for this
sample as that driver does not allow setting a period longer than
~262 ms. Use the nRF SW PWM driver instead. This will also ensure
that the driver is built by CI for nRF52, nRF53, and nRF91 Series.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-08-16 16:33:03 +02:00
Andrzej Głąbek
88ab153ac4 drivers: pwm_nrf5_sw: Rename to pwm_nrf_sw
Since the driver can now be also used on nRF91 Series, its name need to
be updated to not cause confusion.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-08-16 16:33:03 +02:00
Diego Elio Pettenò
00dadc6c38 doc: use a linked reference rather than a GitHub reference.
Instead of sending the user out of the documentation site to GitHub
to read the testing instructions, link to the generated page for the
documentation.

Signed-off-by: Diego Elio Pettenò <flameeyes@meta.com>
2023-08-16 14:58:20 +02:00
TOKITA Hiroshi
cedcd2d94e samples: cfb: support MONO01 pixel format
When the pixel format fails to set to MONO10, try to set it to MONO01.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-08-16 14:47:59 +02:00
Lucas Tamborrino
d45e992e58 samples: drivers: ipm: ipm esp32: add wrover board
Add esp32_devkitc_wrover boards to supported platforms

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-08-16 10:25:49 +02:00
Lucas Tamborrino
7360c2e48b samples: drivers: dac: add esp32 wrover board
Add esp32_devkitc_wrover boards to supported platforms

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-08-16 10:25:49 +02:00
Lucas Tamborrino
ea1297d5c9 samples: drivers: adc: add esp32 wrover board
Add esp32_devkitc_wrover boards to supported platforms

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-08-16 10:25:49 +02:00
Lucas Tamborrino
01fa21523f samples: boards: esp32: flash enc: add wrover board
Add esp32_devkitc_wrover boards to supported platforms

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-08-16 10:25:49 +02:00
Balsundar Ponnusamy
5b533a1aa8 samples: subsys: shell: add timer support for shell
adding shell support for app dw timer

Signed-off-by: Balsundar Ponnusamy <balsundar.ponnusamy@intel.com>
2023-08-16 10:20:31 +02:00
Balsundar Ponnusamy
dadbf281d0 samples: drivers: counter: adding support for alarm app
adding support for counter alarm application for ailex and agilex5
platform

Signed-off-by: Balsundar Ponnusamy <balsundar.ponnusamy@intel.com>
2023-08-16 10:20:31 +02:00
Gerard Marull-Paretas
34102e496e samples: boards: esp32: deep_sleep: use sys_poweroff
Use the new sys_poweroff API.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-15 10:15:38 -07:00
Johan Hedberg
03905f7e55 boards: x86: Add intel_ prefix to Elkhart Lake boards
This follows the same convention that has already been adopted by Intel
Alder Lake and Raptor Lake boards.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-08-15 11:24:35 +00:00
Julio Cesar
5e15e8cb48 boards: xtensa: Add support for YD-ESP32 board
Add `yd_esp32` board:

- Model name: YD-ESP32
- Manufacturer: VCC-GND® Studio
- Espressif module: ESP32-WROOM-32E

Signed-off-by: Julio Cesar <hi@jcsx.dev>
2023-08-15 11:15:39 +00:00
Emil Gydesen
53502cb417 Bluetooth: Audio: Make codec_cap const
There is no reason why the capabilities
should be modified by the stack after registration,
nor any reason why a the unicast client application
needs to modify the reported remote capabilities, so
all have been marked as const.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-08-15 11:14:29 +00:00
Emil Gydesen
aa990ae6dc Bluetooth: Audio: Refactor bt_audio_codec_cap to flat arrays
Refactor the bt_audio_codec_cap to use flat arrays to store
metadata and codec specific capabilities.

The purpose of this is to make it easier to copy the data
between layers, but also to support non-LTV data for non-LC3
codec capabilities.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-08-15 11:14:29 +00:00
TOKITA Hiroshi
2c22e067d0 samples: subsystem: display: cfb: Improve to using more CFB functions
Move X position and set  kerning to demonstrate the line wrapping
behavior of characters.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-08-14 18:09:18 +00:00
Emil Gydesen
2c3ee66912 samples: Bluetooth: TMAP BMR: Update to use new sink API
The broadcast sink API has been modified so that all scanning, etc.
will be done by the application, rather than the stack. This commit
updates the sample to use this updated API.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-08-14 13:34:26 +00:00
Emil Gydesen
171273d967 samples: Bluetooth: Broadcast Sink: Update to use new sink API
The broadcast sink API has been modified so that all scanning, etc.
will be done by the application, rather than the stack. This commit
updates the sample to use this updated API.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-08-14 13:34:26 +00:00
Johan Hedberg
2b757f1eca boards: x86: Add intel_ prefix to Intel Raptor Lake boards
This is following the same convention that was recently introduced to Alder
Lake boards (intel_adl). Additionally, an "S" suffix is added to the
boards, since what's currently supported is in fact the Raptor Lake S
variant.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-08-11 19:48:32 +00:00
Benjamin Cabé
fe8ced1e5a doc: lwm2m: samples: fix formatting issue
A sneaky whitespace was causing inconsistent rendering in the list of
available overlays.
Fixed by switching to a list table which is arguably now even easier to
read.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-08-11 19:48:08 +00:00
Nicolas Pitre
deb20ef93b samples/basic/minimal: make it smaller
Add a config entry specifically for RISC-V runtime.
Memory usage is 7066 bytes.

Also adjust some library options. This make the ARC runtime binary
smaller as well:

before:

        FLASH:        8808 B
         SRAM:        3672 B

after:

        FLASH:        5596 B
         SRAM:        3672 B

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2023-08-11 19:47:47 +00:00
Iuliana Prodan
61de87bc50 samples: enable build only test for nxp_adsp_imx8m
Test openamp_rsc_table sample also for nxp_adsp_imx8m.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-08-11 12:01:58 +00:00
Andrei Emeltchenko
e17b3e4a52 smbus: Remove unneeded board overlay configurations
Remove unneeded board configurations since those now selected with
selecting PCH SMBUS driver.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-08-10 13:59:15 +03:00
Andrei Emeltchenko
b92e04e636 samples: tests: Add ehl_crb board overlay
Add board overlay to watchdog sample and test.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-08-10 12:57:39 +03:00
Sreeram Tatapudi
fa471172b7 drivers: counter: cat1: Fix test_single_shot_alarm_notop
TC "test_single_shot_alarm_notop" is failing because there were 2 ISR
callbacks instead of one. this is because of invoking
ifx_cat1_counter_set_int_pending incorrectly. Updated
ifx_cat1_counter_set_alarm to fix this

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2023-08-10 08:13:11 +00:00
Alberto Escolar Piedras
b40c052289 samples drivers led: Fix main return
Since 3a197934fc
main() should be int main(void) instead of void main(void)

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-08-09 16:09:47 +00:00
Alberto Escolar Piedras
5d1eae6399 samples sensing simple: Fix main return
Since 3a197934fc
main() should be int main(void) instead of void main(void)

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-08-09 16:09:47 +00:00
Johan Hedberg
a88808fc9a samples: watchdog: Add overlay for Intel Alder Lake boards
Add watchdog overlays and necessary metadata to support Intel Alder Lake
boards.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-08-09 13:45:38 +00:00
Jeppe Odgaard
e26d018253 samples: flash_shell: rework dump_buffer()
Add an optional compare buffer to check each byte. If the byte differ
the read value will be printed as an error.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-08-09 13:41:23 +00:00
Jeppe Odgaard
5ad65dfe36 samples: flash_shell: rework do_read()
Add an optional compare buffer to check if bytes read
match a provided buffer and print an error if they differ.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-08-09 13:41:23 +00:00
TOKITA Hiroshi
b2b0901c0d samples: sensor: change to use the app.overlay file
The DTC_OVERLAY_FILE variable is specified on the command line.
It's not preferable to set it in CMakeLists.txt.
The app.overlay file is used as the default overlay file, so use it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-08-09 08:29:28 +00:00
Diego Elio Pettenò
762a1f8b42 ev11l78a: initial import of the UPD301C Basic Sink board.
This board is a relatively inexpensive development kit for USB-PD
controllers, using an UPD301C controller.

This Zephyr config includes support for:

 * UART (present on he debug header of the board), tested with the
   hello_world sample application;
 * the one standalone LED (CAP_MIS), tested with the blinky sample
   application;
 * the rotary encoder (PDO_SEL), via ADC, tested with the adc sample
   application;
 * the current sense amplifier (I_SENSE), currently untested;
 * the SPI bus, connected internally in the UPD301C to the UPD350;
 * the I2C bus, exposed on the debug header, currently untested.

Note that the drivers.uart.async_api.rtt has to be disabled, as it is
for other m0 boards with no dma or it fails to build.

Signed-off-by: Diego Elio Pettenò <flameeyes@meta.com>
2023-08-08 19:02:15 +00:00
Keith Packard
cbc5ee3683 samples/boards/google_twinkie_v2_pda: fix main return
switch to int

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-08-07 19:07:43 +00:00
Maciej Sobkowski
112e48eb28 samples: alarm: Add support for apollo4p_evb
Add support for apollo4p_evb to the counter alarm sample.

Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
2023-08-07 16:12:58 +02:00
Fabio Baltieri
57e0da4d80 boards: add zephyr,code properties to the various gpio-keys nodes
Add gpio-keys codes for all boards. These are mostly INPUT_KEY_0 and so
on but I've used some more specific ones where it was obvious that
there's something else on the boards.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-08-07 11:26:26 +02:00
Marek Matej
1622210e75 samples: led_ws2812: ESP32 support
Add overlays for esp32s2, esp32s3, esp32c3 based boards, which
has RGB led assembled. Those boards are capable of driving the
RGB led using SPI. The default MOSI idle level is different
to how DI driver expect it to be.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2023-08-07 11:25:19 +02:00
Florian Grandel
781b6d7b0a samples/doc: segger: rtt: enhanced tracing/logging
Fixes a minor documentation issue and suggests/documents additional RTT
tracing and logging options.

Showcases logging via RTT UART which is now available w/o restrictions
due to the preceding change. This has been tested on CC13/26xx hardware.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-08-06 07:44:06 -04:00
Gerard Marull-Paretas
a99a6756aa samples: boards: mimxrt595_evk_cm33: system_off: use sys_poweroff
Use the new sys_poweroff() API to power off the system.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-04 16:59:36 +02:00
Gerard Marull-Paretas
37b26f40a6 samples: boards: nrf: system_off: use sys_poweroff
Make use of the new sys_poweroff API to actually power off the system.
This lets us remove many hacks present in the sample.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-04 16:59:36 +02:00
Mathieu Anquetin
3f2a6ce86b samples: led_lp50xx: fix color mapping and channel test
Some boards may have less LED child nodes in the DT than the maximum
number of LEDs supported by the chipset. For these boards, the channel
test must skip the missing LEDs when preparing the color buffer and not
exit in error due to missing info.

Also, some boards may have a color mapping that is different from RGB
and this mapping should be used when providing the buffer to
led_set_color().

Signed-off-by: Mathieu Anquetin <mathieu.anquetin@groupe-cahors.com>
2023-08-04 13:18:01 +02:00
Mathieu Anquetin
26f4fab391 drivers: led: lp503x: extend driver to all lp50xx devices
Add support for LP5009, LP5012, LP5018 and LP5024 devices which only
differ by the number of LEDs they can control.

Also, update application sample to run on all these new supported
devices.

Based on initial work from:
  - Marek Janus <marek.janus@grinn-global.com>
  - Rico Ganahl <rico.ganahl@bytesatwork.ch>

Signed-off-by: Mathieu Anquetin <mathieu.anquetin@groupe-cahors.com>
2023-08-04 13:18:01 +02:00
Fabio Baltieri
693b19d0f2 input: add zephyr/ prefix to the event code sample and docs
The system still takes both prefixed and unprefixed dt-bindings files,
but let's use zephyr/ prefixed in the examples and documentation.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-08-04 10:41:57 +02:00
Johann Fischer
ee43610b96 samples: usb: hid: remove SYS_INIT
There is no need to use SYS_INIT as the HID specific initialisation
can be done in the main before the usb_enable() call.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-08-04 10:41:38 +02:00
David Ullmann
7c76464c14 samples: blinky_pwm: mimxrt685_evk_cm33 use ctimer for pwm
add overlay for using ctimer pwm driver
Signed-off-by: David Ullmann <davidu@meta.com>
2023-08-03 12:39:06 -04:00
Franciszek Zdobylak
16183f665e samples: subsys: fs: create common fs sample
Sample for FAT fs is reworked to run also with Ext2 file system

Signed-off-by: Franciszek Zdobylak <fzdobylak@antmicro.com>
2023-08-03 12:22:01 -04:00
Evgeniy Paltsev
168de28b40 samples: add no-timers configuration which is runtime tested
Add no-timers configuration to sample.minimal to check that
it's actually working in runtime.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2023-08-03 07:32:03 -04:00
Manuel Argüelles
11b94f3155 boards: mr_canhubk3: enable EMAC
This board has a single instance of EMAC connected to a NXP TJA1103
Ethernet PHY. Currently, there is no driver for this PHY and its
pin strapping configuration allows to use it without software
configuration, so EMAC is configured as fixed link.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-08-03 10:28:20 +02:00
Wei-Tai Lee
e6d6df579a samples: drivers: spi_flash: add adp_xc7k_ae350 surport
Add adp_xc7k_ae350 support in spi_flash driver sample

Signed-off-by: Wei-Tai Lee <wtlee@andestech.com>
2023-08-03 10:28:02 +02:00
Seppo Takalo
838ab80bca net: coap: Use 64bit timestamps
Use 64bit timestamps from k_uptime_get() so they don't
roll over during the expected device lifetime.

Fixes #60826

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-08-01 15:40:04 +02:00
Seppo Takalo
1dfa711167 net: lwm2m: Create socketpair that can wake up zsock_poll()
Allow socket-loop to wake up immediately, if there are changes,
instead of waiting for zsock_poll() to timeout.
This change makes engine more reactive and removes
hard coded timeout from zsock_poll().

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-08-01 12:07:12 +02:00
Manuel Arguelles
42e8678d2a samples: task_wdt: add scenario without hw fallback
Add new sample scenario without using a hardware watchdog as fallback.
This is used for the moment only for the mr_canhubk3 board, but a
generic configuration is introduced that can be used by other boards if
needed.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-08-01 09:51:16 +02:00
Manuel Arguelles
cb54a31b28 samples: watchdog: add support for NXP FS26 watchdog
This watchdog doesn't allow to stop on CPU halt by debugger.
It also requires a minimum window value different than zero
so that the watchdog is refreshed during the open window.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-08-01 09:51:16 +02:00
Emil Gydesen
ef7c775fc2 samples: Bluetooth: ISO broadcash benchmark advanced ISO
Add (optional) advanced ISO support for the benchmark ISO
sample. The CONFIG_BT_ISO_ADVANCED Kconfig simply needs to
be enabled in order to support the advanced settings.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-07-31 09:04:52 +00:00
Emil Gydesen
2187f6b29c samples: Bluetooth: ISO connected benchmark advanced ISO
Add (optional) advanced ISO support for the benchmark ISO
sample. The CONFIG_BT_ISO_ADVANCED Kconfig simply needs to
be enabled in order to support the advanced settings.

This also reduces the number of default channels supported
to 1.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-07-31 09:04:52 +00:00
Francois Ramu
248cd36505 samples: subsys: nvs on nucleo_g474re requires 6kB for storage partition
Add the overlay for running the samples/subsys/nvs/ application
on the nucleo_g474re. Define a 6kB storage_partition at the end of the
512kB flash.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-07-31 10:09:38 +02:00
Cong Nguyen Huu
19f33b8ecb samples: drivers: adc: enbale test for mr_canhubk3
Enable all channels that available connector on board.
ADC0 channel 6 on precision group with normal end chain
callback.
ADC1 channel 2 on precision group with normal end of
conversion callback.
ADC2 channels 3, 4, 5 on precision group with normal end
of conversion callback.

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2023-07-28 08:55:38 -05:00
Gerard Marull-Paretas
bc522affc7 samples: subsys: pm: latency: remove redundant PM_STATE_ACTIVE case
pm_state_set() will never be called with PM_STATE_ACTIVE.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-07-28 09:09:01 +00:00
Florian Grandel
a4cd5cee40 drivers: ieee802154: consistent high res timestamps
The IEEE 802.15.4 API and networking subsystem were using several
inconsistent timestamp resolutions and types. This change defines all
timestamps with nanosecond resolution and reduces the number of
available types to represent timestamps to two:
* `struct net_ptp_time` for PTP timestamps
* `net_time_t` for all other high resolution timestamps

All timestamps (including PTP timestamps) are now referred to a
"virtual" local network subsystem clock source based on the well-defined
types above. It is the responsibility of network subsystem L2/driver
implementations (notably Ethernet and IEEE 802.15.4 L2 stacks) to ensure
consistency of all timestamps and radio timer values exposed by the
driver API to such a network subsystem uptime reference clock
independent of internal implementation details.

The "virtual" network clock source may be implemented based on arbitrary
hardware peripherals (e.g. a coarse low power RTC counter during sleep
time plus a high resolution/high precision radio timer while receiving
or sending). Such implementation details must be hidden from API
clients, as if the driver used a single high resolution clock source
instead.

For IEEE 802.15.4, whenever timestamps refer to packet send or receive
times, they are measured when the end of the IEEE 802.15.4 SFD (message
timestamp point) is present at the local antenna (reference plane).

Due to its limited range of ~290 years, net_time_t timestamps (and
therefore net_pkt timestamps and times) must not be used to represent
absolute points in time referred to an external epoch independent of
system uptime (e.g.  UTC, TAI, PTP, NTP, ...).

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-07-28 09:06:35 +00:00
Marc Desvaux
ae72fa7bf6 samples: net: zperf: add Ethernet twister test
add one Ethernet twister test for nucleo_h563zi,
nucleo_h743zi, nucleo_f429zi, nucleo_f746zg.
remove the common: harnesses: net  that are not supported
leave harnesses: net for all other test execpt the one we use

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-07-27 16:24:54 +00:00
Andriy Gelman
d8f955e375 drivers: pwm: Add driver for xmc4xxx using ccu8 module
Adds driver for pwm on xmc4xxx using Capture Compare Unit 8 (CCU8)
module. There are two CCU8 nodes with each one having four slices.
Each slice has two output channels.

Unlike CCU4, this module can generate complementary high-side/low-side
signals for each output channel. A variable dead time can be added
during the off to on transitions to make sure that the
high-side/low-side signals are not on at the same time.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-07-26 15:09:41 +02:00
Andriy Gelman
23b6e4f507 drivers: pwm: Add driver for xmc4xxx using ccu4 module
Adds driver for pwm on xmc4xxx using Capture Compare Unit 4 (CCU4)
module. There are four CCU4 with each one having four channels
Thus it's possible to have up to 16 pwm output signals. The output of
each channel can only be connected to a specific port/pin. The possible
connection and gpio configurations are defined using pinctrl.

The CCU4 module also has a capture mode. Capture support will be added
in the future.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-07-26 15:09:41 +02:00
Gerard Marull-Paretas
7ef8911e8c samples: basic: hash_map: fix libc heap size setting
The malloc arena/heap size setting can be adjusted using different
Kconfig options, depending on the libc implementation. This means
prj.conf can't be used to set this value on projects that can be built
for multiple libcs without generating a Kconfig warning.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-07-26 14:53:51 +02:00
Johann Fischer
430818ecaa sample/tests: remove CONFIG_USB_COMPOSITE_DEVICE usage
This is no longer necessary, as this option is selected as a dependency
for class implementations where it is required.
Also remove redundant test cases.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-07-26 14:37:15 +02:00
Iuliana Prodan
f4f261bce5 samples: openamp_rsc_table: increase stack size
While testing openamp_rsc_table sample for HiFi4 DSP from
i.MX8MP, realized the stack is not enough.
Increase the size based on Thread Analyzer measurements:

*** Booting Zephyr OS build zephyr-v3.4.0-971-g9415baf2c211 ***
Starting application threads!

OpenAMP[remote]  linux responder demo started

OpenAMP[remote] Linux sample client responder started

OpenAMP[remote] Linux tty responder started
[00:00:00.020,000] <dbg> openamp_rsc_table: mailbox_notify:
mailbox_notify: msg received

[00:00:00.024,000] <dbg> openamp_rsc_table: mailbox_notify:
mailbox_notify: msg received

Thread analyze:
 0x9240c5a0          : STACK: unused 240 usage 1296 / 1536 (84 %); CPU: 10%
      : Total CPU cycles used: 3388523
 0x9240c628          : STACK: unused 240 usage 784 / 1024 (76 %); CPU: 10%
      : Total CPU cycles used: 4086621
 0x9240c6b0          : STACK: unused 408 usage 616 / 1024 (60 %); CPU: 7%
      : Total CPU cycles used: 3553673
 0x9240c738          : STACK: unused 152 usage 872 / 1024 (85 %); CPU: 44%
      : Total CPU cycles used: 25529572
 0x9240c7c0          : STACK: unused 352 usage 672 / 1024 (65 %); CPU: 21%
      : Total CPU cycles used: 13742359
 0x9240c888          : STACK: unused 936 usage 88 / 1024 (8 %); CPU: 0%
      : Total CPU cycles used: 0
 ISR0                : STACK: unused 1536 usage 512 / 2048 (25 %)

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-07-26 14:33:36 +02:00
Iuliana Prodan
393a7e107d samples: add support for nxp_adsp_imx8m in openamp_rsc_table
Add the dts and config overlay for nxp_adsp_imx8m board
in order to have the openamp_rsc_table sample working on
HiFi4 DSP from i.MX 8M Plus.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-07-26 14:33:36 +02:00
Kevin Wang
7bfe096787 samples: drivers: mbox: Support the new board adp_xc7k_ae350
Modify the related source in mbox sample to support board adp_xc7k_ae350.

Signed-off-by: Kevin Wang <kevinwang821020@google.com>
2023-07-26 10:51:41 +02:00
Manuel Argüelles
87e40d8b6d samples: enable flash samples for mr_canhubk3 board
Various samples enabled to use the on-board QSPI memory.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-07-26 09:44:14 +02:00
Pavlo Havrylyuk
f4a1d40924 drivers: counter: Add Infineon CAT1 counter driver
Add initial version of Infineon CAT1 counter driver
Add initial version of binding file for Infineon
Add counters to psco6 dtsi
Add external trigger pin that runs counter

Signed-off-by: Pavlo Havrylyuk <pavlo.havrylyuk@infineon.com>
2023-07-26 09:10:31 +02:00
Pieter De Gendt
8cbb6c8a0c samples: drivers: crypto: Add testcase for NXP MCUX DCP
Add a testcase for mimxrt1064_evk to be able to run the crypto
sample.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-07-26 09:09:48 +02:00
Pieter De Gendt
e1e19732bc samples: drivers: crypto: Aligned AES key
Some drivers require the encryption key to be 4-byte aligned.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-07-26 09:09:48 +02:00
Pieter De Gendt
16f34e969b samples: drivers: crypto: Simplify configuration
Use a default prj.conf to be used for all samples and use
EXTRA_CONF_FILE for specifics.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-07-26 09:09:48 +02:00
Girisha Dengi
ba40e9fded samples: subsys: shell: Custom configs for intel_socfpga_agilex* boards
The intent of this change is to add custom shell configurations for
intel_socfpga_agilex* based boards. As of now, configurations are
added for 'intel_socfpga_agilex5_socdk' board.

Signed-off-by: Girisha Dengi <girisha.dengi@intel.com>
2023-07-25 16:58:01 +00:00
Marek Matej
6b57b3b786 soc: xtensa,riscv: esp32xx: refactor folder structure
Refactor the ESP32 target SOCs together with
all related boards. Most braking changes includes:

- changing the CONFIG_SOC_ESP32* to refer to
  the actual soc line (esp32,esp32s2,esp32s3,esp32c3)
- replacing CONFIG_SOC with the CONFIG_SOC_SERIES
- creating CONFIG_SOC_FAMILY_ESP32 to embrace all
  the ESP32 across all used architectures
- introducing CONFIG_SOC_PART_NUMBER_* to
  provide a SOC model config
- introducing the 'common' folder to hide all
  commonly used configs and files.
- updating west.yml to reflect previous changes in hal

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2023-07-25 18:12:33 +02:00
Marek Matej
3776402f40 boards: xtensa: esp32 board split
Remove virtual esp32 board and replace it with the
real word boards:

- esp32_devkitc_wroom
- esp32_devkitc_wrover (with PSRAM option)

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2023-07-25 18:12:33 +02:00
Robert Lubos
9866a5229d samples: net: dns_resolve: Improve DHCPv4 handling
There is some ambiguity with the DHCPv4 handling in the dns_resolve
sample. On one hand, the sample uses net_config library, which does
initiate the DHCPv4 on the interface (if enabled) and may block the
initialization until the address is assigned (in case there is no other
statically assigned IPv4 addresses.) On the other hand, the sample
registers for NET_EVENT_IPV4_ADDR_ADD in case DHCPv4 is in use, delaying
the DNS queries until address is assigned.

In case net_config delayed the initialization however, this will not
work, as the event handler will be registered only after DHCPv4 address
is assigned, so the callback will not get executed.

Fix this, by checking if DHCPv4 assigned address already exists on an
interface - if so, schedule DNS queries immediately. Otherwise (for
example in case when net_config was not configured to wait for address)
register an event callback, and schedule queries from there.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-07-25 14:18:54 +02:00
Carlo Caione
15e84cbfac dts: Move to 'zephyr,memory-attr'
Move to 'zephyr,memory-attr' and use the newly introduced helpers.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-07-25 11:22:10 +02:00
Daniel DeGrasse
3c23ff051d boards: arm: mimxrt1060_evk: enable PXP rotation for LVGL sample
Enable PXP rotation for LVGL sample. The PXP is configured to
rotate by 0 degrees, so the original image is left untouched.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-07-25 09:10:52 +02:00
Daniel DeGrasse
d209c837b5 boards: arm: mimxrt1170_evk: enable PXP
Enable PXP engine with RT1170 EVK. The PXP is set to rotate by 0
degrees in the LVGL sample, for testing purposes.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-07-25 09:10:52 +02:00
Jason Yuan
ad555d08d8 samples: boards: firmware for Twinkie V2
sample firmware for Twinkie V2 that toggles the LED based on charging
status.

Signed-off-by: Jason Yuan <jasonyuan@google.com>
2023-07-25 09:08:19 +02:00
Hiroki Tada
33e0bca014 samples: Remove esp32_temp_sensor
- esp32_temp_sensor is removed as die_temp_polling is used instead of it.

Signed-off-by: Hiroki Tada <tada.hiroki@fujitsu.com>
2023-07-24 13:22:03 +00:00
Hiroki Tada
7e3f0ef407 samples: Add esp32s2_saola overlay
- Add overlay for the esp32s2_saola board to die_temp_polling sample.
- Add aliases for the die_temp_polling sample to esp32s2 dtsi.

Signed-off-by: Hiroki Tada <tada.hiroki@fujitsu.com>
2023-07-24 13:22:03 +00:00
Fabian Blatz
a8b103e4ad samples: lvgl: Enable lvgl shell
Activate the lvgl shell with memory statistics and monkey testing support
for the lvgl sample.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-07-24 09:06:56 +00:00
Daniel DeGrasse
351cb4bafe samples: drivers: add led_is31fl3733 sample to demonstrate usage
Add sample to demonstrate usage of IS31FL3733 LED using the LED API.
This led matrix controller has several custom APIs to expose
functionality not available within the standard led API, such as
limiting LED current.

Signed-off-by: Daniel DeGrasse <daniel@degrasse.com>
2023-07-21 10:51:18 +00:00
Guillaume Gautier
276b5577cb samples: drivers: adc: boards: Add overlay for NUCLEO_WBA52CG
Add overlay for NUCLEO_WBA52CG

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-07-20 16:25:02 +02:00
Felipe Neves
da3ae1af61 samples: drivers: ipm: added IPM over IVSHMEM sample
To demonstrate how to configure Zephyr to use the IPM
driver over the IVSHMEM subsystem. Since this driver
is intended to generate inter QEMU VM notifications
it was better to create a sample app using the shell
for quick demonstration for the users.

Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2023-07-20 10:44:57 +00:00
Gerard Marull-Paretas
bddf2d9dc0 tests: pm: select HAS_PM
Some tests provide their own PM hooks, adapted for testing purposes. Add
a new option to select HAS_PM, so that CONFIG_PM can be enabled.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-07-20 10:33:00 +00:00
Michael Zimmermann
0da94225b0 arch/posix: make posix_fuzz_buf const
The original buffer is const as well and we're not allowed to modify it.

Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com>
2023-07-18 19:19:53 +00:00
Michael Zimmermann
8de34fef19 arch/posix: use size_t for posix_fuzz_sz
That's the type of the original argument and we should use it internally as
well to prevent truncating the value.

Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com>
2023-07-18 19:19:53 +00:00
Silviu Petria
f3aaf33422 Bluetooth: Audio: Add TMAP broadcast samples
Add two TMAP broadcast sample applications.

tmap_bms implements the Broadcast Media Sender role. It uses CAP
Initiator broadcast APIs to broadcast an audio stream.

tmap_bmr implements the Broadcast Media Receiver role. It scans and
syncs to the PA having filtered the EA by the presence of TMAP role
information. It also instantiates the VCP.

Signed-off-by: Silviu Petria <silviu.petria@nxp.com>
2023-07-18 11:09:31 +00:00
Chaitanya Tata
631312334e samples: lwm2m: Fix default ID length check for DTLS
If the default which is set to CONFIG_BOARD is used, then the lwm2m
client fails to set the client identity as the default maximum length
allowed is only 16 and for some boards this exceeds.

So, increase the default length to accomodate almost all boards. Also
add a build assert for the length validation.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2023-07-18 11:08:23 +00:00
Mariusz Skamra
c09c4181cf Bluetooth: audio: tbs_client: Minor Kconfig refactor
This intoduces dedicated Kconfig option to enable TBS client,
that makes the configuration more intuitive.
While configuring GTBS only, the user does not have to explicitly set
the BT_TBS_CLIENT_MAX_TBS_INSTANCES to 0 to disable the TBS client
functionality.
This adds also `tbs_only_client` test case to test the TBS only build
option.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-07-18 11:06:57 +00:00
Wojciech Sipak
6fe016984c boards: efm32pg_stk3402a: use gecko-adc
This adds a proper ADC node that uses the gecko-adc driver.

Signed-off-by: Wojciech Sipak <wsipak@antmicro.com>
2023-07-18 11:05:39 +00:00
Robert Lubos
87ee12ae72 samples: net: echo_client: Fix build with UDP disabled
In case UDP is disabled, init_udp() is not compiled and the build
fails. Fix this, by providing dummy implementations for UDP functions,
in case UDP is disabled.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-07-17 17:21:33 -04:00
Robert Lubos
1f1f550ad6 samples: net: echo_client/server: Fix mbed TLS dependency
All application level TLS operations should be guarded with
"#if defined(CONFIG_NET_SOCKETS_SOCKOPT_TLS)" and not mbed TLS configs
only. Otherwise, in case mbed TLS is enabled, but the sample is not
configured to use TLS (hence TLS credential library is not available
for example), the build may fail or produce spurious warnings.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-07-17 17:21:33 -04:00
Nerijus Bendžiūnas
397ed142ad doc: fix :zephyr-app: paths
During testing I've found one bad path and looked if
there is more.

I've used this oneliner to find more:

```
rg :zephyr-app: | awk '{ print $3 }' | while read dir
do
    test -d $dir || echo $dir
done | grep '^samples' | grep -v '<' | sort | uniq

```

Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@gmail.com>
2023-07-17 16:51:16 -04:00
Ryan McClelland
9603c0ce75 samples: sensor: lsm6dso: fix double promotion warning
fix double promotion warning when compiling with
-Wdouble-promotion

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-07-17 13:02:46 -05:00
Nick Ward
371f0f2503 drivers: adc: use adc_is_ready_dt helper function
Update  `struct adc_dt_spec` use with adc_is_ready_dt()

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-07-17 10:16:22 +00:00
Chen Xingyu
18d60b9c5d samples: driver: auxdisplay: Add overlay for PT6314 on esp32c3_devkitm
This demo is done on a Futaba M202MD15FA module, wired as:

* STB   -> PIN5
* SCK   -> PIN6
* SI/SO -> PIN7

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2023-07-14 12:09:03 +02:00
Fabio Baltieri
04e0e458c8 input: convert gt911 from kscan
Convert the GT911 driver to the input subsystem, fix the existing boards
to work in the default config.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-13 14:24:50 +00:00
Loic Poulain
df7749129f samples: cdc_acm: Add 96b_carbon to usbd-next board
This board can rely on udc_stm32 usbd-next driver.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2023-07-13 10:44:42 +02:00
Fabio Baltieri
15f78fa545 samples: input_dump: use CONFIG_INPUT_EVENT_DUMP
Now that input dump functionalities are at subsystem level, drop the
custom code from the sample, just enable CONFIG_INPUT_EVENT_DUMP.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-12 10:53:04 +00:00
Daniel DeGrasse
158feb641a samples: drivers: kscan: enable logging, and add RK055HDMIPI4M shield
Enable logging by default in kscan sample, so that user will see output
even if they do not have a keyboard connected that follows the keymap.
Add a specific testcase for boards that support the RK055HDMIPI4M
display.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-07-11 09:53:38 -05:00
Daniel DeGrasse
933c9f4351 boards: arm: mimxrt595_evk: remove RK055HDMIPI4M display definition
Remove display definition from RT595 EVK, as this is now supported by
the shield. Add gpio nexus for the FFC connector on this EVK.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-07-11 09:53:38 -05:00
Maximilian Deubel
860515a3ad samples: subsys: usb: webusb: Fix Win10 detection
This patch refactors the usage of MS OS 2.0 descriptors in the
WebUSB sample. The function subset header was removed since it
is not allowed for non-composite devices.
Also, a new random GUID was added for automatic driver installation.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2023-07-10 09:26:30 +02:00
Yong Cong Sin
59adf0bb74 samples: posix: add sample for uname
Add a simple, testable sample to print everything in the utsname struct,
and added a `uname` shell cmd basically copied from nuttx just for fun.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-07-09 16:57:16 -04:00
Francois Ramu
f94fd8e60c samples: subsys: usb cdc acm composite with mini nb of USB EndPoints
The stm32f207 and stm32f429 target boards only have 4 bidir EP
on the USB FS node. This is not enough to run the sample:
simply exclude those 2 target platforms

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-07-07 09:18:09 +02:00
Arnaud Pouliquen
f260dc10a9 samples: ipc: rename virtio_xxx static functions in openamp remote
The "virtio_" prefix is used by the open-amp library API.
Rename local functions using "ipc_virtio_" prefix to avoid
function redefinition.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2023-07-06 09:47:59 +00:00
Alberto Escolar Piedras
c3dc01ddf3 samples zbus remote mock: Add overlay for native_sim
Add overlay configuration for native_sim, and enable it
for this platform in the test yaml filter.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-07-05 07:01:19 -04:00
Alberto Escolar Piedras
3af65caed0 samples display lvgl: Add overlay for native_sim
Add overlays for the native_sim board

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-07-05 07:01:19 -04:00
Alberto Escolar Piedras
5abee92a6c samples zbus uart_bridge: Add overlay for native_sim
Add overlay configuration for native_sim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-07-05 07:01:19 -04:00
Jerzy Kasenberg
cc53f3f021 samples: drivers: counter: alarm: add support for the Smartbond Timer
Add support for the Renesas Smartbond Timer IP to the counter alarm sample.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2023-07-05 13:00:50 +02:00
Arnaud Pouliquen
b227f89bcd samples: ipc: rename virtio_xxx static functions
The "virtio_" prefix is used by the open-amp library API.
Rename local functions using "ipc_virtio_" prefix to avoid
function redefinition.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2023-07-05 09:15:08 +02:00
Jiaxuan Weng
33e3ddd4d5 boards: xtensa: Add support for xiao esp32s3
add board support and overlay for seeed xiao esp32s3.

Signed-off-by: Jiaxuan Weng <1391548050@qq.com>
2023-07-03 09:31:27 +02:00
Vinayak Kariappa Chettimada
121c505153 samples: Bluetooth: iso_broadcast: Sent callback to sync ISO Data send
Use the ISO Data sent callback in iso_broadcast sample to
synchronize the ISO data send. ISO Data sent callback is
generated every SDU interval corresponding to the number of
completed packets event generated by the Controller.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-06-30 16:11:06 +02:00
Emil Gydesen
db8bb73eae samples: Bluetooth: Add CAP AD for TMAP peripheral
The TMAP peripheral sample was missing the CAP announcement
service data.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-06-30 16:08:00 +02:00
Jai Arora
cf0ff30b53 bluetooth: ots: Fix bt_ots_init paramter struct naming
Patch to rename struct bt_ots_init to struct bt_ots_init_param
to avoid duplicating the name bt_ots_init.

Fix for issue#45968

Signed-off-by: Jai Arora <infolinesoni@gmail.com>
2023-06-30 16:06:08 +02:00
Emil Gydesen
69f7fd9cb2 Bluetooth: Audio: Rename bt_codec to bt_audio_codec_{cap, conf, data}
Rename the bt_codec struct to bt_audio_codec_conf or
to the new struct bt_audio_codec_cap.
Rename the bt_codec_data to bt_audio_codec_data.

The purpose of this is to split the codec specific configuration
and codec capabilities into seperate structs, as they do not
reflect the same values, or used for the same purpose.

This commit depends on the preset macros workings on either
type of struct (for now), but will be modified in future updates.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-06-30 12:39:50 +02:00
Mariusz Skamra
17223f136f Bluetooth: audio: Fix metadata length checks
This fixes metadata length checks for BT_AUDIO_METADATA_TYPE_EXTENDED
and BT_AUDIO_METADATA_TYPE_VENDOR that should be at least 2 bytes long.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-06-29 21:06:58 +02:00
Mariusz Skamra
db5767e50f Bluetooth: audio: Accept empty CCID list in audio metadata
The CCID list can be empty, as the Assigned Numbers is not strict
regarding it's minimum length.

Fixes: #59666
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-06-29 21:06:58 +02:00
Daniel DeGrasse
90e3650acf samples: ipc: enable openamp sample for RT1170 EVKB
Enable openamp sample for RT1170 EVKB.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-06-29 21:05:56 +02:00
Daniel DeGrasse
d5329d1391 boards: arm: mixmrt1170_evkb: enable display support
Enable display support for RT1170 EVKB, using display sample with
RK055HDMIPI4M display.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-06-29 21:05:56 +02:00
Daniel DeGrasse
74ffb99a72 boards: arm: mixmrt1170_evkb: add support for ADC
Add support for ADC sample and API test on RT1170 EVKB.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-06-29 21:05:56 +02:00
Kevin Wang
5876cc53d4 tests: drivers: watchdog: wdt_basic_api:
1. Add atcwdt200 options for WDT_NODE in testcase.
2. Add the board overlay file in wdt sample to specify
   the watchdog0 alias

Signed-off-by: Kevin Wang <kevinwang821020@google.com>
2023-06-29 10:13:05 +00:00
Vinayak Kariappa Chettimada
87d65dc502 samples: Bluetooth: hci_rpmsg/uart: Fix BT_CTLR_ISO_TX_BUFFER_SIZE
Restore back BT_CTLR_ISO_TX_BUFFER_SIZE to 251 after fix in
commit e460847b60 ("Bluetooth: host: don't fragment ISO
if len <= MTU").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-06-29 10:06:19 +00:00
Vinayak Kariappa Chettimada
6abef01108 samples: Bluetooth: hci_rpmsg: Fix Rx Prio thread stack usage
Fix Rx Prio thread stack usage value to Kconfig default
value. After long duration use of hci_rpmsg in audio
application, remaining stack was 80 bytes, hence increase
back to 448 as set in the Kconfig defaults.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-06-29 10:06:19 +00:00
Francois Ramu
fc945035d2 samples: drivers: auxdisplay requires a fixture to run on a platform
Add a config "fixture_auxdisplay" to make the samples/drivers/auxdisplay
runnable on a platform, else the application is useless
This fixture will differ from the existing "fixture_display"

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-06-28 15:20:00 +02:00
Matthias Breithaupt
04ce5b9e58 mgmt: hawkbit: remove NET_SOCKETS_POSIX_NAMES dependency
Currently, it is not possible to use hawkbit with code that requires
POSIX_API to be set due to the dependency on NET_SOCKETS_POSIX_NAMES.
Since a lot of other code has already been moved to `zsock_`, this
commit does the same for hawkbit.

Co-authored-by: rojedag <r.ojeda@vogl-electronic.com>
Signed-off-by: Matthias Breithaupt <m.breithaupt@vogl-electronic.com>
2023-06-28 06:32:45 +00:00
Emil Gydesen
5a4c9a2112 Bluetooth: BAP: Unicast client shall support 0 or > 1 endpoints
As per table 4.2 in BAP v1.0.1, the BAP unicast client shall
support at least 2 (> 1) endpoints in either direction if it
supports that direction.

Since Kconfig does not support such requirements (0 || > 1),
this is done using a BUILD_ASSERT.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-06-26 12:40:39 +00:00
Seppo Takalo
5c1228770e net: lwm2m: Add support for X509 certificates
Add support for using X509 certificates.
Default settings use ECDSA certificates with SHA256 hash.

When different settings are required clients should overwrite
struct lwm2m_ctx->load_credentials() and
struct lwm2m_ctx->set_socketoptions()

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-06-26 12:35:29 +00:00
Iuliana Prodan
f7c1f91148 samples: openamp_rsc_table: move arch specific config from project
The CONFIG_PLATFORM_SPECIFIC_INIT is ARM specific, so move this to
board config file, rather than project config.
It should be no restriction to run the openamp_rsc_table sample on other,
non-arm, platforms.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-06-24 08:23:13 -04:00
Francois Ramu
e216dcfc3d samples: drivers: quadspi flash of the stm32 boards
This enables the samples/drivers/spi_flash on quad-spi flash
to run on any stm32 target with external NOR quad flash.
The SPI_FLASH_MULTI_SECTOR_TEST test case is possible with
quadspi too.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-06-23 10:51:06 +00:00
Francois Ramu
7f8342775f samples: drivers: jesd216 jedec ID and SFDP from quad-flash
This adds the support jedec configuration to run
the jedec sample application. So target board can display
the content of the quad-NOR flash.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-06-23 10:51:06 +00:00
Andy Sinclair
d79cf205c6 samples: shields: npm1300_ek: Added LED to example
Updated shield sample to drive LED

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-06-23 08:55:13 +00:00
Mykola Kvach
dd733493f5 samples: fs: littlefs: make sample workable for mmc disk driver
The LittleFS sample may be used for both SDMMC and MMC disk drivers,
so make it possible to work with different volume disk driver names.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2023-06-23 09:20:10 +02:00
Emil Gydesen
ca1fd03520 samples: Bluetooth: Fix TMAP peripheral off-by-one URI schemes
i has to be less than the size of the array, as we use i as the
index.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-06-22 12:27:50 +02:00
Emil Gydesen
969d279190 samples: Bluetooth: Unicast client missing err check on sem
Added missing error check when taking the sem_stream_qos.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-06-22 12:27:36 +02:00
Marko Sagadin
54cbf45c74 drivers: uart: add support for serial ports on native posix
Add support for communication with serial ports on native POSIX platform
via UART driver API. Serial port driver supports polling API,
configuration of the serial ports used via devicetree and command line
options, and runtime configuration with `uart_configure`.
Multiple instances of the driver are supported.
Example use and configuration is also demonstrated in the
`samples/drivers/uart/native_tty` sample.

Closes: #56586

Signed-off-by: Marko Sagadin <marko.sagadin42@gmail.com>
2023-06-21 09:27:22 +02:00
Grzegorz Chwierut
732dd4843d twister: pytest: Simplify interface to pytest-twister-harness
Add DeviceAbstract class to default imports from pytest-twister-harness
package to simplify importing DUT package, when creating tests.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2023-06-20 14:46:55 -04:00
Aleksandr Khromykh
327eb119b6 Bluetooth: Mesh: add tf-m support for ble mesh
This PR adds ability to build mesh with tf-m psa
for platforms those support tf-m.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-06-19 15:04:17 +02:00
Guy Morand
d87d934e75 samples: Add is31fl3216a LED sample
This demonstrates and tests is31fl3216a driver functionality.

Signed-off-by: Guy Morand <guy.morand@bytesatwork.ch>
2023-06-19 11:02:36 +02:00
Saravanan Sekar
026d476a84 samples: websocket_client: close tcp socket after websocket_disconnect
websocket_disconnect api does not closes user tcp socket, so tcp socket
must be closed after done.

Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
2023-06-19 09:18:45 +01:00
Jonas Remmert
22e7edbbab samples: drivers: led: add a sample for ti lp5569
Add a sample for the ti lp5569 led controller driver.

Signed-off-by: Jonas Remmert <j.remmert@phytec.de>
2023-06-19 09:17:52 +01:00
Ryan Erickson
53843c6464 samples: fat_fs: Add support for MG100 board
Add overlay so the sample can be built for the MG100.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2023-06-19 08:51:27 +02:00
Victor Chavez
bee43bd972 logging: Fixed BLE backend buffer size independent of MTU
The BLE backend has a bug that when the MTU size is less than
the buffer the notification always fails and does not allow
to flush the buffer.

This fix checks for the MTU size of the current connection
and adjusts it. In addition, the buffer size is no longer
settable by the user and depends on the transmission size
of MTU set with CONFIG_BT_L2CAP_TX_MTU.

Signed-off-by: Victor Chavez <chavez-bermudez@fh-aachen.de>
2023-06-19 08:38:08 +02:00
Florian Grandel
1ee4d3ed77 net: l2: ieee802154: document L1/L2 sep. of concerns
The method ieee802154_radio_handle_ack() does not belong to the
PHY/radio layer but to the L2 layer. It is a callback called from the
radio layer into the L2 layer and to be implemented by all L2 stacks.
This is the same pattern as is used for ieee802154_init(). The
'_radio_' infix in this function is therefore confusing and
conceptually wrong.

This change fixes the naming inconsistency and extensively documents
its rationale.

It is assumed that the change can be made without prior deprecation of the
existing method as in the rare cases where users have implemented custom
radio drivers these will break in obvious ways and can easily be fixed.

Nevertheless such a rename would not be justified on its own if it were
not for an important conceptual reason:

The renamed function represents a generic "inversion-of-control" pattern
which will become important in the TSCH context: It allows for clean
separation of concerns between the PHY/radio driver layer and the
MAC/L2 layer even in situations where the radio driver needs to be
involved for performance or deterministic timing reasons. This
"inversion-of-control" pattern can be applied to negotiate timing
sensitive reception and transmission windows, it let's the L2 layer
deterministically timestamp information elements just-in-time with
internal radio timer counter values, etc.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-06-17 16:20:21 -04:00
Daniel DeGrasse
7993e7d1b0 samples: sensor: thermometer: add trigger support to sample
Add optional trigger support to sample. If the selected temperature
sensor supports triggering using the AMBIENT_TEMP channel, then
temperature thresholds will be set for +0.5 and +1.5 degrees celsius
above ambient temperature. Sample overlays are provided for the
FRDM_K22F board to demonstrate enabling this feature.

Signed-off-by: Daniel DeGrasse <daniel@degrasse.com>
2023-06-17 08:01:16 -04:00
Manimaran A
ed27c1b75c drivers: ps2: microchip: PS2 wakeup pin configured in overlay
Updated the overlay files with PS2 wakeup pin

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-06-17 07:59:07 -04:00
Manimaran A
0f6cb5edcd drivers: ps2: microchip: Low power and wakeup enabled
ps2 driver updated to support low power and wakeup.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-06-17 07:59:07 -04:00
Daniel DeGrasse
fcf6efe8ec samples: ipc: set flash location for CM4 in openamp sample
Set flash location for CM4 to ocram, so CONFIG_FLASH_BASE_ADDRESS is
set correctly.

Fixes #59213

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-06-17 07:50:46 -04:00
Bjarki Arge Andreasen
22152915ab drivers/gsm_ppp: Update existing modules to use PPP L2
This commit replaces the workarounds spread around the
drivers and subsystems with the updated PPP L2
interface.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-06-17 07:46:21 -04:00
Aleksandr Khromykh
29895d8275 Bluetooth: Mesh: refactor mesh to use both tinycrypt and psa based crypto
A mesh key type has been added to be able to choose the different
key representation for different security libraries.
The type as well as some functionality related to Mesh key
management has been added as a public API.
If tynicrypt is chosen then keys have representation
as 16 bytes array. If mbedTLS with PSA is used then keys are
the PSA key id. Raw value is not kept within BLE Mesh stack
for mbedTLS. Keys are imported into the security library
and key ids are gotten back. This refactoring has been done
for the network(including all derivated keys), application,
device, and session keys.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-06-17 07:46:03 -04:00
Guangfu Hu
518cfe02a3 samples: sensing: add a simple sensing subsystem app
Add a simple sensing subsystem application.

Signed-off-by: Guangfu Hu <guangfu.hu@intel.com>
2023-06-17 07:43:25 -04:00
Keith Packard
a476e87073 samples/cmsis_rtos_v2/timer_synchronization: Set malloc arena size to zero
This test fails when using picolibc with the default malloc arena
value. Fix this by explicitly setting the malloc arena size to zero, as
when using the minimal C library.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-06-17 07:28:42 -04:00
Keith Packard
5dd87e7db3 samples/userspace: Set common malloc arena size to zero for syscall_perf
The default malloc arena when using picolibc is too large for the
hifive1_revb target.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-06-17 07:28:42 -04:00
Keith Packard
2a30acc823 samples/tfm_integration: Remove 'noreturn' attribute from main
This conflicts with what the compiler expects for the definition of 'main'
when -ffreestanding is not used.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-06-17 07:28:42 -04:00
Andrei Hutanu
be04e30a88 samples: net: mqtt_azure: hotfix stack overflow
running samples/net/cloud/mqtt_azure in QEMU with default
configuration crashes with exception. This PR change doubles
the default workqueue stack size in a attempt to fix the issue
reported in: GH#58930.

Signed-off-by: Andrei Hutanu <andrei.hutanu.i@gmail.com>
2023-06-14 09:12:08 -04:00
Anas Nashif
9f37ae902b tests/samples: set ram/rom limits on some samples/tests
Increase RAM requirements for some test, we have many exotic platforms
failing to link due to the size of the test.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-13 09:38:27 -04:00
Anas Nashif
dd43a65540 samples: watchdog: fix twister filter
Fix devicetree filter. dt_has_compat is not a twister support filter.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-13 09:38:27 -04:00
Anas Nashif
8ffb08b10e tests: net: sockets: remove scneario
This scneario does not build and does not fit on hardware, remove.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-13 09:38:27 -04:00
Anas Nashif
5411e7d4a8 tests: synchronization: do not build on all
Do not build on platforms, we have other tests covering this already.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-13 09:38:27 -04:00
Anas Nashif
b835b02136 tests: cleanup metadata and filtering
- Add integration_platforms to avoid excessive filtering
- Make sure integration platforms are actually part of the filter
- Fix some tags and test meta data

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-13 09:38:27 -04:00
Anas Nashif
c1bb577f28 samples: bluetooth: remove duplicate entry in test
Also remove platforms where we overflow on RAM.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-13 09:38:27 -04:00
Rubin Gerritsen
9cb339166e Samples: iso_connected_benchmark: Fix invalid latency
The default transport latency was not valid.
Set it to a value that is large enough.
The minimum possible transport latency is 16580 us,
but this assumes the controller ignores the RTN=2.
If the controller uses the RTN=2, the transport latency will
be slightly larger than 30 ms depending on
how the controller chooses to setup the ISO link.

Therefore, we set it to 40 ms to ensure the default
configuration is valid.

How these numbers were found:

For unframed PDUs this is defined in Core_v5.4, Vol 6,
Part G, Section 3.2.2:
  Transport_Latency =
    CIG_Sync_Delay + FT * ISO_Interval - SDU_Interval

Because unframed PDUs are being used, the ISO interval needs
to be a multiple of SDU interval.
If MaxPDU = MaxSDU and the PHY is 2M, this results in that
the maximum subevent size is:
2120 * 2 + 2 * 150 = 4540.
For 2 CISes this is 9080 us > 7500
Therefore, the controller has to set the ISO interval to a
minimum of 15000 us in order to fit the packets.

Based upon this info, the controller has the freedom to ignore
or use the requested RTN=2.
1. Ignore -> NSE is 2: Minimum ISO interval is 15000 us
2. RTN = 2, Increase NSE: 4 * 4540 = 18160 -> ISO_Interval = 22500 us
3. RTN = 2, Increase the FT to 2, NSE = 2 -> ISO_Interval = 15000 us

For (1):
  Transport_Latency = CIG_Sync_Delay + 15000 - 7500
                    = CIG_Sync_Delay + 7500
For (2):
  Transport_Latency = CIG_Sync_Delay + 22500 - 7500
                    = CIG_Sync_Delay + 15000
For (3):
  Transport_Latency = CIG_Sync_Delay + 2 * 15000 - 7500
                    = CIG_Sync_Delay + 22500

As shown in Core_v5.4, Vol 6, Part B, Section 4.5.14,
CIG_Sync_Delay needs to be larger than or equal to the length of
all ISO events. That is, the sum of the subevents:

For (1): CIG_Sync_Delay = 2 * 4540 = 9080
For (2): CIG_Sync_Delay = 4 * 4540 = 18160
For (3): CIG_Sync_Delay = 2 * 4540 = 9080

This results in the following transport latencies:

For (1): Transport_Latency = 9080 + 7500 = 16580
For (2): Transport_Latency = 18160 + 15000 = 33160
For (3): Transport_Latency = 9080 + 22500 = 31580

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2023-06-09 14:16:34 -04:00
Rubin Gerritsen
faecdff7a2 Samples: iso_connected_benchmark: Use BT_LE_ADV_OPT_ONE_TIME
It is not intentional to continue advertising once a connection has been
established for two reasons:
 1. We do not configure enough connection contexts for this
 2. We don't want to generate controller scheduling conflicts that can
    possibly reduce performance.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2023-06-09 14:16:34 -04:00
Vinayak Kariappa Chettimada
5eb17bca21 samples: Bluetooth: hci_usb: Disable USB_CDC_ACM
BlueZ btusb does not recognize hci_usb sample as Bluetooth
Controller when CDC ACM is enabled in the sample.

Refer to https://github.com/zephyrproject-rtos/zephyr/issues/29107

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-06-09 11:44:02 -04:00
Francois Ramu
c908aead77 tests: drivers: dac channel structure has a buffered parameter boolean
Add the '.buffered' field to the dac_channel_cfg structure
when testing the DAC.
This boolean parameter is initialised to 'true' to PASS the test.
It follows the https://github.com/zephyrproject-rtos/zephyr/pull/57730
Also changed for the samples/drivers/dac

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-06-08 09:33:11 -04:00
Vinayak Kariappa Chettimada
b7c2ca4bdf samples: Bluetooth: Fix Tx ISO Data packet sequence number
Fix Tx ISO Data packet sequence number increment based on
the send timer timeout value.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-06-08 06:47:25 -04:00
Vinayak Kariappa Chettimada
7d7d1cbf53 samples: Bluetooth: Relax Tx ISO SDUs dropped in unicast audio samples
Relax Tx ISO SDUs being dropped in unicast audio client and
server samples when using the Zephyr Bluetooth Low Energy
Controller, i.e. Tx ISO SDUs dropped due to delayed ISO data
send calls in upper layer with respect to payload number in
the current ISO radio events in the Controller.

This option is disabled in the sample and users can use it
when need be.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-06-08 06:47:25 -04:00
Vinayak Kariappa Chettimada
f992029f26 samples: Bluetooth: unicast audio client and server overlay config
Add Zephyr Bluetooth Low Energy Controller overlay config for
the unicast audio client and server samples.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-06-08 06:47:25 -04:00
Rubin Gerritsen
58cc10b333 Bluetooth: samples: central_iso: Unref if send fails
Fixes a resource leak.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2023-06-07 15:17:36 -04:00
Rubin Gerritsen
57ab4f4cf4 Bluetooth: samples: ISO: Check validity of incoming data
Only print incoming data when the data is valid. Otherwise we also
print incoming data when no data was received.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2023-06-07 15:17:36 -04:00
Jose Alberto Meza
2602b7260f samples: drivers: peci: Exclude MEC172x EVB from test
PECI bus sample requires a controller and a target
Intel system(PECI controller) + Embedded controller(PECI target),
where EC HW can be add-on card (mec172xmodular) or onboard EC.

MEC172x EVB is not intended to be connected hence excluding
the platform.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2023-06-07 13:57:16 -04:00
Théo Battrel
e9ee3e0af0 Bluetooth: Samples: Remove usage of BT_DEBUG_LOG
Remove usage of Kconfig symbol `CONFIG_BT_DEBUG_LOG` from samples. It
has been deprecated since this PR:
https://github.com/zephyrproject-rtos/zephyr/pull/56183

The Kconfig symbols has been replaced by `CONFIG_LOG=y` on most of the
cases. Or it has been removed when not needed anymore.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2023-06-07 13:56:55 -04:00
Dominik Ermel
e0e7f5888f fs/littlefs/sample: Increase stack size
Increase stack size to prevent sample crashes.

Fixes #57525

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-06-07 13:38:44 -04:00
Benjamin Cabé
21f473aaec samples: doc: fix dead links
Fixed deadlinks reported by Sphinx linkchecker

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-06-07 04:40:47 -04:00
Benjamin Cabé
a76396fb7a doc: update stale links to MCUboot documentation
mcuboot.com/documentation --> docs.mcuboot.com

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-06-07 04:40:47 -04:00
Benjamin Cabé
23f2a2066f doc: update stale srecord links
Updated 404 links to point to valid locations.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-06-07 04:40:47 -04:00
Benjamin Cabé
7cf347769a doc: update LittleFS Github repo URLs
LittleFS now lives in the littlefs-project GH organization.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-06-07 04:40:47 -04:00
Tomasz Moń
5d87abccb2 samples: usb: mass: Set next stack max LUNs to 3
Mass storage sample contains separate Kconfig options for RAM, Flash and
SDMMC disk drivers. All disk drivers can be enabled simultaneously and
therefore the maximum number of concurrent LUNs is 3.

Configure Mass Storage class maximum LUNs to 3 to solve initialization
failures on targets that enable more than one disk driver at a time.
Each additional supported LUN increases the Mass Storage class memory
usage by 48 bytes (struct scsi_ctx) on 32-bit targets. Allocating 3 SCSI
context structures allows the sample to work regardless what disk
drivers are concurrently enabled.

Fixes: #57657

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2023-06-06 11:12:55 -04:00
Mariusz Skamra
21599a6b14 Bluetooth: audio: has: Fix building with preset support disabled
This fixes regression causing compilation errors seen when the
code is built without preset support (BT_HAS_PRESET_COUNT = 0).

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-06-05 16:24:18 +02:00
Matthew Bradbury
74e98d5375 samples: coap_client: Return correct result from send_simple_coap_request
send_simple_coap_request needs to return a result from previous functions
instead of success at the end of the function. Without doing so the example
may wait for a response from a coap sever when a message failed to send.

Signed-off-by: Matthew Bradbury <matt-bradbury@live.co.uk>
2023-06-05 08:30:41 -04:00
Grzegorz Chwierut
ab5b48beed twister: pytest: Wrap iter_stdout
Added waiting for prompt instead of calling time.sleep,
to fix issue with longer setting up platforms with TF-M
enabled. Wrapped iter_stdout generator, to avoid issues
when generator is created and called multiple times
in test scenarios.
Fixes: #58747

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2023-06-02 18:55:27 -04:00
Anas Nashif
0064b6e8b6 tests: samples: cleanup test tags, add integration_platforms
Use integration platforms and sanitize tags.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-02 04:47:06 -04:00
Anas Nashif
34a4001d49 samples: net: fix tags/identifiers
Add net tag to net samples.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-02 04:47:06 -04:00
Anas Nashif
db4a5f11ea tests: add kernel tag to all benchmarks and samples
All those benchmarks are kernel related, so add the kernel tag to avoid
building them when non kernel changes are being submitted.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-02 04:47:06 -04:00
Anas Nashif
cec8fd1c6e tests: ztest: fix tags for testsuite and unify them
Use test_framework as unified tag so we can filter tests in a consistent
way.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-02 04:47:06 -04:00
Magdalena Kasenberg
169812f84c samples: unicast audio: Wrap start of the send timer
Enable the send timer only when at least one ASE source is enabled,
CONFIG_BT_ASCS_ASE_SRC_COUNT > 0 in case of unicast_audio_server,
CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SRC_COUNT > 0 for unicast_audio_client.

Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
2023-06-01 09:06:24 -04:00
Keith Packard
6ccdf47f60 lib/cpp: Remove CONFIG_CPP_MAIN
With Zephyr now always using `int main(void)`, there's no longer any need
for this definition. The last remaining use which gated the declaration of
_posix_zephyr_main isn't necessary as adding that declaration
unconditionally is harmless.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-05-31 06:16:35 -04:00
Keith Packard
3f992162e7 samples/sip_svc: Switch main return type to int
Zephyr now requires that main return int instead of void.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-05-31 10:36:17 +02:00
Keith Packard
c09618cf63 samples/eth_ivshmem: Switch main return type to int.
Zephyr now requires that main return int instead of void.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-05-31 10:36:17 +02:00
Keith Packard
35f445c247 samples/auxdisplay: Switch main return type to int.
Zephyr now requires that main return int instead of void.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-05-31 10:36:17 +02:00
Keith Packard
bcb19a7801 samples/mec172xevb_assy6906: Switch main return type to int
Zephyr now requires that main return int instead of void.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-05-31 10:36:17 +02:00
Andrzej Głąbek
e7fdb31a95 samples: sensor: qdec: Correct encoder emulation
Use phase shift between the emulated A and B signals equal to the half
of the used period instead of a fixed 1 millisecond, to not enforce
decoders to use relatively frequent sampling just to make use of this
emulation.
Add also a few missing `static` keywords.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-05-30 14:01:04 +02:00
TOKITA Hiroshi
5f5b34793d samples: net: dhcpv4_client: Make DHCPv4 requests on all ipv4 interfaces
Send DHCPv4 requests on all available ipv4 interfaces.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-05-29 14:34:46 -04:00
Tristan Honscheid
dc9bd3afe3 sensors: Create sensor trig subcommand
This PR relocates the sensor trigger sample application from the
`sensor_shell` sample to a subcommand in the actual sensor shell. The
subcommand has a UI for enabling a given trigger on a given sensor.
A built-in handler for the data_ready trigger is included that prints
the latest data to the log. Currently, only `SENSOR_TRIG_DATA_READY` is
supported but the groundwork is there to add others. Tested on a
`tdk_robokit1` board.

Signed-off-by: Tristan Honscheid <honscheid@google.com>
2023-05-27 05:33:11 -04:00
Anas Nashif
04827ba71f tests/samples: use integration_platforms more where it makes sense
Use integration platforms to limit churn and build time in PR CI .

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-05-26 17:52:02 -04:00
Jamie McCrae
764da7fff1 samples: driver: Add auxdisplay sample
Adds a simple auxdisplay sample which outputs hello world and the
name of the board. A sample overlay is provided for the
nucleo_f746zg board with a Hitachi HD44780-compatible display.

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2023-05-26 23:05:58 +02:00
Rajkumar Kanagaraj
682dbae203 samples: tfm: Re-commit psa_crypto sample
Adds a refactored version of the psa_crypto sample back,
which was removed as part of the update to TF-M 1.7.0
due to unresolvable (at the time) issues with use of
MbedTLS instances on the S and NS sides.

This sample takes advantage of changes to MbedTLS and
TF-M that were introduced after the TF-M 1.7.0 and MbedTLS
3.3 release, and cherry-picked in Zephyr, allowing for
improved linking of MbedTLS in secure and non-secure
images. PSA API calls on the non-secure side can now be
correctly routed to the secure partition, while X.509
and TLS calls remain on the non-secure/Zephyr side.

Signed-off-by: Rajkumar Kanagaraj <rajkumar.kanagaraj@linaro.org>
2023-05-26 14:00:18 -04:00
Madhurima Paruchuri
a19d905cc4 USB-C: genVIF: Cleanup and add support to pick static data from input
Removed few VIF properties which are being hardcoded
Updated the script to parse source VIF XML and add information to
the output
Added optional Kconfig option to configure custom source VIF XML path
Cleaned up the code

Signed-off-by: Madhurima Paruchuri <mparuchuri@google.com>
2023-05-26 13:54:43 -04:00
Grzegorz Chwierut
23b7f0cdb8 samples: testsuite: exemplary pytest shell test
Adding exemplary pytest shell test to show possibilities of new pytest
plugin. This test uses bidirectional communication between tester and
device under test.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2023-05-26 13:52:15 -04:00
Yuval Peress
ca5bf10143 sensor_shell: Update to new sensor_read API
Update the sensor shell logic to use the new sensor_read() APIs and
make triggers an option of the sensor_shell sample (this avoids the
trigger stealing the interrupt status from one-shot reads).

Signed-off-by: Yuval Peress <peress@google.com>
2023-05-26 11:04:54 -05:00
Manimaran A
b6555ee322 sample: crypto: mchp: Regex pattern updated in yaml file
Updated the sample.yaml file with Console message Regex
pattern to fix Twister error.

Fix: #58074

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-05-26 09:51:47 -04:00
Johann Fischer
9a4ed741d6 usb: device_next: use specific macros for string descriptors
Add and use specific macros for manufacturer, product, and
serial number string descriptors.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-05-26 09:48:19 -04:00
Tyler Ng
ae350a9c77 boards: riscv: opentitan_earlgrey: Add the OpenTitan AON Timer
Adds the AON Timer device in the OpenTitan Earlgrey device tree.
Adds overlay files to enable the watchdog and set the alias to
`watchdog0`.

Adds the AON timer (watchdog part) to the supported features section
of the OpenTitan documentation.

Signed-off-by: Tyler Ng <tkng@rivosinc.com>
2023-05-26 09:45:25 -04:00
Michał Szprejda
cb43d8f525 shell_module: Add a robot test case to sample.yaml
Add a basic Robot Framework test suite utilizing the robot harness
runnable in Renode.

Signed-off-by: Michał Szprejda <mszprejda@antmicro.com>
Signed-off-by: Mateusz Hołenko <mholenko@antmicro.com>
2023-05-26 09:43:49 -04:00
Fredrik Danebjer
7457bcf0a2 Bluetooth: Audio: Make HAS optional notify characteristics optional
Added Kconfig options to make HAS characteristics that has notify as
optional property selectable and thus optional. These settings are
global, meaning that a chosen notify property will be used for all
registered has instances.

Signed-off-by: Fredrik Danebjer <frdn@demant.com>
2023-05-26 09:09:06 -04:00
Emil Gydesen
e8ade2356a Bluetooth: BAP: Add unicast client and server write long support
Add support for long writes for the unicast client and server.
This reuses the ATT buffer for long reads.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-26 05:55:15 -04:00
Emil Gydesen
5109c941f2 Bluetooth: Audio: Add TBS client TX buffer count requirement
After removing the high default for MCS, it was discovered that
the TBS client requires a significant amount of buffers to work
properly as well. Added the requirement as a build assert that
depends on which optional TBS client features are enabled.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-26 05:54:58 -04:00
Emil Gydesen
534d6f3b2c Samples: Bluetooth: TMAP peripheral avoid using strtok
strtok should not be used for the purpose it was being used for.
Furthermore, the pointer that was stored from the value is not
a long-living pointer, and would in fact be invalid after the
callback has returned.

Modified the code so that we store the value in the application
and then do a proper search for the first URI in the list.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-25 16:27:26 +02:00
Emil Gydesen
d753a382a1 Samples: Bluetooth: Fix return value of main in TMAP peripheral
The main function is now an int instead of void, and has been
fixed for the sample.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-25 16:27:26 +02:00
Emil Gydesen
23a239e104 Samples: Bluetooth: Fix build errors for TMAP central
The TMAP central had a few bugs. It was also using the old
BAP discovery API.

The commit fixes the bugs, and updates it to use the new BAP
discover API.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-25 16:27:26 +02:00
Steffen Jahnke
39b50ee37c boards: shields: Adding a new amg88xx shield
Added the new amg88xx sensor shield with designation
amg88xx_grid_eye_eval_shield and updated the overlay, Kconfig and
documentation files accordingly.
The platforms that are compatible with new shield changed, so
sensor sample yaml file was extended for both available shields.

Signed-off-by: Steffen Jahnke <steffen.jahnke@eu.panasonic.com>
2023-05-25 13:31:29 +00:00
Roman Dobrodii
defb159ab1 soc/arm/silabs: support BLE with PM in Series 2 SoCs
Using EM2 or deeper sleep states (where HF clocks are off) requires
special care if BLE radio is used, since BLE radio relies on that clock,
and its power/clock requirements need to be taken into account
On SiLabs, radio PM is implemented as part of RAIL blob, which relies
on sl_power_manager HAL service. I've implemented SoC PM
state changes using sl_power_manager instead of emlib, and added
call to RAIL PM initialization in Gecko HCI driver.

Signed-off-by: Roman Dobrodii <rdobrodii@antmicro.com>
2023-05-24 13:31:44 -04:00
Andrzej Kuros
174b7f4775 nrf_802154: nrf_802154_serialization_error never returns
Functions nrf_802154_serialization_error and
nrf_802154_sl_fault_handler shall never return.
However `__ASSERT()` might expand to an empty instruction
CONFIG_ASSERT=n and is not enough to stop execution.

Signed-off-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
2023-05-24 16:41:39 +02:00
Silviu Petria
5096aa1c00 Bluetooth: Audio: Add TMAS and two TMAP samples
Add implementation of the Telephony and Media Audio Service, as well as
two sample applications.

tmap_central reflects a smartphone implementing the Unicast Media Sender
and Call Gateway TMAP roles.

tmap_peripheral reflects an earbud implementing the Unicast Media
Receiver and Call Terminal TMAP roles.

Upon connection, tmap_central starts an audio stream using CAP Initiator
APIs.

CCP, MCP and VCP are discovered and used to send example commands.

Future improvements: 2-earbud support, add TMAP Broadcast roles,
update with new CAP Acceptor/Commander APIs as they become available

Signed-off-by: Silviu Petria <silviu.petria@nxp.com>
2023-05-24 16:39:38 +02:00
Rodrigo Peixoto
caf68d9485 zbus: remove POSIX arch iterable sections restriction
Zbus iterable sections config in Kconfig unnecessarily excluded POSIX
architectures. Remove the constraints and adjust the sample YAML file to
enable that.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2023-05-23 22:09:33 +02:00
Andy Sinclair
83bde5cf93 samples: shields: npm1300_ek: Enable i2c pullups in overlay
Enable i2c pullups in the nrf52dk overlay
Without this, the first I2C transaction after reset can be corrupted

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-05-23 22:08:46 +02:00
Torsten Rasmussen
a88502783b cmake: align Zephyr module variable to EXTRA_ZEPHYR_MODULES
Align Zephyr modules with other user facing variables where settings
can be defined or extended, meaning Zephyr modules now supports:
ZEPHYR_MODULES and EXTRA_ZEPHYR_MODULES.

Support for ZEPHYR_EXTRA_MODULES is kept foir backward compatibility.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-05-23 16:40:21 +02:00
Torsten Rasmussen
1120934874 doc: samples: update OVERLAY_CONFIG to EXTRA_CONF_FILE
Update rst files to use EXTRA_CONF_FILE instead of OVERLAY_CONFIG.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-05-23 16:40:21 +02:00
Torsten Rasmussen
391f4c9b0f samples: update nrf53_sync_rtc sample to EXTRA_CONF_FILE
Update nrf53_sync_rtc to use EXTRA_CONF_FILE instead of the old
OVERLAY_CONFIG.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-05-23 16:40:21 +02:00
Erwan Gouriou
5a26397450 sample: shields: Update prj.conf
Before Kconfig clean up to be performed in boards/shields, update samples
to enable the components they require.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2023-05-23 13:02:36 +02:00
Kenneth J. Miller
daa7b6dca1 samples: sensor: Remove redundant stm32_vbat_sensor
Remove stm32_vbat_sensor sample which has been made redundant by the new
generic soc_voltage sample.

Signed-off-by: Kenneth J. Miller <ken@miller.ec>
2023-05-23 08:54:20 +02:00
Kenneth J. Miller
529bdf2f85 samples: sensor: Add generic voltage driver example
Add basic sample to demonstrate voltage driver measurements.

Signed-off-by: Kenneth J. Miller <ken@miller.ec>
2023-05-23 08:54:20 +02:00
Matthias Breithaupt
82c576c536 samples: dhcpv4_client: Add option callback
Extend the DHCPv4 sample to make use of the option callback functionality.
This serves as a reference of how to register and use a custom option
callback.

Signed-off-by: Matthias Breithaupt <m.breithaupt@vogl-electronic.com>
2023-05-22 15:25:40 +02:00
Emil Gydesen
3074c72d79 Bluetooth: BAP: Move endpoint discovery to new callback
Add a new endpoint callback that is used to report the found
ASEs during BAP discovery, rather than calling
the discovery callback with optional values.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-22 15:24:28 +02:00
Emil Gydesen
1c304d9d23 Bluetooth: BAP: Move pac record discovery to new callback
Add a new pac_record callback that is used to report the found
PAC records during BAP discovery, rather than calling
the discovery callback with optional values.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-22 15:24:28 +02:00
Emil Gydesen
5d498d78ad Bluetooth: BAP: Remove bt_bap_unicast_client_discover_params
Remove the BAP unicast client specific discover parameter struct.
This make the BAP discover work more similar to the other
profiles.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-22 15:24:28 +02:00
Emil Gydesen
ffca5f9b2f Bluetooth: BAP: Remove dir from BAP discovery parameters
The direction has been moved to a function parameter instead,
and we keep a local copy of the value in the stack instead.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-22 15:24:28 +02:00
Emil Gydesen
1199e46e0b Bluetooth: BAP: Remove num_eps from BAP discover params
The field is not required and is no longer used.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-22 15:24:28 +02:00
Emil Gydesen
0b10498fb1 Bluetooth: BAP: Remove num_caps from BAP discover params
The field is not needed and no longer used.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-22 15:24:28 +02:00
Emil Gydesen
11f5f3b080 Bluetooth: BAP: Move uni cli discov err to callback
Move the err field from the discover parameters to
the callback.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-22 15:24:28 +02:00
Emil Gydesen
39406a4843 Bluetooth: BAP: Move uni cli discover callback
Move the unicast client discover callback from the
parameters to the callback structure.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-22 15:24:28 +02:00
Jerzy Kasenberg
4e3968a507 samples: drivers: adc: Add da1469x_dk_pro overlay
This change creates an overlay file so that the adc sample
can be used with da1469x_dk_pro kit.
Both ADC are configured with several channels.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2023-05-22 12:41:42 +02:00
Gerard Marull-Paretas
dacb3dbfeb iterable_sections: move to specific header
Until now iterable sections APIs have been part of the toolchain
(common) headers. They are not strictly related to a toolchain, they
just rely on linker providing support for sections. Most files relied on
indirect includes to access the API, now, it is included as needed.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-22 10:42:30 +02:00
Chris Morgan
777f88939f samples: net: mdns_responder: Code in example is unrelated to mDNS
Clarify the comment in the code so people looking to use mDNS don't
think that interaction with Zephyr is necessary for mDNS support to
work, its in fact built into the networking stack when the mDNS
feature is enabled.

Signed-off-by: Chris Morgan <chmorgan@gmail.com>
2023-05-22 08:05:49 +00:00
Bill Waters
61246e2592 driver: adc: infineon: Adding ADC driver support to cy8cproto_063_ble
- The boards\arm\cy8cproto_063_ble board now has ADC enabled
- This includes overlay files for the test app and sample app

Signed-off-by: Bill Waters <bill.waters@infineon.com>
2023-05-19 20:22:51 -04:00
Peter Rowley
ff36548616 drivers: fuel_gauge: Add support for RSOC and ASOC
Current driver only allows state-of-charge.  Adding relative-state-
of-charge and absolute-state-of-charge to differentiate between the
different types.  Updated sbs and max drivers to support new enum.
Discussed in issue #57523

Signed-off-by: Peter Rowley <perowle@microsoft.com>
2023-05-19 13:40:19 -04:00
Mykola Kvach
a23b316e29 samples: littlefs: remove flash map configs when we use block device
We don't need anymore enabling of Flash map for building littlefs
sample with block disk device config.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2023-05-19 15:53:29 +02:00
Sumit Batra
815b8fc664 board: Adds MIMXRT1062-FMURT6 board support package
Also enables all the usable CAN, Ethernet, I2C, PWM,

SPI, UARTs interfaces for this board

Signed-off-by: Sumit Batra <sumit.batra@nxp.com>
2023-05-18 14:08:06 -05:00
Mahesh Mahadevan
df26e99637 pm: rt5xx: Enable OS Timer as wakeup source
1. Enable os_timer as a wakeup-source in the board
   dts file.
2. Enable PM_DEVICE when PM is enabled.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-05-16 18:19:35 +02:00
Maciej Perkowski
75b062a6d6 tests: samples: Resolve duplicates in names.
Several duplicates were found with
scripts/twister -T samples/ -T tests/ --dry-run --list-test-duplicates
This is an issue since duplicated names causes overwriting of
results. Most duplicates looked like obvious copy-pase errors.
New names where addopted looking at other tests in the same yaml
or looking at the directory/descriptio.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2023-05-16 06:21:25 -04:00
Manimaran A
80777594a1 samples: boards: mec172xevb_assy6906 Crypto hash API sample
Sample application exercising Zephyr crypto hash API using
MEC172x driver.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-05-16 12:07:24 +02:00
Grant Ramsay
83928aaab7 samples: drivers: ethernet: Add Jailhouse IVSHMEM Ethernet sample
Add an IVSHMEM Ethernet sample to communicate between Zephyr
and Linux root cell within the Jailhouse hypervisor.

The supported configuration runs the Jailhouse hypervisor
within QEMU Cortex-A53.

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-05-14 18:17:33 -04:00
Hisanori YAMAOKU
2ed97bc911 samples: die_temp_polling: Add nrf52840dk overlay
Adds overlay for the nrf52840dk.

Signed-off-by: Hisanori YAMAOKU <yamaoku.hisanor@fujitsu.com>
2023-05-12 10:47:20 -05:00
Mizuki Agawa
49fd55cae9 samples: die_temp_polling: Add nrf51dk overlay
Adds overlay for the nrf51dk.
Signed-off-by: Mizuki Agawa <agawa.mizuki@fujitsu.com>
2023-05-12 10:47:20 -05:00
Andreas Sandberg
5f781f4b11 drivers: ssd16xx: Use device-specific compatibles
The SSD16xx driver currently provides basic support for most chips in
the Solomon Systech SSD16xx range of e-paper drivers. We currently use
the SSD1608, SSD1673, SSD1675A, and SSD1681 in various boards
supported by Zephyr.

The main user-facing difference between the various SSD16xx chips is
the resolution they support (sources & gates), but there are other
differences as well. For example:

 * 8 or 16 bits used to represent x coordinates
 * 8 or 16 bits used to represent y coordinates
 * Differences in refresh configuration (SSD16XX_CMD_UPDATE_CTRL2)
 * Differences in LUT sizes

The driver currently assumes that the user specifies the number of
bits used to describe coordinates. However, as we add support for more
chips, more of the differences will become apparent and need
workaround.

Comparing data sheets from different chips in the SSD16xx range
suggests that there are (at least) two different generations
present. These differ in the size of the LUTs they expect and the way
they handle partial refresh. This impacts register layout where
SSD16XX_CMD_UPDATE_CTRL2 uses bit 3 selects "mode 2" whereas older
devices uses this for a mode referred to as "initial".

In order to add support for partial refresh in newer devices, we need
to be able to distinguish between the different generations of the
chip. It might be possible to add a DT property to indicate the
revision, but that seems like a bit of an anti-pattern and it would be
hard for users to specify the correct chip generation.

This change introduces chip-specific compatible strings instead of the
generic SSD16xx. There is unfortunately clear pattern that can be used
to distinguish different generations, so the full chip name must be
specified. A benefit of this is that we don't need to specify the
width of the fields describing coordinates in device trees.

Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
2023-05-11 14:40:50 -07:00
Daniel DeGrasse
77f8848f8e boards: arm: mimxrt1040_evk: enable ADC support
Enable ADC support for RT1040 EVK. Tested using samples/drivers/adc,
using channels 3 and 4 of ADC0.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-05-11 10:35:40 -05:00
Georges Oates_Larsen
5350d417e9 samples: net: sockets: echo_server: Use conn_mgr ignore_iface
conn_mgr now allows applications to request that ifaces be ignored.

This commit changes the echo_server sample to use this feature to
filter out the tunnel iface, instead of manually filtering events
generated by it.

This will allow the echo_server sample to remain compatible with
planned changes to conn_mgr, namely a switch from events being
fired for every individual iface that goes up or down, to only
being fired when connectivity is gained or completely lost.

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
2023-05-11 12:15:44 +02:00
Georges Oates_Larsen
716c19f7ef net: conn_mgr: Reorganize files
Since conn_mgr is a subsystem rather than a library, relocate it
directly into subsys/net rather than subsys/net/lib/

Rename header files to better match their function.

Remove net_ prefix from conn_mgr types, API, and files, since it is
unnecessary.

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
2023-05-11 12:15:44 +02:00
Johann Fischer
0929d73788 samples: zperf: add overlays for USBD CDC ECM implementation
Add DT and Kconfig overlay for new experimental CDC ECM
implementation. USB device support configuration and
initialization can be done through shell by following
commands:

uart:~$ usbd config add 1
uart:~$ usbd class add cdc_ecm_0 1
uart:~$ usbd defaults
uart:~$ usbd init
uart:~$ usbd enable

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-05-11 11:26:54 +02:00
Francois Ramu
e9dd412a3d boards: arm: stm32h7b3 disco kit has external octo NOR flash controller
Add the alias to the MX25LM512 octo-NOR flash for the spi-flash node.
Remove the overlay for the samples/drivers/spi_flash as no MDMA driver
exists yet for the stm32h7.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-05-10 19:13:45 +02:00
Lucas Dietrich
e803b77463 samples: net: mqtt: Add a sample to connect to AWS IoT core
This sample application demonstrates the implementation of an
MQTT client that can publish messages to AWS IoT Core using
the MQTT protocol.

Fixes #22866

Signed-off-by: Lucas Dietrich <ld.adecy@gmail.com>
2023-05-10 17:54:56 +02:00
Johann Fischer
0724453c64 samples: cdc_acm: add DT overlay to support snps,dwc2 on nucleo_f413zh
Add DT overlay to be able to support and test usb_dc_dw driver
(snps,dwc2) on nucleo_f413zh board. This disables STM32 shim
driver described and configured on the SoC and board level.

Obviously,it works with other STM32F4 boards as well, but we
do not have a mechanism to apply it generically yet, upcoming
snippet support may fix that. Until then, we need something for
development and as an example.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-05-10 20:07:04 +09:00
Gerard Marull-Paretas
93b63df762 samples, tests: convert string-based twister lists to YAML lists
Twister now supports using YAML lists for all fields that were written
as space-separated lists. Used twister_to_list.py script. Some artifacts
on string length are due to how ruamel dumps content.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-10 09:52:37 +02:00
Tom Burdick
e4b10328b4 rtio: Use mpsc for submission and completion queue
Rather than the rings, which weren't shared between userspace and kernel
space in Zephyr like they are in Linux with io_uring, use atomic mpsc
queues for submission and completion queues.

Most importantly this removes a potential head of line blocker in the
submission queue as the sqe would be held until a task is completed.

As additional bonuses this avoids some additional locks and restrictions
about what can be submitted and where. It also removes the need for
two executors as all chains/transactions are done concurrently.

Lastly this opens up the possibility for a common pool of sqe's to
allocate from potentially saving lots of memory.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-05-10 00:39:43 +09:00
Gerard Marull-Paretas
259ec41c36 samples: boards: nrf: system_off: use PRE_KERNEL_1
Sample was using PRE_KERNEL_2, but the action (lock OFF state) can be
run at any time before the Kernel starts, ie, PRE_KERNEL_1/2. Use
PRE_KERNEL_1 + 99 to preserve similar behavior.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-09 23:40:22 +09:00
Mahesh Rao
b310cf2096 samples: sip_svc: Sample application using sip_svc service.
Sample application to retrieve voltage from SDM in
INTEL AGILEX SOC FPGA

Signed-off-by: Mahesh Rao <mahesh.rao@intel.com>
2023-05-09 08:46:50 -04:00
Keith Packard
bfa6a44746 tests,samples: Fix picolibc malloc arena settings
With picolibc moving to using the common malloc implementation, samples and
tests with picolibc-specific settings need to switch to using the common
malloc settings instead.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-05-09 01:29:16 +09:00
Stephanos Ioannidis
bd1a7a36f4 boards, samples: Fix minimal libc malloc arena settings
With the minimal libc moving to using the common malloc implementation,
boards and samples with minimal libc-specific settings need to switch
to using the common malloc settings instead.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2023-05-09 01:29:16 +09:00
Sreeram Tatapudi
98858f1e6a drivers: flash: Add Infineon CAT1 Flash driver
- Added initial version of Infineon CAT1 Flash driver
- Added binding file for infineon,cat1-flash-controller.yaml
- Added overlays for subsys/nvs and drivers/flash_shell
to support cy8cproto_063_ble, cy8cproto_062_4343w boards
- Defined erase-block-size in PSoC6 MPN dtsi.

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2023-05-08 11:16:09 +02:00
Alberto Escolar Piedras
2d5d9fdf77 tests/net: For nrf52_bsim use flash model
Now that the nrf52 HW models support it,
let's use their flash model instead of falling back
to the openthread RAM settings backend.

Note that the flash model defaults to just keeping the
flash content in the Linux process heap.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-05-08 10:08:35 +02:00
Manoel Brunnen
eec73b2432 doc: samples: hawkbit Fix build command
The build command for the hawkbit sample was not correct.

Signed-off-by: Manoel Brunnen <mb@lee-brunnen.de>
2023-05-08 09:59:05 +02:00
Manimaran A
0fde69411e samples: espi: microchip: espi sample compile fix
Updated the initialization of "spi_cs_control" structure
instance.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-05-08 09:58:40 +02:00
Stephan Linz
9f0bc06468 samples: mimxrt1010_evk: exclude various tests
Disable various samples because they require certain digital signals
from the Arduino header, which are not connected when the board is
shipped and therefore not defined via the connector gpio-map.

Signed-off-by: Stephan Linz <linz@li-pro.net>
2023-05-08 09:58:30 +02:00
Pavel Vasilyev
558f482bba samples: bluetooth: mesh_demo: Disable settings thread for bbc_microbit
Disable the thread as it doesn't fit into the device RAM.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-05-08 09:58:21 +02:00
Emil Gydesen
426bc4545a Bluetooth: Use BT_BYTES_LIST_LEXX macros for encoding of data
Modify the BT_UUID_XX_ENCODE and BT_LE_SUPP_FEAT_XX_ENCODE
macros to use the SYS_ENCODE_LEXX macros, instead of re-inventing
the encoding.

Also apply the macros for several other places.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-08 09:56:56 +02:00
Emil Gydesen
2ec1a506a4 Bluetooth: Audio: Fix enum mismatch for codec get chan alloc
The function bt_codec_cfg_get_chan_allocation_val takes a pointer
to an enum, rather than an uint32_t, but was wrongly defined in
the header files and incorrectly used a few places.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-05 16:18:07 +02:00
Herman Berget
e28f90f7d2 Samples: Bluetooth: Fix PAwR sample backing store array
The array sizes were in the wrong order.

Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
2023-05-05 15:32:51 +02:00
Vinayak Kariappa Chettimada
ef8b05e83a Bluetooth: Controller: Preliminary Central multiple CIS support
Implementation of preliminary Central with multiple CIS
create support in Lower Link Layer. Uses a simple CIS
offset calculation that works when ACL are created with
connection interval that is multiple of CIG ISO interval.
Each ACLs are offset using BT_CTLR_CENTRAL_SPACING hence
having the same CIG sync delay values for all the ACLs.
Advanced Scheduling to setup CIS in any order of ACL and
CIS combination, ACL placed anywhere in timeline and CIS
creation will come therein will be implemented in later
Pull Requests.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-05-05 12:26:31 +02:00
Adam Wojasinski
b96f6fd618 samples: sensor: qdec: Add overlays for Nordic Semiconductor boards
Add overlay for nrf52840dk_nrf52840 and nrf5340dk_nrf5340_cpuapp

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-05-05 11:47:53 +02:00
Adam Wojasinski
402b95ddae samples: boards: nrf: nrfx: Align nrfx_gpiote API
nrfx 3.0.0 introduces renamed API for GPIOTE nrfx driver

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-05-05 11:47:53 +02:00
Adam Wojasinski
4cab804f06 samples: nrf: nrfx_prs: Align API to new nrfx release
New nrfx release brings API changes. This commit aligns sample to them.

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-05-05 11:47:53 +02:00
Adam Wojasinski
beb7313fc4 drivers: clock_control_nrf: Align LF clock sources symbols to new nrfx
New nrfx release brings change of Low frequency sources symbols
in nrf_clock hal to uppercase. This commit aligns all occurrences.

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-05-05 11:47:53 +02:00
Alberto Escolar Piedras
e3902cae1d samples: shell: Fix filtering for POSIX arch
One of these samples was filtering all POSIX arch
boards out by explictly listing them by name
(and for the nrf52_bsim by lack of UART).

Instead filter by the architecture.

There is no functional difference in tree with this change.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-05-04 16:48:01 -04:00
Alberto Escolar Piedras
01c9b1483f samples/usb: Fix filtering for POSIX arch
Some of these samples were filtering all POSIX arch
boards out by explictly listing them by name
(and for the nrf52_bsim by lack of usb_device).

Instead filter by the architecture.

There is no functional difference in tree with this change.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-05-04 16:48:01 -04:00
Francois Ramu
6c732185af samples: modules: can openmode runs on stm32h573i_dk
Add an overlay to avoid running the samples/modules/canopennode
on the external octo NOR flash of the stm32h573i disco kit.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-05-04 20:50:27 +02:00
Alberto Escolar Piedras
843ad84db4 samples lvgl: Fix build warning with GPIO=n
The err variable is only used if the GPIO is configured in,
so move it to the right scope to avoid a build warning.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-05-04 21:59:59 +09:00
Armando Visconti
881a777082 sample/shield: x-nucleo-iks01a3: fetch all channels for lsm6dso shub
Change the sensorhub sample using a single trigger (on XL) and
fetching all channels (not only XL) in the callback.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-05-04 10:45:10 +02:00
Kumar Gala
0bae215ba9 samples: modules: thrift: filter on CONFIG_FULL_LIBCPP_SUPPORTED
Change sample to set CONFIG_FULL_LIBCPP_REQUIRED and to filter on
CONFIG_FULL_LIBCPP_SUPPORTED.  Since not all toolchains provide a
full libc++ this will restrict the sample only to those environments
that do.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-05-03 22:39:13 -04:00
Andy Sinclair
7d2fb0fb78 samples: shields: npm1300_ek: Added initial charger sensor
Charger sensor support added to NPM1300_EK sample

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-05-03 15:04:18 +02:00
Joakim Andersson
76d3fa4243 samples: tfm_integration: Add nrf9161dk_nrf9161_ns to TF-M test samples
Add nrf9161dk_nrf9161_ns board to the TF-M integration samples for
testing.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-05-03 12:39:14 +02:00
Jonathan Rico
7d1a5f5554 Bluetooth: iso: use BT_ISO_SDU_BUF_SIZE()
Use BT_ISO_SDU_BUF_SIZE() instead of calculating manually.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2023-05-03 10:02:44 +02:00
Jonathan Rico
fb10381328 Bluetooth: iso: use kconfig for userdata size
Use BT_CONN_TX_USER_DATA_SIZE when defining pools of buffers that will go
through `bt_conn_send_cb()`.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2023-05-03 10:02:44 +02:00
Jordan Yates
7fc4c69fb1 samples: bluetooth: hci_spi: IRQ assert delay
Enfore a minimum duration between edges on the IRQ pin to give the HCI
controller time to detect the state change. Without this delay and with
several packets queued on the `rx_queue`, the pin could be re-asserted
almost immediately after being cleared.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-05-02 12:36:09 +02:00
Andriy Gelman
77408116c3 samples: sensor: die_temp_polling: Adds xmc47_relax_kit overlay
Adds overlay to run the sample with the xmc47_relax_kit.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-05-02 12:34:55 +02:00
Yuval Peress
3fd0a1508b rtio: fix bug in mempool release API
It was previously assumed that the 'sys_mem_blocks' struct would maintain
information about contiguous blocks allocated so the release API only
took the starting address. This led to an issue where allocating 2+
blocks would end up with a memory leak because any block not being the
first would never be released.

Add the buffer length as an argument so the correct number of blocks can
be released. Also, ammend the tests to match and verify.

Signed-off-by: Yuval Peress <peress@google.com>
2023-05-01 09:26:06 -05:00
Kumar Gala
340ed20c12 samples, tests: cleanup void main usage.
Some samples, tests got missed in the switch from void main() to
int main().  Cleanup those samples/tests to use int main().

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-04-28 20:39:14 +02:00
Herman Berget
3c7b3e5648 Samples: Bluetooth: Add samples for PADV Connection Procedure
Samples demonstrating initiating connections from PAwR.

Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
2023-04-28 11:00:48 +02:00
Lucas Tamborrino
f18e640485 samples: subsys: settings: add esp32s3 overlay
Add overlay support for esp32s3.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-04-28 10:08:16 +02:00
Sam Hurst
714eec8496 doc: Document the USB-C Source Subsystem
Documents the USB-C Source Subsystem API.

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2023-04-28 10:06:01 +02:00
Sam Hurst
a1d13b3500 samples: usb-c: source: Add USB-C Subsystem Source Sample
Implementing USB-C Source functionality can be difficult.
This sample application serves as an example of how
to create an application with Power Delivery Source
functionality.

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2023-04-28 10:06:01 +02:00
Bill Waters
3e02d48e4e driver: adc: infineon: Adding ADC driver
- This includes the driver, test app, and sample app
- Only the boards\arm\cy8cproto_062_4343w board is supported for now

Signed-off-by: Bill Waters <bill.waters@infineon.com>
2023-04-27 10:16:23 -07:00
Keith Packard
71255a210d samples/chre: Filter out targets not providing a full libc
When the only C library available is the minimal one, this test cannot
work. Accept only platforms with full C library support to prevent build
failures.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-04-27 20:18:11 +09:00
Keith Packard
973dc2a7a4 samples/logging/syst: Use FULL_LIBC_SUPPORTED helper Kconfig symbol
This symbol detects whether there is any available full libc for a
particular target, allowing tests to filter on this condition.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-04-27 20:18:11 +09:00
Keith Packard
4134858868 tests/samples: Replace minimal libc malloc configs with common ones
With the minimal C library malloc implementation moving to libc/common, all
of the related Kconfig variables have also changed. Update uses within the
tree.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-04-27 20:17:24 +09:00
Herman Berget
627b340780 Samples: Bluetooth: Add samples for PAwR
Adds samples for both advertiser and sync.

Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
2023-04-26 20:08:16 +02:00
Łukasz Hejnak (LeHack)
1929eb3af7 drivers: sdhc: add support for using CPOL/CPHA SPI clock modes
Make it possible to use CPOL/CPHA SPI clock modes with the SDHC driver.
Some cards require the clock to switch to low when not active.

Signed-off-by: Łukasz Hejnak (LeHack) <lehack-ghub@lehack.pl>
2023-04-26 20:07:53 +02:00
Katherine Watson
cfc4273bbb doc: add ARMv6 expected outputs to mpu_test README
Add expected output for ARMv6 CPUs in the mpu_test README, as this differs
from that for other AArch32 CPUs due to differences in how ARMv6 handles
faults

Signed-off-by: Katherine Watson <katie@radicalsemiconductor.com>
2023-04-26 12:53:57 +02:00
Francois Ramu
29ef82cfaf samples: boards stm32 power mgmt nucleo_wb55rg sets a lptim prescaler
configure the nucleo_wb55rg with a prescaler on the LPTIMer input
clock to increase the max sleep duration.
With 32 the input clock is 1024Hz and max reachable timeout is
64 seconds.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-04-25 10:37:13 -07:00
Yonatan Schachter
6c93cbf7b4 samples: boards: rpi_pico: Added uart_pio sample
Added a sample for the rpi_pico board showing how to use the UART
over PIO driver.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2023-04-25 13:12:02 +02:00
Gerard Marull-Paretas
3f2c2d4130 drivers: spi: make SPI dt-spec macros compatible with C++
As of today it is not possible to use SPI dt-spec macros in C++,
something known and documented. The main reason is because `cs` property
is initialized using a compound literal, something not supported in C++.
This PR takes another approach, that is to not make `cs` a pointer but a
struct member. This way, we can perform a regular initialization, at the
cost of using extra memory for unused delay/pin/flags if `cs` is not
used.

Fixes #56572

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-24 21:29:55 +02:00
Hein Wessels
9ea250a445 samples: net: sockets: sntp_client: build for native_posix
Extend the sample to be built with native_posix
prevent issues like #57133 in the future. Also extends the qemu
build to build a "raw" configurationw without POSIX_API or
NET_SOCKETS_POSIX_NAMES.

Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
2023-04-24 09:23:17 -04:00
Hein Wessels
2689e16670 net: sntp: support building without NET_SOCKETS_POSIX_NAMES
Fixes the compiler error that occurs when attempting to build
the SNTP library with CONFIG_NET_SOCKETS_POSIX_NAMES=n, while
using native_posix.

Closes #57133

Co-authored-by: Chris Friedt <cfriedt@meta.com>
Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
2023-04-24 09:23:17 -04:00
Al Semjonovs
0258b23401 Revert "adc: harness regex string not capturing sample app"
This reverts commit aef973d65b.

Signed-off-by: Al Semjonovs <asemjonovs@google.com>
2023-04-21 09:39:08 +02:00
Benjamin Björnsson
0a6d65583d samples: remove unnecessary include of adc dt-bindings
Remove include of adc dt-bindings header since these are
already included in the root .dtsi file that adds an adc.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-20 10:48:33 +02:00
Daniel Leung
c4565ad5b6 samples: out_of_tree_driver: fix kconfig dependency
The out_of_tree_driver sample defines syscall functions, and
thus requiring CONFIG_APPLICATION_DEFINED_SYSCALL to be enabled
even if no userspace is involved. This is due to the function
generation for the syscall stubs.

Fixes #56946

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-04-19 21:02:11 -04:00
Sylvio Alves
a6c8c6e546 soc: esp32s3: add Wi-Fi support
This adds Wi-Fi linker areas and also bring wi-Fi entry
into SoC device tree.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-04-19 17:11:58 +02:00
Gerard Marull-Paretas
1eb683a514 device: remove redundant init functions
Remove all init functions that do nothing, and provide a `NULL` to
*DEVICE*DEFINE* macros.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-19 10:00:25 +02:00
Al Semjonovs
aef973d65b adc: harness regex string not capturing sample app
NTC thermistor changes updated the sample app output,
correcting harness string to match sample app.

Signed-off-by: Al Semjonovs <asemjonovs@google.com>
2023-04-18 11:25:12 -04:00
Martí Bolívar
26d3157ed4 apps: misc void main -> int main fixes
Fix some additional cases in in-tree applications (samples and tests).

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2023-04-18 05:45:36 -07:00
Ivan Herrera Olivares
37e3e843ed samples: settings: Fix typo in comment
This commit fixes the typo: 'kay-value' to 'key-value'

Signed-off-by: Ivan Herrera Olivares <ivan.herreraolivares@gmail.com>
2023-04-18 09:31:06 +02:00
Keith Short
c752568708 dts: microchip: Remove deleted property
PR https://github.com/zephyrproject-rtos/zephyr/pull/55129 deleted the
"port-sel" property.  Delete this property from remaining Microchip SoC
variants and boards.

Test: west build -b mec172xevb_assy6906 samples/drivers/espi/

Signed-off-by: Keith Short <keithshort@google.com>
2023-04-18 09:30:55 +02:00
Filip Kokosinski
e9e5498a51 samples/bluetooth/central: fix error code reporting
`bt_conn_le_create` returns a signed value. Error message format string
expects an unsigned value.

This commit changes the expected value in the format string to a signed
one, to match what `bt_conn_le_create` returns.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2023-04-17 15:12:32 +02:00
Stephanos Ioannidis
43fc0f5184 samples: drivers: spi_flash_at45: Add missing return statement
The `main` function now returns `int` instead of `void` and therefore
must return a value.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2023-04-17 20:19:36 +09:00
Stephanos Ioannidis
db91e81ffe samples: stm32: backup_sram: Fix main function return statement
The `main` function now returns `int` instead of `void` and therefore
any return statements inside it must return a value.

Note that any return values other than 0 are currently reserved.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2023-04-17 20:19:19 +09:00
Andrzej Głąbek
8cc7ca1208 samples: drivers: adc: Update console output specification
This is a follow-up to commit 9fa35bc9a0.

Align specification of the expected console output with the changes
done to the sample in the above commit.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-04-17 11:24:44 +02:00
Vinayak Kariappa Chettimada
3a9e233089 samples: Bluetooth: hci_rpmsg: Fix stack sizes based on profiling
Fix stack size requirement in hci_rpmsg sample based on
profiling using thread analyzer.

Below is the observed stack usages now under Connected ISO
audio application on nrf5340_audio_dk_nrf5340_cpunet:
Thread analyze:
 0x21001968          : STACK: unused 248 usage 264 / 512 (51 %); CPU: 1 %
      : Total CPU cycles used: 102725
 HCI rpmsg TX        : STACK: unused 560 usage 592 / 1152 (51 %); CPU: 0 %
      : Total CPU cycles used: 73484
 BT RX               : STACK: unused 208 usage 432 / 640 (67 %); CPU: 2 %
      : Total CPU cycles used: 198386
 BT RX pri           : STACK: unused 200 usage 184 / 384 (47 %); CPU: 1 %
      : Total CPU cycles used: 147340
 thread_analyzer     : STACK: unused 544 usage 480 / 1024 (46 %); CPU: 1 %
      : Total CPU cycles used: 169843
 sysworkq            : STACK: unused 208 usage 304 / 512 (59 %); CPU: 0 %
      : Total CPU cycles used: 1
 idle                : STACK: unused 208 usage 48 / 256 (18 %); CPU: 91 %
      : Total CPU cycles used: 8529054
 main                : STACK: unused 144 usage 368 / 512 (71 %); CPU: 1 %
      : Total CPU cycles used: 107724
 ISR0                : STACK: unused 192 usage 832 / 1024 (81 %)

Below is the observed stack usages now under Broadcast ISO
audio application on nrf5340_audio_dk_nrf5340_cpunet:
Thread analyze:
 0x21001968          : STACK: unused 248 usage 264 / 512 (51 %); CPU: 2 %
      : Total CPU cycles used: 622241
 HCI rpmsg TX        : STACK: unused 240 usage 912 / 1152 (79 %); CPU: 2 %
      : Total CPU cycles used: 504720
 BT RX               : STACK: unused 464 usage 176 / 640 (27 %); CPU: 0 %
      : Total CPU cycles used: 3
 BT RX pri           : STACK: unused 200 usage 184 / 384 (47 %); CPU: 0 %
      : Total CPU cycles used: 212981
 thread_analyzer     : STACK: unused 544 usage 480 / 1024 (46 %); CPU: 1 %
      : Total CPU cycles used: 419593
 sysworkq            : STACK: unused 336 usage 176 / 512 (34 %); CPU: 0 %
      : Total CPU cycles used: 1
 idle                : STACK: unused 208 usage 48 / 256 (18 %); CPU: 91 %
      : Total CPU cycles used: 22065557
 main                : STACK: unused 144 usage 368 / 512 (71 %); CPU: 1 %
      : Total CPU cycles used: 388285
 ISR0                : STACK: unused 304 usage 720 / 1024 (70 %)

Relates to commit 3f7fa919d9 ("samples: Bluetooth: hci_rpmsg:
Fix RAM overflow building for DF feature").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-04-17 11:22:00 +02:00
Andrei Emeltchenko
607a56585a samples: ivshmem: Use device_is_ready()
Fix sample to use device_is_ready(dev) when checking for device.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-04-17 10:18:46 +02:00
Rubin Gerritsen
e7262771f0 samples: bluetooth: hci_rpmsg: Discard too long incoming packets
Avoid hitting the assert
```
__ASSERT_NO_MSG(net_buf_simple_tailroom(buf) >= len);
```
when the provided buffer is longer than we can fit. Instead discard the
packet and log an error.

This handling is similar to packets are discarded in hci_uart

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2023-04-17 10:18:36 +02:00
Marc Desvaux
cbd9e2172f samples: boards: stm32: pm: standby_shutdown: use hwinfo_get_reset_cause()
use hwinfo_get_reset_cause() instead of LL_PWR_IsActiveFlag_SB()
remove LL_PWR_ClearFlag_WU() not  mandatory

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-04-17 10:15:35 +02:00
Théo Battrel
12e9be7cc0 Bluetooth: Samples: Add Encrypted Advertising sample
Add a new sample that demonstrate the following points:

- Exchange of Key Material;
- Advertising encrypted data;
- Read advertising data;
- Decrypt advertising data that are encrypted.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2023-04-17 10:15:04 +02:00
Andy Sinclair
f88d1d0ac0 samples: shields: npm1300_ek: Initial sample for NPM1300 PMIC EK
Initial sample for Nordic NPM1300 PMIC EK.
Supports regulators and GPIO only.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-04-17 10:14:40 +02:00
Rodrigo Peixoto
a24c307baa samples: zbus: fix variable sizes and simplify benchmark sample
The benchmark sample was not suitable for constrained devices.
With u32, the maximum accumulated time was about 4 seconds.
Some devices take more than 4 seconds to finish the benchmark.
This commit fixes the time counting by replacing the variables
and calls to 64 bits and removes all the dynamic allocation
memory on the sample to keep that as simple as possible. It
adjusts the documentation and the tests as well.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2023-04-14 12:14:29 -05:00
Gerard Marull-Paretas
667eeb11fb shell: fix MISRA 5.7 violations on struct shell
MISRA Rule 5.7 requires uniqueness of tag identifiers. Shell is
frequently problematic because many code uses `const struct shell
*shell`. This causes CI noise every time one of these shell files is
edited, so let's update all of them with `const struct shell *sh`
instead.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-14 12:21:08 +02:00
Alberto Escolar Piedras
aee70b0ff6 samples/bluetooth/broadcast_audio_sink: Fix return to int
Main now has a int return type.
Fix return values, so this sample can be compiled.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-04-14 09:55:48 +02:00
Keith Packard
1d5e644d12 samples, tests: Switch main return type from void to int
This applies the coccinelle script to another set of files:

   samples/bluetooth/bthome_sensor_template/src/main.c
   samples/boards/stm32/power_mgmt/standby_shutdown/src/main.c
   samples/drivers/smbus/src/main.c
   samples/drivers/virtualization/ivshmem/doorbell/src/ivshmem.c
   samples/fuel_gauge/max17048/src/main.c
   samples/hello_world/src/main.c
   samples/sensor/proximity_polling/src/main.c
   samples/subsys/logging/ble_backend/src/main.c
   tests/drivers/build_all/mfd/src/main.c

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-04-14 07:49:41 +09:00
Keith Packard
7d4a7d79a8 doc/releases: Note "main" return type change for 3.4
Add a paragraph explaining the change from void main(void) to int
main(void) and the requirement for main functions to return zero.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-04-14 07:49:41 +09:00
Keith Packard
f12853004e samples/drivers/display: Eliminate control flow in macro
Remove RETURN_FROM_MAIN macro which performed control flow, violating
compliance tests. Replace with explicit use of posix_exit_main or return as
appropriate.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-04-14 07:49:41 +09:00
Keith Packard
0b90fd5adf samples, tests, boards: Switch main return type from void to int
As both C and C++ standards require applications running under an OS to
return 'int', adapt that for Zephyr to align with those standard. This also
eliminates errors when building with clang when not using -ffreestanding,
and reduces the need for compiler flags to silence warnings for both clang
and gcc.

Most of these changes were automated using coccinelle with the following
script:

@@
@@
- void
+ int
main(...) {
	...
-	return;
+	return 0;
	...
}

Approximately 40 files had to be edited by hand as coccinelle was unable to
fix them.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-04-14 07:49:41 +09:00
Guillaume Gautier
ce5de8557b samples: sensor: stm32_temp_sensor: remove stm32_temp_sensor sample
Now that there is a generic die_temp_polling sample, this specific STM32
sample is redundant and can be removed.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-04-13 09:15:27 -05:00
David Leach
095db2ee27 boards: lpcxpresso55s36: Enable LPADC
Enable LPADC on lpcxpresso55s36 board
Support lpcxpresso55s36 on ADC driver sample

Signed-off-by: David Leach <david.leach@nxp.com>
2023-04-13 16:13:25 +02:00
Andries Kruithof
6892d3c0bc Sample: Bluetooth: fix broadcast audio source sink conf file
The platform nrf52_bsim was specified as an integration platform,
but was missing from the allow list.
This commit adds this platform to the allow list.

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2023-04-13 16:08:53 +02:00
Vinayak Kariappa Chettimada
5648d02b29 sample: Bluetooth: Fix broadcast audio source sink conf file
Fix broadcast audio source and sink samples' conf file to
use Broadcast ISO feature in Zephyr Bluetooth Controller.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-04-13 13:19:19 +02:00
Gerard Marull-Paretas
a5fd0d184a init: remove the need for a dummy device pointer in SYS_INIT functions
The init infrastructure, found in `init.h`, is currently used by:

- `SYS_INIT`: to call functions before `main`
- `DEVICE_*`: to initialize devices

They are all sorted according to an initialization level + a priority.
`SYS_INIT` calls are really orthogonal to devices, however, the required
function signature requires a `const struct device *dev` as a first
argument. The only reason for that is because the same init machinery is
used by devices, so we have something like:

```c
struct init_entry {
	int (*init)(const struct device *dev);
	/* only set by DEVICE_*, otherwise NULL */
	const struct device *dev;
}
```

As a result, we end up with such weird/ugly pattern:

```c
static int my_init(const struct device *dev)
{
	/* always NULL! add ARG_UNUSED to avoid compiler warning */
	ARG_UNUSED(dev);
	...
}
```

This is really a result of poor internals isolation. This patch proposes
a to make init entries more flexible so that they can accept sytem
initialization calls like this:

```c
static int my_init(void)
{
	...
}
```

This is achieved using a union:

```c
union init_function {
	/* for SYS_INIT, used when init_entry.dev == NULL */
	int (*sys)(void);
	/* for DEVICE*, used when init_entry.dev != NULL */
	int (*dev)(const struct device *dev);
};

struct init_entry {
	/* stores init function (either for SYS_INIT or DEVICE*)
	union init_function init_fn;
	/* stores device pointer for DEVICE*, NULL for SYS_INIT. Allows
	 * to know which union entry to call.
	 */
	const struct device *dev;
}
```

This solution **does not increase ROM usage**, and allows to offer clean
public APIs for both SYS_INIT and DEVICE*. Note that however, init
machinery keeps a coupling with devices.

**NOTE**: This is a breaking change! All `SYS_INIT` functions will need
to be converted to the new signature. See the script offered in the
following commit.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>

init: convert SYS_INIT functions to the new signature

Conversion scripted using scripts/utils/migrate_sys_init.py.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>

manifest: update projects for SYS_INIT changes

Update modules with updated SYS_INIT calls:

- hal_ti
- lvgl
- sof
- TraceRecorderSource

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>

tests: devicetree: devices: adjust test

Adjust test according to the recently introduced SYS_INIT
infrastructure.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>

tests: kernel: threads: adjust SYS_INIT call

Adjust to the new signature: int (*init_fn)(void);

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-12 14:28:07 +00:00
Kumar Gala
dca600bd19 samples/tests: bluetooth: Remove qemu_cortex_m3
Remove qemu_cortex_m3 from various bluetooth tests and samples since
they enable NVS which requires CONFIG_FLASH_PAGE_LAYOUT which is
not supported on qemu_cortex_m3 since there is no flash driver.

We get build failures with the arm-clang compiler because nvs.c
is referencing z_impl_flash_get_page_info_by_offs which does not
exist.

Switch to qemu_x86 as the integration_platforms if it was
qemu_cortex_m3 before.

Removed the bluetooth.mesh.mesh_shell.reduced_legacy as this was
added specifically for building on qemu_cortex_m3.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-04-12 09:01:34 +02:00
Scott Worley
e8f089bdcc samples: boards: Microchip MEC172x EVB QMSPI-LDMA sample
Sample code for demonstrating spi buffer usage for single,
dual, and quad SPI transfers.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2023-04-11 16:57:56 +02:00
Scott Worley
5c00a83b99 drivers: spi: Microchip XEC QMSPI-LDMA fix spi buffer usage
Zephyr SPI driver model for full-duplex operation assumes
data will be transmitted and received during each clock period.
The QMSPI driver for the XEC family also supported dual and
quad I/O use cases which are inherently half-duplex. To
support dual/quad the driver incorrectly processed spi buffers
as all transmit buffers first then all receive buffers. This
worked if only the SPI driver was used. It did not work with
the Zephyr flash SPI NOR driver which assumes SPI drivers
follow the SPI driver model. This commit implements a QMSPI
driver that follows the Zephyr SPI driver model resulting in
a slightly smaller driver. Dual/quad SPI transactions are
supported if the experimental SPI extended mode Zephyr
configuration flag is enabled. We also remove the QMSPI full duplex
driver added previously to support the flash SPI NOR driver.
Added board to spi loop-back test and spi_flash sample.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2023-04-11 16:57:56 +02:00
Gerard Marull-Paretas
0ebe14beb4 sys: util: migrate all files to DIV_ROUND_UP
ceiling_fraction is deprecated, use DIV_ROUND_UP.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-11 12:00:37 +02:00
Huifeng Zhang
dcd2778525 samples: zperf: enable it on the fvp_base_revc_2xaemv8a board
Add config file and devicetree overlay for the fvp_base_revc_2xaemv8a
board, so that this sample can run on this board.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-04-11 11:27:05 +02:00
Huifeng Zhang
bd8f527368 samples: zperf: enable it on the fvp_baser_aemv8r board
Add config file and devicetree overlay for the fvp_baser_aemv8r board,
so that this sample can run on this board.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-04-11 11:27:05 +02:00
Huifeng Zhang
5d90e7589c samples: dhcpv4_client: enable it on the fvp_base_revc_2xaemv8a board
Add config file and devicetree overlay for the fvp_base_revc_2xaemv8a
board, so that this sample can run on this board.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-04-11 11:27:05 +02:00
Huifeng Zhang
1ae558f5b4 samples: dhcpv4_client: enable it on the fvp_baser_aemv8r board
Add config file and devicetree overlay for the fvp_baser_aemv8r board,
so that this sample can run on this board.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-04-11 11:27:05 +02:00
Emil Gydesen
e00500af49 samples: Bluetooth: Add Scan Delegator support to Broadcast Audio Sink
Add support for the Scan Delegator for the Broadcast
Audio Sink sample. This include advertising connectable
as well as handling PAST.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-04-11 11:26:28 +02:00
Emil Gydesen
6bbda2cbfd Bluetooth: Audio: Add Scan Delegator dependency for Broadcast Sink
Per the BAP specification, if the Broadcast Sink role is
supported, then the Scan Delegator shall also be supported.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-04-11 11:26:28 +02:00
Fabio Baltieri
69c5a6cc17 samples: lvgl: enable the input pointer for native_posix
Enable the input pointer code for the LVGL sample in native posix. This
is supported by SDL which is used for the display anyway, so not reason
to keep it off by default.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-04-11 09:34:23 +02:00
Yuval Peress
d6062d36d0 rtio: Update sensor_batch_processing sample
Update the sample to use mempool feature

Signed-off-by: Yuval Peress <peress@google.com>
2023-04-10 18:34:43 -04:00
Al Semjonovs
9fa35bc9a0 adc: Add TI ADS7052 SPI driver
Add driver for TI ADS7052.

Signed-off-by: Al Semjonovs <asemjonovs@google.com>
2023-04-07 16:23:17 -05:00
Dean Sellers
b0d785df18 samples: net: wifi: esp32: add auto dhcpv4 to esp32 boards
The wifi sample for esp32 boards would connect but not do
dhcp.

Signed-off-by: Dean Sellers <dsellers@evos.com.au>
2023-04-07 13:32:16 +02:00
Nick Ward
51597cbc82 samples: sensor: thermometer: update sample
Update thermometer sample with  mcp970x temperature sensor.

Removing test with frdm_k64f integration platform as it doesn't
provide an ambient temperature sensor.

Removing the bbc_microbit board as it only seems to provide the
die temperature of the nRF51 SoC and not an ambient temperature
sensor.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-04-07 13:30:59 +02:00
Manimaran A
535d64cd44 drivers: peci: microchip: Enabled low power mode
Updated the PECI driver to support low power mode.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-04-07 13:30:40 +02:00
Dominik Ermel
5712fcb9fb samples/fs/fat_fs: Enable nrf52840dk_nrf52840 for twister
nrf52840dk_nrf52840 configurations have been added as build_only
configurations.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-04-07 13:26:18 +02:00
Dominik Ermel
bfd65f290d samples/fs/fat_fs: Readme update
The sample now support's setting up FAT FS on devices without
SD card access and this new ability requires update in documentation.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-04-07 13:26:18 +02:00
Dominik Ermel
e89ffb5a6f samples/fs/fat_fs: Allow creating entries for demonstartion
The commits adds Kconfig option CONFIG_SAMPLE_FATFS_CREATE_SOME_ENTRIES
which causes the sample to attempt to create one file and one
directory, in case if listing does not show anything, just
to demnonstrate how FAT FS operations work on internal flash.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-04-07 13:26:18 +02:00
Dominik Ermel
f079225637 samples/fs/fat_fs: Add support for nrf52840dk_nrf52840
The commits adds support for nrf52840dk_nrf52840 with two additional
configurations:
 - with FAT FS on internal SoC flash
 - with FAT FS on QSPI connected MX25

In case of SoC configuration there is re-configuration of internal
partitions done, doe to need for at least of 64kiB for FAT FS.
The QSPI configuration only defines additional partition on
external device.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-04-07 13:26:18 +02:00
Rodrigo Cataldo
1feaa9db06 samples: drivers: virtualization: add ivshmem doorbell sample
Provide a sample for ivshmem-doorbell running under virtualization
(QEMU). The sample relies on existing tools (ivshmem-server,
ivshmem-client) that must be run at the host (unix).

The sample can be run on userspace or kernelspace, and on arm64 (qemu,
kvm) and x86_64 (qemu) platforms.

This execution of this code is quite complex, thus the README should be
made available in the official documentation. This is why the code is a
sample and not a test.

Signed-off-by: Rodrigo Cataldo <rodrigo.cataldo@huawei.com>
Co-authored-by: Henri Xavier <datacomos@huawei.com>
2023-04-07 13:26:01 +02:00
Caspar Friedrich
ba66f41e21 samples: w1: Update scanner example for ds2482-800 bus driver
The scanner example for 1-wire now supports the DS2482-800 multi channel
bus master.

Signed-off-by: Caspar Friedrich <c.s.w.friedrich@gmail.com>
2023-04-07 13:11:54 +02:00
Francois Ramu
ad4cc3a577 samples: drivers: stm32h5 octospi driver testing
Add the config for testing the jesd jedec sfdp of the octoNor flash
on the stm32h573 disco kit.
The external octoflash is the macronix  MX25LM51245 or micron.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-04-07 08:33:51 +00:00
Benjamin Björnsson
0599e9c7fa samples: drivers: adc: Add Nucleo C031C6 overlay
Add overlay for Nucleo C031C6 board.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-07 08:18:03 +00:00
Anas Nashif
fcefc27823 tests: remove intel adsp cavs platforms from filters
Remove all filters related to dropped platforms.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-04-06 18:51:56 +02:00
Vinayak Kariappa Chettimada
3f7fa919d9 samples: Bluetooth: hci_rpmsg: Fix RAM overflow building for DF feature
Fix RAM overflow building for direction finding feature on
nRF53 Series, by reducing thread stack sizes. And move
building DF plus CIS feature to hci_uart sample from
hci_rpmsg sample.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-04-06 12:57:20 +00:00
Rico Ganahl
f53d0e4d05 samples: drivers: display: introduce B-LCD40-DSI1
Add STMicroelectronics MIPI DSI display shield for testing.

Signed-off-by: Rico Ganahl <rico.ganahl@bytesatwork.ch>
2023-04-06 11:51:06 +02:00
Vinayak Kariappa Chettimada
f3c95831a2 samples: Bluetooth: hci_spi: Fix RAM overflow
Fix RAM overflow by using default values for
BT_BUF_ACL_RX_SIZE and BT_BUF_ACL_RX_COUNT. Default Rx size
of 27 is sufficient for nRF51 SoC, as it does not support
data length extensions.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-04-06 09:12:08 +00:00
Simon Hein
72f2b01e5a samples: Update fs format sample README
Update the README.md to README.rst format and
rephrased parts of the description.

Signed-off-by: Simon Hein <Shein@baumer.com>
2023-04-05 19:32:52 +02:00
Maciej Perkowski
a13edec310 samples: sensors: Remove warp7_m4 from fxas21002 platform_allow list
The sample is overflowing flash on this platform

fixes: #56455

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2023-04-05 19:32:14 +02:00
Lucas Tamborrino
6a0b5346ef samples: sensor: qdec: add esp32s3 overlay
Add esp32s3 overlay to qdec sample to ilustrate
the use of PCNT in quadrature enconder mode.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-04-05 11:23:48 -05:00
Francois Ramu
770a7473bf samples: drivers: counter alarm running on the stm32h573i_dk
Run the samples/drivers/counter/alarm on the stm32h573i_dk.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-04-05 10:39:19 +00:00
Tomasz Moń
cbd8f8b49f samples: metairq_dispatch: Ensure large enough queues
Make queues used in metairq dispatch sample capable of storing all
generated messages. This prevents seemingly random hangs that tend to
happen with some random seeds.

Fixes: #54610

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2023-04-05 11:06:17 +02:00
Pieter De Gendt
6b532ff43e treewide: Update clock control API usage
Replace all (clock_control_subsys_t *) casts with (clock_control_subsys_t)

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-04-05 10:55:46 +02:00
Maciej Perkowski
835c6a679e sample: sensor: Change integration_platforms for fxas21002 sample
Builds on warp7_m4 were overflowing flash, hence the change to
the another platform from the allow_list, which is not causing
overflows.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2023-04-05 08:30:35 +02:00
Fabio Baltieri
86da50c986 samples: cmsis_rtos_v1: philosophers: increas CMSIS_THREAD_MAX_STACK_SIZE
This sample is failing regularly in CI and locally for
qemu_cortex_a53_smp, seems like the stack is not enough:

thread_analyzer: 0x4001f740: STACK: unused 1040 usage 1008 / 2048 (49 %)
thread_analyzer: 0x4001f3a0: STACK: unused 944 usage 1104 / 2048 (53 %)
thread_analyzer: 0x4001f000: STACK: unused 1040 usage 1008 / 2048 (49 %)
...

Increasing to 2048 seems to make it run reliably.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-04-04 16:23:37 +00:00
Kumar Gala
762b109179 shell: fix armclang compiler warnings with is*() functions
We get compile warnings of the form:

error: converting the result of
'<<' to a boolean; did you mean
'((__aeabi_ctype_table_ + 1)[(byte)] << 28) != 0'?
 [-Werror,-Wint-in-bool-context]
                if (!isprint(byte)) {
                     ^

Since isprint (and the other is* functions) return an int, change check
to an explicit test against the return value.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-04-04 13:47:14 +02:00
Victor Chavez
a18aa915ce logging: Added BLE Backend Service
Added a new logger backend to recieve data over a BLE
notification characteristic.
The characteristic is based on the UUID from the Nordic connect SDK
service NUS, which allows to have a UART shell over BLE.
The idea behind this, is that this logger can be used directly
with the NRF apps or any other BLE UART terminal app.

Signed-off-by: Victor Chavez <chavez-bermudez@fh-aachen.de>
2023-04-03 15:17:57 +02:00
Emil Obalski
baf758dd52 samples: ipc: Remove shared memory clear
Clearing the shared memory is no longer required
after bounding functionality was reworked and an attempt
to read the magic numer is no longer the case.

Signed-off-by: Emil Obalski <Emil.Obalski@nordicsemi.no>
2023-04-03 11:29:08 +02:00
Francois Ramu
cef8c3fdd1 samples: drivers: adc for the stm32h5 boards
Add the new nucleo_h503rb board for testing the adc_api driver
on the ADC1 channel6 (pf12). Read the analog value of the ADC1
input on A5 of the arduino connector (CN16).

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-04-03 09:50:43 +02:00
Peter Fecher
a95862bcdc samples: sensor: Add proximity sensor sample
Adds generic sample for proximity sensors.

Signed-off-by: Peter Fecher <p.fecher@phytec.de>
2023-03-31 09:20:36 +02:00
Jordan Yates
41d83d7ea2 lora: compile drivers based on devicetree
Similar to the changes made in #48048, compile in the appropriate lora
modem driver when `CONFIG_LORA=y`. The `LORA_SX12XX` symbol has no
use now so remove. LoRa and LoRaWAN subsystems are still marked as
unstable so no additional deprecation cycle is needed.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-03-31 09:20:22 +02:00
Joakim Andersson
9ccd202a76 tfm: Use relative path to the runners.yaml hex file and move tfm_merged
Move tfm_merged.hex from <build>/tfm_merged.hex to
<build>/zephyr/tfm_merged.hex.
Use relative path to the runners.yaml hex file.

This makes it possible to move the build folder.
Example would be to copy out the runners.yaml and tfm_merged.hex file
and still be able to call west flash --skip-rebuild.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-03-31 09:20:04 +02:00
Lucas Tamborrino
f41be5254b samples: basic: blinky_pwm: add esp32s3 overlay
Add esp32s3 overlay to sample
Remove obsolete conf files for esp32xx boards

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-03-31 09:19:56 +02:00
Dominik Ermel
bfdaa9ad61 samples: fs: littlefs: Fix typo in overlay selection
Corrected DTS_OVERLAY_FILE to DTC_OVERLAY_FILE.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-03-31 09:19:33 +02:00
Kumar Gala
b4d4e30e9b bluetooth: fix armclang compiler warnings with is*() functions
We get compile warnings of the form:

error: converting the result of
'<<' to a boolean; did you mean
'((__aeabi_ctype_table_ + 1)[(byte)] << 28) != 0'?
 [-Werror,-Wint-in-bool-context]
                if (!isprint(byte)) {
                     ^

Since isprint (and the other is* functions) return an int, change check
to an explicit test against the return value.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-03-31 09:19:16 +02:00
Kenneth J. Miller
2e3b2e18de Revert "samples: boards: stm32: pm: standby_shutdown: use hwinfo_get_reset_cause()"
This reverts commit ceb21b733b.

Signed-off-by: Kenneth J. Miller <ken@miller.ec>
2023-03-31 09:18:54 +02:00
Martin Jäger
a99c12d572 samples: drivers: dac: allow building for all boards with overlays
Add all boards where the required overlay is present in the boards
folder to platform_allow. At the same time sort the list alphabetically
to keep a better overview.

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-03-30 17:34:03 -04:00
Jamie McCrae
d1b40013d4 samples: out_of_tree_board: Fix board name
Fixes a missed file when the board was renamed that prevented
this sample from working.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-30 09:45:37 +00:00
Andrei Emeltchenko
db2ebed78d tests: smbus: Cleanup CMakeLists files
Remove "-machine Q35" from QEMU_EXTRA_FLAGS since this is now the
default qemu_x86_64 configuration.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-30 09:45:02 +00:00
Marc Desvaux
ceb21b733b samples: boards: stm32: pm: standby_shutdown: use hwinfo_get_reset_cause()
use hwinfo_get_reset_cause() instead of LL_PWR_IsActiveFlag_SB()
remove LL_PWR_ClearFlag_WU() not  mandatory

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-03-30 09:50:55 +02:00
Anas Nashif
e32f9c727a samples: max44009: remove reference to quark se
Remove reference to Quark SE and the README file and put description in
sample.yaml.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-03-29 10:26:56 -05:00
Anas Nashif
629892eb7a samples: zperf: remove reference to quark se
Quark SE does not exist in zephyr anymore.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-03-29 10:26:56 -05:00
Anas Nashif
6093870caf samples: i2c fram: remove sample
Quark SE does not exist in zephyr anymore and this sample was there as
one of the first i2c users in Zephyr and is not providing any value any
more.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-03-29 10:26:56 -05:00
Francois Ramu
2928f30551 samples: drivers: watchdog testing on the stm32h573i_dk
Run the samples/drivers/watchdog on the stm32h573i_dk
for both IWDG and WWDG of the stm32h5 device

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-03-29 10:04:39 +02:00
Romain Mahoux
e5b70121e7 samples: minimal: define an empty project configuration
Cmake configuration forces projects to define a prj.conf

Signed-off-by: Romain Mahoux <romain@mahoux.fr>
2023-03-28 15:05:01 +02:00
Krzysztof Chruscinski
a5865949d9 samples: drivers: counter: alarm: Fix nordic DKs
After reworking counter driver to use device tree this sample
stopped to compile for nordic DKs. Providing overlays to fix
the compliation.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2023-03-27 22:15:15 +00:00
Kumar Amit Mehta
ccd88a4b61 documentation: samples: smp: Fix pathname for SMP sample examples
SMP sample applications are located in the 'arch' directory.
This patch fixes the pathname for SMP sample examples.

Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com>
2023-03-27 11:06:10 -04:00
Emil Gydesen
eb62e974dc Samples: Bluetooth: Fix unicast client ASCS discovery
The unicast client used the BT_DATA_UUID16_SOME and
BT_DATA_UUID16_ALL instead BT_DATA_SVC_DATA16 for
discovering ASCS servers.

BT_DATA_SVC_DATA16 is the right one to use, as that
is mandatory for a server to advertise, and the UUID
ones are only recommended. Furthermore, the service data
of the ASCS server can now also be retrieved.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-03-24 17:35:37 +00:00
Andrei Emeltchenko
fd078b6746 samples: smbus: Remove qemu_x86_64 overlay
Remove overlay added by mistake. SMBus EEPROM PR is not merged and the
dts would be updated for qemu_x86_64 board's dts.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-24 09:36:47 -04:00
Jay Vasanth
b2f3d35540 samples: drivers: espi: update MEC172x espi sample
MEC172x espi sample to use eSPI virtual wire hardware routing
through device tree

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2023-03-23 11:58:26 -04:00
Manimaran A
754920a74f drivers: adc: microchip: Added MEC15xx board overlay
Added MEC15xx board overlay in sample folder.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-03-23 11:43:30 -04:00
Daniel DeGrasse
6c0b68672d samples: drivers: adc: treat samples as signed when using diff mode
Treat sample data as signed when using differential mode for ADC
sampling, so that negative differential samples will be converted
correctly.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-03-23 08:58:44 +00:00
Daniel DeGrasse
4629b626c8 samples: drivers: adc: update board overlays for LPADC API change
Update board overlays for boards with LPADC IP present on their SOCs, to
use new LPADC API for channel numbering.

For the RT595 and LPCxpresso55S69 EVKs, additional channels are enabled
to demonstrate the resolution and differential channel features of
the LPADC.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-03-23 08:58:44 +00:00
Pieter De Gendt
497d4899df samples: drivers: adc: Add sam4s_xplained overlay
Add a board overlay for sam4s_xplained. Channel 5 (PB1) is enabled as
well as the internal temperature sensor.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-03-23 09:41:00 +01:00
Alvaro Garcia
2380710020 drivers: Added fuel gauge max17048
Added support for fuel gauge max17048

Signed-off-by: Alvaro Garcia <maxpowel@gmail.com>
2023-03-22 14:51:33 -04:00
Alberto Escolar Piedras
6decd2d55f samples echo_client/server: Add overlay for nrf52_bsim
To disable the flash by default so the openthread RAM
settings backend is used instead.
This allows using this samples with the overlay-ot.conf
directly in the simulated nrf52_bsim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-03-22 14:09:03 +01:00
Andrei Emeltchenko
cf423b3eaa samples: Add smbus shell sample application
Add smbus sample for testing SMBus commands.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Alejandro Hidalgo Muñoz de Rivera
e9f12f21d5 samples: Updated README for tracing application sample
Updated README.txt to .rst format file

Signed-off-by: Alejandro Hidalgo Muñoz de Rivera <ahmrivera@gmail.com>
2023-03-22 11:41:56 +01:00
Johan Hedberg
4bfebf0a9c samples: watchdog: Add support for Intel TCO watchdog
Add appropriate configuration parameters for using the Intel TCO
watchdog driver with the rpl_crb board.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-03-22 11:38:59 +01:00
Magdalena Kasenberg
57784df5f0 LE Audio: Refactor server ASE callbacks to return rsp object
From now app layer is able to return explicit response code and
reason that will appear in ASE Control Point notification.

Fixes issues of ASCS/SR/SPE/BI-(07/08/09)-C PTS test cases, where
PTS was receiving wrong response codes and reasons.

Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
2023-03-22 11:38:37 +01:00
Frode van der Meeren
264ccd2e67 samples: Bluetooth: Kconfig for limited printout in some ISO samples
Add kconfig to let the ISO broadcast and ISO receive samples report
packets no more than once per set interval of packets.

Signed-off-by: Frode van der Meeren <frode.vandermeeren@nordicsemi.no>
2023-03-22 09:34:23 +01:00
Gerson Fernando Budke
6951160dd2 drivers: afec: sam: Enable sam4e SoCs
Add support to Atmel SAM SAM4E AFEC feature.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Alejandro Hidalgo Muñoz de Rivera
8851a83e18 samples: Added README for watchdog sample
Added README for watchdog sample in rst format

Signed-off-by: Alejandro Hidalgo Muñoz de Rivera <ahmrivera@gmail.com>
2023-03-21 19:44:56 +01:00
Fabio Baltieri
dee6f87b3c samples: input_dump: handle events with no device set
Input events with no associated device structure are valid. Handle them
in the sample by printing NULL instead of crashing trying to lookup the
device name.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-03-21 09:57:56 +01:00
Alejandro Hidalgo Muñoz de Rivera
53082e8ce5 samples: Updated README for thermometer sample
Updated README.txt to .rst format.

Signed-off-by: Alejandro Hidalgo Muñoz de Rivera <ahmrivera@gmail.com>
2023-03-21 09:36:17 +01:00
Michał Barnaś
052a057daf usbc: fix assignment of value for PDOs count in get_snk_cap callback
Instead of assigning the address of value to the temporary function
parameter, there should be a dereference of the pointer and assignment
of PDOs count to it.

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2023-03-21 09:36:08 +01:00
Krzysztof Chruscinski
656b0e6426 drivers: counter: Adapt to use device tree
Modifying counter drivers (rtc and timer) to rely completely on
device tree and not on Kconfig of MDK flags.

Adapting dtsi for all SoCs and adapting test configuration.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2023-03-20 16:59:40 +01:00
Robert Lubos
45d9960bc6 samples: net: sockets: echo_client: Fix userspace crash
k_work_* APIs cannot be used from user threads, hence it has to be
replaced with some other solution to retain userspace functionality in
the sample.

This commit reworks the sample as follows:
  * Replace delayed work items with combination of k_timer and a
    dedicated thread to send UDP packets. k_poll_signal is used for
    communication between k_timer callback and UDP thread.
  * As kernel objects should not be placed in a memory modifiable from
    user threads, declare a separate structure for them, and link it
    with the client context structure with a pointer.
  * k_timer_init() is not a system call, therefore it has to be called
    from supervisor thread. Therefore, add an additional function to
    initialize UDP, and use it to initialize kernel objects used by the
    UDP module and grant access for the main thread before it becomes an
    user thread. UDP thread inherits permissions from the parent (main
    thread).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-03-20 16:56:46 +01:00
Pavel Vasilyev
dba8d0c45f samples: bluetooth: mesh_demo: Fix bbc_microbit overlay
Return original configuration for bbc_microbit before this PR
https://github.com/zephyrproject-rtos/zephyr/pull/55927

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-03-20 14:02:32 +00:00
Pavel Vasilyev
3567007099 samples: bluetooth: mesh: Fix bbc_microbit overlay
Fixes mesh sample overlay for bbc_microbit introduced after
https://github.com/zephyrproject-rtos/zephyr/pull/55927

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-03-20 14:02:32 +00:00
Ole Sæther
da04b42fa4 samples: bluetooth: BTHome sensor template fix whitespace
Whitespace fix.

Signed-off-by: Ole Sæther <ole.saether@nordicsemi.no>
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2023-03-20 15:01:33 +01:00
Erwan Gouriou
4939463dc2 samples: shields: x_nucleo_53l0a1: Add missing prj.conf
This sample was missing a proj.conf which is required for any zephyr
application.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2023-03-20 19:53:24 +09:00
Jamie McCrae
5bc019d713 samples: tracing: Replace prj_<board> files with overlays
Replaces the old prj_<board>.conf files with board overlays instead.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-20 10:18:32 +01:00
Jamie McCrae
7bc1450efe samples: bluetooth: mesh: Replace prj_<board> files with overlays
Replaces the old prj_<board>.conf files with board overlays instead.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-20 10:18:32 +01:00
Jamie McCrae
3e3cee7f11 samples: bluetooth: mesh_demo: Replace prj_<board> files with overlays
Replaces the old prj_<board>.conf files with board overlays instead.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-20 10:18:32 +01:00
Jamie McCrae
2398ac1815 samples: drivers: espi: Replace prj_<board> files with overlays
Replaces the old prj_<board>.conf files with board overlays instead.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-20 10:18:32 +01:00
Jamie McCrae
34863c9f4e samples: drivers: kscan: Replace prj_<board> files with overlays
Replaces the old prj_<board>.conf files with board overlays instead.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-20 10:18:32 +01:00
Jamie McCrae
cd4453d565 samples: drivers: ps2: Replace prj_<board> files with overlays
Replaces the old prj_<board>.conf files with board overlays instead.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-20 10:18:32 +01:00
Jamie McCrae
e3525fc763 samples: zbus: remote_mock: Replace prj_<board> files with overlays
Replaces the old prj_<board>.conf files with board overlays instead.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-20 10:18:32 +01:00
Jamie McCrae
2e43a483de samples: zbus: uart_bridge: Replace prj_<board> files with overlays
Replaces the old prj_<board>.conf files with board overlays instead.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-20 10:18:32 +01:00
Ben Marsh
4e6c50646a samples: drivers: counter: alarm: Add support for stm32h735g_disco
Add the stm32h735g_disco board to the supported boards for the counter
alarm sample

Signed-off-by: Ben Marsh <ben.marsh@helvar.com>
2023-03-20 09:53:59 +01:00
Andries Kruithof
4215854956 Bluetooth: controller: remove refs to LLCP_LEGACY after rebase
Some recent PRs included conditional compilation for
KCONFIG_BT_LL_SW_LLCP_LEGACY, which must be removed.

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2023-03-17 15:05:05 +01:00
Andries Kruithof
2ada005d7c Bluetooth: controller: removing legacy LLCP code
This commit removes the legacy LLCP code including the
Kconfig option
It also updates the babblesim tests, and removes the
tests for the legacy controller

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2023-03-17 15:05:05 +01:00
Marc Desvaux
b3f739476c samples: boards: stm32: Power_mgmt: sample for standby shutdownn mode
STM32L4x power management (ultra_low_power) of Standby mode
and shutdown mode

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-03-17 14:20:05 +01:00
Jamie McCrae
e534da007d samples/tests: Add empty prj.conf files
Adds empty prj.conf files as this file is required to configure
a build.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-17 11:49:27 +01:00
Scott Chao
91ea8fa911 samples: blinky_pwm: Add stm32f072b_disco support
This will enable the use of stm23f072b_disco on this sample.
- Set pwm3 as tim3_ch1_pc6 since red led is using PC6/ TIM3_CH1.

Signed-off-by: Scott Chao <scott_chao@wistron.com>
2023-03-17 11:48:52 +01:00
Kumar Gala
831bd2f841 armclang: fix compiler warnings with isprint()
We get compile warnings of the form:

drivers/console/uart_console.c:508:8: error: converting the result of
'<<' to a boolean; did you mean
'((__aeabi_ctype_table_ + 1)[(byte)] << 28) != 0'?
 [-Werror,-Wint-in-bool-context]
                if (!isprint(byte)) {
                     ^

Since isprint returns an int, change check to an explicit test against
the return value.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-03-17 09:30:01 +01:00
Nick Ward
c49a6a0b0c samples: sensor: bq274xx: add test for CONFIG_BQ274XX_PM=n
Adds a test for BQ274XX driver option CONFIG_BQ274XX_PM=n.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-03-16 21:40:18 -04:00
Felipe
0e6a886ce4 samples: subsys: ipc: add esp32 as supported board
to the rpmsg service sample.

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2023-03-16 16:42:13 +01:00
Tomáš Beneš
14138d4a34 Bluetooth: Controller: Add coexistence implementation
To enable Bluetooth controller coexistence feature, there is
implementation of ticker task, which aborts any ongoing radio events
during assertion of the grant pin. This solves the co-existence issue
in the role of the subordinate transceiver.

Signed-off-by: Tomáš Beneš <tomas@dronetag.cz>
2023-03-16 14:37:55 +01:00
Kumar Gala
9a759025d9 samples: net: sockets: tcp: Add newlib filter to samples.yaml
Not all toolchains support newlib so tests that require newlib need
to have a filter to we don't try and build those tests on those
testcases.  Add the following to samples.yaml to handle the issue:

	filter: TOOLCHAIN_HAS_NEWLIB == 1

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-03-16 11:46:45 +01:00
Ole Sæther
f2d1757df7 samples: bluetooth: BTHome sensor template bugfix
The code for humidity was wrong.

Signed-off-by: Ole Sæther <ole.saether@nordicsemi.no>
2023-03-16 09:16:20 +01:00
Kumar Gala
0e93ffc8e3 samples: hash_map: Add newlib filter to samples.yaml
Not all toolchains support newlib so tests that require newlib need
to have a filter to we don't try and build those tests on those
testcases.  Add the following to samples.yaml to handle the issue:

	filter: TOOLCHAIN_HAS_NEWLIB == 1

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-03-16 09:15:23 +01:00
Jonathan Rico
d7ca01537f samples: Bluetooth: add more documentation for hci_uart
Try to explain how to use the hci_uart sample with another board running
the zephyr host.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2023-03-15 15:02:26 +01:00
Vinayak Kariappa Chettimada
2abc58b886 samples: Bluetooth: Remove duplicate board conf for iso_broadcast
Remove duplicated board specific conf file for iso_broadcast
and iso_receive samples. Instead, have an overlay conf file.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-03-15 08:49:42 -04:00
Fabio Baltieri
f057010eea samples: input_dump: add a board overlay for testing zephyr,gpio-keys
Add an initial board overlay in the input_dump directory for testing
zephyr,gpio-keys. This takes the exsiting "gpio-keys" node, changes the
compatible to the one used by the gpio keys input driver and set some
codes.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-03-14 17:15:09 -04:00
Lucas Tamborrino
81aaaa9f72 samples: drivers: counter: add esp32s3 overlay
Add esp32s3 overlay to counter sample

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-03-14 10:50:37 +01:00
Ole Saether
4c4fcbe8df samples: bluetooth: BTHome sensor template
A template for a sensor that uses the BTHome advertising format.

Signed-off-by: Ole Saether <ole.saether@nordicsemi.no>
2023-03-14 10:50:00 +01:00
Vibhor Meshram
4684006f1b Bluetooth: Audio: Remove "Input" from MICP naming
Removed "Input" from Microphone Input Control Profile.
Release notes kept unchanged.

Signed-off-by: Vibhor Meshram <vibhor69meshram@gmail.com>
2023-03-13 18:34:09 +00:00
Jonathan Rico
15c77acfb4 tests: Bluetooth: fix att_mtu warnings on gcc-12
The warnings are correct, we were copying 17 bytes from a 4-byte source.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2023-03-13 15:58:33 +01:00
Emil Gydesen
935e8708cd samples: Bluetooth: Add nrf5340_audio_dk board config to audio samples
Add the nrf5340_audio_dk board config to the unicast audio
samples that use LC3.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-03-13 14:02:33 +01:00
Siyuan Cheng
303eb76293 sample: driver: spi_flash: Add emsdp support
Add emsdp support in spi_flash driver sample
output log:
JEDEC QSPI-NOR SPI flash testing
==========================

Test 1: Flash erase
Flash erase succeeded!

Test 2: Flash write
Attempting to write 4 bytes
Data read matches data written. Good!

Signed-off-by: Siyuan Cheng <siyuanc@synopsys.com>
2023-03-13 11:58:48 +01:00
Sylvio Alves
14ac1347e2 samples: wifi: esp32s2_saola: decrease heap size
Current stack size is making build fail due to ram overflow.
So, decresase total heap available to make room for the application.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-03-09 17:21:04 +01:00
Francois Ramu
01bba46736 samples: kernel: metairq_dispatch differ the assert msg
Differ the __ASSERT_NO_MSG of the k_msgq_get()
just after checking the nb of cycles.
It allows precise counting of cpu cycles where the assert
does not interfere.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-03-09 09:45:09 +00:00
Sebastian Arnd
3cd58c29bf net/lib: mqtt_sn: Fix MQTT-SN IPv6 Support and assertation in Example
1. `zsock_socket()` gets the right packet familiy.
2. `inet_pton()` returns 1 on success.

This should address #55193.

Signed-off-by: Sebastian Arnd <sebastianarnd@gmail.com>
2023-03-09 09:20:53 +01:00
Andrei Emeltchenko
8a229732df samples: sensor_shell: Fix return code for sensor_shell
Fix return code from boolean (probably typo) to int.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-08 13:16:19 +01:00
Emil Gydesen
099c13846e Bluetooth: Audio: Fix minor bt_audio -> bt_bap issues
Several places used the bt_audio prefix where it shouldn't.
Also moved the BAP documentation to its own file.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-03-07 16:21:44 +01:00
Emil Gydesen
271ff1d1a3 Bluetooth: Audio: Add new bap_lc3_preset and move macros
Added a new header file bap_lc3_preset.h which contains
the definitions of the LC3 (pre)sets defined by the
BAP spec.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-03-07 16:21:44 +01:00
Emil Gydesen
3326863267 Bluetooth: Audio: Rename bt_audio_ep to bt_bap_ep
Rename the bt_audio_ep struct and API to bt_bap_ep
and move the API to bap.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-03-07 16:21:44 +01:00
Emil Gydesen
4224b45838 Bluetooth: Audio: Rename bt_audio_unicast_group to bt_bap_...
Rename the bt_audio_unicast_group API to bt_bap_unicast_group
and move the API to bap.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-03-07 16:21:44 +01:00
Emil Gydesen
77853f43f2 Bluetooth: Audio: Rename bt_audio_stream to bt_bap_stream
Rename the bt_audio_stream API to bt_bap_stream
and move the API to bap.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-03-07 16:21:44 +01:00
Emil Gydesen
e0fc612c93 Bluetooth: Audio: Rename bt_audio_unicast_client to bt_bap_...
Rename the bt_audio_unicast_client API to bt_bap_unicast_client
and move the API to bap.h

Also adds the _bap_ infix to the bt_unicast_client functions.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-03-07 16:21:44 +01:00
Emil Gydesen
be42429f90 Bluetooth: Audio: Rename bt_audio_broadcast_source to bt_bap_...
Rename the bt_audio_broadcast_source API to bt_bap_broadcast_source
and move the API to bap.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-03-07 16:21:44 +01:00
Emil Gydesen
06d00ff5f9 Bluetooth: Audio: Rename bt_audio_broadcast_sink to bt_bap_...
Rename the bt_audio_broadcast_sink API to bt_bap_broadcast_sink
and move the API to bap.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-03-07 16:21:44 +01:00
Emil Gydesen
eeae1f096a Bluetooth: Audio: Rename bt_audio_unicast_server to bt_bap_...
Rename the bt_audio_audio_server API to bt_bap_unicast_server
and move API to bap.h.

This also adds the _bap_ infix for bt_unicast_server.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-03-07 16:21:44 +01:00
Emil Gydesen
59a9f8a3b0 Bluetooth: Audio: Add reason to BAP stream stopped callback
Forwards the reason parameter from the ISO disconnect to
the stream stopped callback.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-03-07 09:44:20 +01:00
Emil Gydesen
e75fc5e318 Bluetooth: Audio: Remove pac_cache from unicast_client
Removes the unused pac_pache from the unicast_client.

This moves the storing of the PAC records (in the form of
struct bt_codec) from the stack to the upper layers.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-03-07 09:44:10 +01:00
Alberto Escolar Piedras
d3812314df samples/bluetooth/central_multilink: Relax RSSI requirement
The sample was only willing to connect if the pair RSSI level
was over -35dBm. That is ok when testing physically keeping
devices at less than 1 meter from each other.
But in CI we test with a default attenuation of 60dB between
devices and the Tx power is 0dBm.
Which causes the tests based on this sample to fail.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-03-07 08:34:26 +01:00
Alberto Escolar Piedras
a8bd8e21f6 samples/bluetooth/mtu_update: Relax RSSI requirement
The sample was only willing to connect if the pair RSSI level
was over -40dBm. That is ok when testing physically keeping
devices at less than ~1 meter from each other.
But in CI we test with a default attenuation of 60dB between
devices and the Tx power is 0dBm.
Which causes the tests based on this sample to fail.

Fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-03-07 08:34:26 +01:00
Gaël PORTAY
419dda3ed7 samples: fix path to tensorflow lite micro examples
The samples under the tensorflow modules directory has been renamed
since commit 6fd1b02496. However, the path
in their README.rst was not updated.

Additionnaly, the modules top directory under the samples is missing for
the samples magic_wand and tflm_ethosu.

This fixes the path to the tensorflow lite micro samples in their
README.rst.

Signed-off-by: Gaël PORTAY <gael.portay@rtone.fr>
2023-03-06 16:08:55 -06:00
Fabio Baltieri
e82ddb75fb samples: add input_dump sample
Add a first input sample in the subsys/input directory. This just prints
any input event on the console.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-03-06 11:47:32 -08:00
Alberto Escolar Piedras
eed1c32d51 Samples: zbus: benchmark: Exclude nrf52_bsim
For the POSIX arch, this test relays on the native_posix RTC.
But that does not exist in the nrf52_bsim.
And without something to measure actual execution time,
it does not make sense to benchmark in the POSIX arch.
So disable this test for this platform,
and add a clear build error to warn users.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-03-06 19:57:00 +02:00
Yuval Peress
8760829064 sample: add trigger support to sensor shell sample
Automatically add trigger callbacks to any sensor that supports the
data ready trigger. Use a window average in order to avoid too many
logs.

Signed-off-by: Yuval Peress <peress@google.com>
2023-03-06 10:44:52 -06:00
Hiroki Tada
01a44000e8 samples: die_temp_polling: Add esp32c3 overlay
- Add overlay for the esp32c3 board to die_temp_polling sample.
- Add aliases for the die_temp_polling sample to esp32c3 dtsi.

Testing Environment:
esp32c3-devkitC-02

Signed-off-by: Hiroki Tada <tada.hiroki@fujitsu.com>
2023-03-06 09:34:18 -06:00
Fabio Baltieri
bc612b8ebd boards: arm: add Arduino GIGA
Add support for the Arduino GIGA board, an STM32H747XI based development
board in Arduino form factor, featuring external flash, SDRAM, Bluetooth
and WiFi.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-03-06 12:33:57 +01:00
Marc Lasch
072a5da433 net: lwm2m: Register callback for firmware update cancel
Allow to register a callback function which is called when a firmware
update is canceled by the cancel command.

Signed-off-by: Marc Lasch <marc.lasch@husqvarnagroup.com>
2023-03-06 12:33:12 +01:00
Jamie McCrae
7931424414 samples: dfu: Fix missing Kconfigs
Adds some missing Kconfigs which are now needed to enable img_mgmt.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-06 12:33:02 +01:00
Alberto Escolar Piedras
a2541d6c82 util: Replace all POSIX arch busy_waits with Z_SPIN_DELAY
A new Z_SPIN_DELAY() macro has been added which
can be used to reduce a bit the amount of noise
due to the POSIX arch need to break busy loops with
k_busy_wait().
Use it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-03-04 22:14:04 +01:00
Daniel DeGrasse
43d19c0b5f samples: drivers: display: add support for RT595 EVK
Add support for RT595 EVK to display sample using RM68200 based MIPI
panel. The board is configured with an increased heap size to account
for the panel's high resolution.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-03-04 09:19:26 +01:00
Aleksandr Khromykh
9c8c9054a1 samples: Bluetooth: Mesh: remove nrf51 support
nrf51 has been discontinued. There is no reason to support
ble mesh as well as new mesh features and fitting of samples
for nrf51 DK platforms. As alternative support of nrf52840
has been added if there wasn't before.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-03-03 14:08:24 +01:00
Jamie McCrae
802668b259 samples: mgmt: updatehub: Select required Kconfigs
These Kconfig options are changing from select to depends on,
therefore make sure the needed options are used in the sample
project.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-03 10:49:32 +01:00
Jamie McCrae
1724504efb samples: mgmt: hawkbit: Select required Kconfigs
These Kconfig options are changing from select to depends on,
therefore make sure the needed options are used in the sample
project.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-03 10:49:32 +01:00
Jamie McCrae
0241de3969 samples: canopennode: Select STREAM_FLASH for sysbuild build
For mcuboot support, this Kconfig option needs to be selected, this
is done by having a separate project configuration file when
building the version that supports mcuboot.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-03 10:49:32 +01:00
Jamie McCrae
13c8f1dc97 samples: mgmt: mcumgr: smp_svr: Select FLASH_MAP and STREAM_FLASH
Selects the FLASH_MAP Kconfig as this is changing from an automatic
selection to a depends on due to a dependency loop.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-03 10:49:32 +01:00
Jamie McCrae
0bad35de45 samples and tests: Use non-environmental zephyr base variable
This drops using the environmental part when referencing ZEPHYR_BASE
as the environment value does not have to be set and, in most cases,
is no longer set at all.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-03 10:49:10 +01:00
Robert Lubos
46e93f67a6 samples: net: sockets: echo_server: Fix userspace crash
k_work_* API cannot not be used from the user threads as the APIs are
not syscalls. Doing so leads to a crash when userspace is enabled.

As the current use of delayed work API from user threads is merely
scheduling of the initial work execution, it can be moved into the main
thread context. The time difference from the former and current approach
should be marginal, as the start_tcp/udp_proto() calls are not blocking
calls.

Another issue was usage of k_mem_domain_add_thread() on uninitialized
TCP threads. This lead to another crash, as assigning thread to a memory
domain also involves removing it from the previous domain, which lead to
NULL pointer dereference if thread was not initialized yet. As, by
default, newly spawned threads inherit memory domain assignment from
their parent, it's not really needed to assign the same domain
explicitly, hence, it can be safely removed.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-03-03 10:48:21 +01:00
Emil Gydesen
977329e08b Samples: Bluetooth: Unicast Audio Client support no sink/source ASE
Allow the Unicast Audio Client sample to work if there are no
sink or no source ASEs on the remove device (e.g. if the remote
device only has sink ASEs).

If the remote have neither, it will abort.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-03-03 10:47:51 +01:00
Alberto Escolar Piedras
4c37545c26 samples: bluetooth: PAST: Disable for nrf52_bsim
The Zephyr controller does not support PAST, and there
is no other controller we can build upstream with these samples.

Disable these 2 samples for the nrf52_bsim until PAST
is supported by the controller.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-03-03 09:19:00 +01:00
Tom Burdick
3998f9f898 rtio: Shareable lock-free iodevs
By using an mpsc queue for each iodev, the iodev itself is shareable across
contexts. Since its lock free, submits may occur even from an ISR context.

Rather than a fixed size queue, and with it the possibility of running
out of pre-allocated spots, each iodev now holds a wait-free mpsc
queue head.

This changes the parameter of iodev submit to be a struct containing 4
pointers for the rtio context, the submission queue entry, and the mpsc
node for the iodevs submission queue.

This solves the problem involving busy iodevs working with real
devices. For example a busy SPI bus driver could enqueue, without locking,
a request to start once the current request is done.

The queue entries are expected to be owned and allocated by the
executor rather than the iodev. This helps simplify potential
tuning knobs to one place, the RTIO context and its executor an
application directly uses.

As the test case shows iodevs can operate effectively lock free
with the mpsc queue and a single atomic denoting the current task.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-03-03 09:18:09 +01:00
Tomasz Moń
e776241fbb samples: usb: mass: Increase main stack size
Increase main stack size for next USB device stack config to prevent
stack overflow when FatFs is used. The new main stack size value matches
the value used in old stack mass storage sample config.

Fixes: #55210

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2023-03-02 15:05:58 +01:00
Jay Vasanth
e56721b8f0 dts: gpio: Add Microchip XEC GPIO macros for use in device tree
Microchip XEC devices specify GPIO pin using octal numbering and
organize pins in banks of 32. Chip documentation does not use
bank naming rather naming each pin by its octal number. This has
led to the developer having to calculate the bit position of a pin
in its 32-bit bank when a specifying the pin for GPIO usage. We
created a set of defines for all possible GPIO pins that specify
the DT GPIO bank name used in the chip level DTSI files and the
bit position in that bank.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2023-03-02 13:52:03 +01:00
Francois Ramu
5c83a4f13d samples: basic: hash_map increasing the stack size for cxx_unordered_map
When running the testcase libraries.hash_map.newlib.cxx_unordered_map.djb2
of this samples/basic/hash_map, it appears that some platforms
have a too low stack size.
This PR is increasing that value to pass the testcase.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-03-02 07:05:09 -05:00
Daniel DeGrasse
842c14ceda samples: fs: enable littlefs sample for LPC55S69
LPC55S69 flash requires all writes be in multiples of 512 byte blocks.
Configure littleFS sample for these requirements when building targeting
the LPCXpresso55s69 EVK.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-03-02 10:57:31 +01:00
Ladislav Podivin
5a488c3891 Samples: Bluetooth: Fix scanning restart for broadcast audio sink
If waiting on the first semaphore in the main loop times out, the main
loop starts from the beginning and attempts to start scanning for
broadcast sources. But since the first semaphore was not passed, the
scan_recv_cb callback was not called yet and thus the previously started
scanning was not stopped. As a result, an attempt to start the scanning
will fail with -EALREADY and the main thread will end. To solve this,
-EALREADY is now ignored when checking the return value of
bt_audio_broadcast_sink_scan_start.

Signed-off-by: Ladislav Podivin <ladislav.podivin@tietoevry.com>
2023-03-02 10:00:56 +01:00
Jamie McCrae
af78cbdc99 samples and tests: Add REQUIRED to Zephyr find_package call
Adds REQUIRED to samples and tests for finding the zephyr package
to align all samples and tests with the same call and parameters.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-02 09:58:27 +01:00
Chris Friedt
93c2e08711 samples: modules: thrift: improve Thrift documentation
* ensure Thrift documents are globbed in `modules/index.rst`
* add a "What is Thrift?" section to the Thrift sample

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2023-03-01 19:42:49 -05:00
Chris Friedt
63e5ff0223 samples: modules: thrift: add thrift-layers image
The "Thrift Layers" image gives a good visual representation
of Thrift in what would otherwise take many words.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2023-03-01 19:42:49 -05:00
Carles Cufi
166efee65e samples: mesh_demo: Add the bbc micro:bit in integration
Set the bbc_microbit board as part of the integration platforms, since
the sample is designed for the board and so CI should fail if the sample
no longer builds for it.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2023-03-01 16:39:29 -05:00
Carles Cufi
6679a0fcbf samples: mesh_demo: Reduce footprint for bbc micro:bit
The sample no longer fits in RAM, reduce the number of discardable
packets to make it fit.

Fixes #55328.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2023-03-01 16:39:29 -05:00
Ben Marsh
30e0fa82f8 boards: arm: stm32h735g_disco: Enable ADC support
Enable ADC support for the stm32h735g_disco board in devicetree

Signed-off-by: Ben Marsh <ben.marsh@helvar.com>
2023-02-28 10:26:26 +01:00
Ben Marsh
6d55cc6c23 samples/drivers/adc: Support 16-bit resolution
Zephyr supports ADCs with 16-bit resolution, but the ADC sample
displayed readings for such incorrectly due to too-small datatype

This commit fixes the ADC sample for ADCs with 16-bit resolution

Signed-off-by: Ben Marsh <ben.marsh@helvar.com>
2023-02-28 10:26:26 +01:00
Pieter De Gendt
b1d74e42cf samples: drivers: spi_flash_at45: Remove obsolete CONFIG_SPI_FLASH_AT45
The Kconfig symbol CONFIG_SPI_FLASH_AT45 is selected by default if a
compatible device is enabled.
Remove obsolete config entry.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-02-27 14:35:15 +01:00
Pieter De Gendt
9b706a099d samples: drivers: spi_flash: Remove obsolete CONFIG_SPI_NOR configs
The Kconfig symbol for CONFIG_SPI_NOR is selected by default if a
compatible device is enabled.
Remove obsolete board config files.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-02-27 14:35:15 +01:00
Francois Ramu
7496ca45bd samples: boards: stm32 backUp Ram
Change the samples/boards/stm32/backup_sram to run on the
nucleo_u575 or stm32u585 disco kit where the backup sram is enabled
Press the reset button to see that the content of the backUp SRAM
is not altered.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-02-27 11:35:07 +01:00
Jonathan Rico
f8e5e17246 drivers: led_strip: add WS2812 I2S-based driver
Add a driver implementation that uses the I2S peripheral.
Based off this blog post:
https://electronut.in/nrf52-i2s-ws2812/

Should help with #33505, #29877 and maybe #47780, as there is no garbage
data at the end of transmissions on nRF52832, and no gaps.

Signed-off-by: Jonathan Rico <jonathan@rico.live>
2023-02-24 10:12:47 -08:00
Tomasz Moń
509c033c1d usb: device_next: new USB Mass Storage implementation
Introduce new USB Mass Storage Bulk-Only Transport implementation
written from scratch. Main goal behind new implementation was to
separate USB and SCSI parts as clearly as possible.

Limited set of SCSI disk commands is implemented in separate source code
file that is internal to USB device stack. While it should be possible
to use the SCSI implementation by other components there is currently no
other user besides USB MSC and therefore SCSI header is kept private.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2023-02-24 15:19:20 +01:00
Keith Packard
18b79a0876 samples/philosophers: Fix expected output in test configuration
This demo prints out STARVING, HOLDING, EATING, DROPPED, THINKING. The
HOLDING state was missing and the EATING state was placed in the wrong
sequence.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-02-24 12:34:26 +01:00
Keith Packard
94f680d391 samples/philosophers: Build status string with snprintk
Picolibc doesn't have any output buffering for printk, so the various
pieces of the status line would get interleaved between threads. Build the
whole line in memory using snprintk and then print it in a single printk
call.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-02-24 12:34:26 +01:00
Sjors Hettinga
0243599766 samples: echo_server: Add a full network stack overflow
Some features like IP fragmenting are default disabled to keep the network
stack compact for small devices.
In bigger applications as well as for the Maxwell Pro tests it required
to have the full functionality enabled. This can also work as example for
new projects.

Signed-off-by: Sjors Hettinga <s.a.hettinga@gmail.com>
2023-02-24 11:49:54 +01:00
TOKITA Hiroshi
cc8baccfed samples: display: cfb_custom_font: turn off display_blanking at boot
Turn off display_blanking to make it able to refresh on a device
even when blanking default off.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-02-24 09:26:30 +01:00
Andrei Emeltchenko
2e6248cb86 samples: usb: Remove unneeded old configuration
Remove OVERLAY_CONFIG and DTC_OVERLAY_FILE from sample configuration.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-02-23 17:51:31 +01:00
Andrei Emeltchenko
5b0b6e36f2 samples: usb: Allow test to build in CI
Remove dependency on usb_device for virtual USB device / hosts sample.
This allows sample to be built in CI.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-02-23 17:51:31 +01:00
Dominik Ermel
447e2c1859 samples/fs/littlefs: Separate SPI, QSPI and SoC nrf52840dk configs
Add support to run the sample on nrf52840dk_nrf52840 using
internal SoC flash, and external mx25 device over QSPI or SPI.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-02-23 09:03:58 +01:00
Dominik Ermel
d00dfa8a45 sample/drivers/jesd216: Reduce nrf52840dk SPI overlay
Reduce nrf52840dk_nrf52480_spi.overlay to use default board
definition of spi2.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-02-23 08:58:34 +01:00
Chris Friedt
480b74917d samples: lib: os: hash_map: add Hashmap sample code
This sample shows how to use `sys_hashmap`.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2023-02-22 19:14:05 +01:00
Saku Rautio
dca5d62573 Revert "Samples: Philosophers: Revert stack size change"
This reverts commit 7c00ecbbbf.

Changes introduced in that commit break the Dining Philosophers demo
for the following in-tree platforms:
  - actinius_icarus
  - circuitdojo_feather_nrf9160
  - nrf5340_audio_dk_nrf5340_cpuapp
  - nrf5340dk_nrf5340_cpuapp

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

Signed-off-by: Saku Rautio <saku.rautio@nordicsemi.no>
2023-02-22 08:15:56 -05:00
Piotr Dymacz
14bc3c28f0 samples: hci_uart: nRF52840 Dongle: drop redundant overlay
Since the commit 897d2b8204 ("boards: arm: nrf52840dongle_nrf52840: Use
USB CDC as default UART") this board has the 'cdc_acm_uart' node defined
and selected (with 'chosen' node) as 'bt-c2h-uart' by default. Overlay
file is no longer required.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-02-22 11:58:05 +01:00
Anas Nashif
c6a83ff5a6 samples: socket: tcp: add tests section
Add tests section to verify building based on the documentation.

Fixes #54991

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-02-22 05:31:07 -05:00
Anas Nashif
57dcd3cc60 samples: move litex i2s sample under samples/boards
Move the board specific sample under samples/boards.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-02-22 05:31:07 -05:00
Anas Nashif
5cd0d03e76 samples: i2s: litex: fix sample.yaml syntax
Add tests section and whitelist litex board.

Fixes #54989

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-02-22 05:31:07 -05:00
Jonas Remmert
098749bb45 samples: mesh_badge: fix BT mesh provisioning error
The BT Mesh Configuration Client API is used in an asynchronous manner
and the app key was not added before attempt binding it to mesh models.
This caused the binding functions to fail and resulted in a fail when
trying to to send mesh messages.

This commit registers a callback that is called when the app key is
assigned. After this callback is called, the binding functions are
called.

Signed-off-by: Jonas Remmert <j.remmert@phytec.de>
2023-02-21 18:36:05 +02:00
Jamie McCrae
c4fa242a46 samples: mgmt: mcumgr: smp_svr: Add missing base64 selects
Adds missing selects for CONFIG_BASE64 for overlays which use
shell/UART transports that were not updated.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-02-20 15:58:27 +01:00
Jamie McCrae
1b4b979f87 mgmt: mcumgr: Change select to depends on in Kconfigs
Select in Kconfig causes many issues with dependency loops, this
resolves the issue by replacing most select with depends on for
MCUmgr, including updates to the sample smp_svr application and
tests.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-02-20 11:27:43 +01:00
Andriy Gelman
1e2111c9e5 samples: die_temp_polling: Add xmc45_relax_kit overlay
Adds overlay for the xmc45_relax_kit.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-02-20 11:14:15 +01:00
Daniel Leung
9776cb1a39 samples: zbus: runtime_obs_registration: fix running on QEMU
() This makes the stack for both consumer and producer threads
   larger to avoid stack corruption and overflow.

() Limit to 1 CPU to preserve ordering of output for twister.

() Remove the platform_exclude as they are passing now.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-02-20 10:53:25 +01:00
Saku Rautio (Ext)
7c00ecbbbf Samples: Philosophers: Revert stack size change
In commit 31e0d86484, the stack size
was unjustifiably changed from a base of *768*
(plus a configurable extra stack size) to *2048*.
This change broke our sample tests for one of our products, which has
less available memory for the threads' stacks.

The stack size is dropped to *1024* to align with the stack sizes
specified in the other samples, which were changed in commit
31e0d86484.

Signed-off-by: Saku Rautio (Ext) <saku.rautio@nordicsemi.no>
2023-02-20 10:49:38 +01:00
Francois Ramu
3cf2654141 samples: drivers: led pwm running on 2 pwm leds on nucleo_u575
Add the overlay file to run the samples/drivers/led_pwm
on the nucelo_u575zi_q board.
Two green leds are used on pc7 and pb7 corresponding to pwm
channels of timers3 and timers4.
The leds node has to be disabled to let the pin for the pwm nodes.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-02-20 09:47:18 +01:00
Francois Ramu
98e24fa6ce samples: drivers: led pwm running on 2 pwm leds on disco l475
Add the overlay file to run the samples/drivers/led_pwm
on the disco_l475_iot1 board. Two green leds are used on pa5 and pb14
corresponding on 2 pwm channels of timers2 and timers15.
The leds node has to be disabled to let the pin for the pwm nodes.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-02-20 09:47:18 +01:00
Francois Ramu
d41f69559a samples: drivers: led pwm running on pwm led of the nucleo boards
Configure the overlay file to run the samples/drivers/led_pwm
on the nucleo_l073rz and nucleo_f091rc board.
The green led is used on pa5 for pwm channels of timers2 channel
The leds node has to be disabled to let the pin for the pwm nodes.
The spi1 is disabled in that sample to avoid conflict on pa5 pin.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-02-20 09:47:18 +01:00
Emil Gydesen
e71460cdb8 Bluetooth: Audio: Only allow receiver to send start command
Only the receiver of the audio is allowed to send the
receiver start ready command.

Furthermore, this removes the automated transition to the
streaming state on the server, as the server now shall
call bt_audio_stream_start to put the stream into the
streaming state.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-02-20 09:45:18 +01:00
Juha Ylinen
fdffdedc41 net: lwm2m: Add event LWM2M_RD_CLIENT_EVENT_REG_UPDATE
New event LWM2M_RD_CLIENT_EVENT_REG_UPDATE to indicate
application that engine starts registration update.

Signed-off-by: Juha Ylinen <juha.ylinen@nordicsemi.no>
2023-02-19 20:44:02 -05:00
David Reiss
f61929455d pytest: Fix typo in comment in pytest suite
The option is "cmdopt"

Signed-off-by: David Reiss <dreiss@meta.com>
2023-02-19 20:41:34 -05:00
Sylvio Alves
f1b662ae17 samples: ipm_esp32: remove binary blob
Remove array structure from source code to follow
Zephyr's policy regarding its usage.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-02-16 21:30:35 +09:00
Sylvio Alves
f433e95262 samples: ipm_esp32: use net core source from build ouput
Current ipm_esp32 sample code requires esp32_net_firmware.c file
as source input, which is generated after ipm_esp32_net build.
esp32_net_firmware.c was manually added as binary blob, which needs to
be removed from the repository.

This change modifies ipm_esp32 CMakeLists.txt to include the build
output of ipm_esp32_net as input source of ipm_esp32 build, allowing the
binary blob to be removed.

Current approach shall be updated during next release.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-02-16 21:30:35 +09:00
Kevin Townsend
0798375b92 samples: tfm: Disable initial attestation test
Disables the initial attestation suite, which we are unable to run
at present due to a license issue with the underlying QCBOR library
which this service depends on in TF-M.

This commit can be reverted once an acceptable solution has been found
for the QCBOR license in TF-M.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2023-02-11 07:59:06 +09:00
Kevin Townsend
cd8d4ccad5 modules: tfm: Disable initial attestation service
Prevents Zephyr from enabling the initial attestation service in TF-M,
due to a dependency it has on an incompatibly-licensed library (QCBOR).

This update checks if either of the following config flags are
enabled at build time:

- `CONFIG_TFM_PARTITION_INITIAL_ATTESTATION`
- `CONFIG_TFM_PSA_TEST_INITIAL_ATTESTATION`

If either of these are set to true, a fatal error will be thrown at
build time, indicating the reason for the failure.

This change can be reverted once a longer term solution to the QCBOR
license issues has been resolved.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2023-02-11 07:59:06 +09:00
Vinayak Kariappa Chettimada
d278d70497 Bluetooth: Controller: hci_rpmsg: Lock IRQs and spinlock on assertions
Fix Controller assertion handler to lock IRQs and spinlock
on assertions.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-02-10 15:09:02 +01:00
Jonathan Rico
5222691b7f Samples: Bluetooth: ignore -EALREADY when opening ipc instance
This instance might be shared by other users that may have opened it
earlier in the boot chain.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2023-02-09 15:05:19 +01:00
Carlo Caione
654fae9e63 sample: s2ram: Remove s2ram sample
The sample is not fully working (yet) and it will be soon replaced.
Remove it to not confuse people.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-02-09 22:08:28 +09:00
Chris Friedt
3ea28b2fa5 samples: modules: thrift: add samples for thrift module
Here we add a client and server samples for the basic
"hello" service.

These samples are designed to be run by either Zephyr or
the host machine, interchangeably.

Additionally, there is a python version of the client
to demonstrate Thrift's cross-language capabilities.

This code was merged from the following repository
at the commit specified below, with minor formatting
and coding-style modifications.

https://github.com/zephyrproject-rtos/gsoc-2022-thrift
e12e014d295918cc5ba0b4c507d1bf595a2f539a

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2023-02-09 20:30:21 +09:00
Manuel Arguelles
850b8fcbc2 samples: subsys: task_wdt: skip for s32z270dc2
s32z270dc2_r52 boards don't support system reset currently.
Fixes #54580

Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
2023-02-09 11:14:24 +01:00
Lars Knudsen
333d48b56d Bluetooth: has: Fix uninitialized bt_has_register_param
Zero initialize has_param in BSIM test.
Also, specify all bt_has_register_param members in hap_ha sample.

Signed-off-by: Lars Knudsen <larsgk@gmail.com>
2023-02-08 08:14:23 -08:00
Manuel Arguelles
b7a766e370 boards: s32z270dc2_r52: document supported features
Document supported features and do minor refactoring.

Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
2023-02-08 08:07:56 -08:00
Chris Friedt
db08c515c8 samples: net: socketpair: rename to main.c for consistence
The source file for most single-file sample apps is usually
`main.c`. Rename this file to be consistent with other
samples.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2023-02-08 19:04:25 +09:00
Chris Friedt
189d8b8a5e samples: net: socketpair: clean up sample app
* use `read()` instead of `recv()`
* use `write()` instead of `send()`
* use `CONFIG_POSIX_API` and drop `<zephyr/posix/..>` prefix
* use `perror()`
* fix `Makefile.posix` to use `CC` instead of `CXX`
* fix race condition which caused an unhandled EOF
  and infinite loop, by adding a readback / echo
* Updated the docs to reflect the expected stdout
* Improve doc clarity

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2023-02-08 19:04:25 +09:00
Daniel DeGrasse
bcee4ed34e samples: drivers: adc: add support for side b channel to RT685 EVK
Add support for CH0B to RT685 EVK, to demonstrate LPADC side B channel
support.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-02-08 01:08:08 +09:00
Daniel DeGrasse
966b88eaa9 samples: drivers: adc: add support for side B channel on LPCXpresso55s69
Add support for CH0B on LPC55s69 EVK, to demonstrate side B support in
LPADC driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-02-08 01:08:08 +09:00
Emil Obalski
5fe8707ed5 samples: ipc: Fix incorrect license
Replace Nordic-5-Clause with Apache-2.0.

Signed-off-by: Emil Obalski <Emil.Obalski@nordicsemi.no>
2023-02-06 22:36:05 +09:00
Théo Battrel
d598e26de4 Bluetooth: Remove point 6 of Samples Guidelines
Point 6 of Samples Guidelines stated that samples should be references and
not tutorials. The problem is that there is currently no tutorials in
Zephyr.

The proposal here, is to use samples has tutorials. The references could be
left to the tests.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2023-02-06 10:43:31 +01:00
Henrik Brix Andersen
921e69af40 samples: canbus: isotp: add option for running in loopback mode
Add Kconfig option for running the CAN ISO-TP sample in loopback mode. This
removes the need for a fixture when running the sample via twister.

Exclude the loopback tests for kvaser,pcican. See
836f582664 for more information.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-02-06 10:03:31 +01:00
Sam Hurst
ce65f86d0a samples: usb-c: sink: Enable Dead Battery functionality on Port1
Enable Dead Battery functionality on PD Port1

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2023-02-06 10:03:13 +01:00
Sam Hurst
de0a64fa0d samples: subsys: usb_c: sink: Change PD port to Port1
The stm32g081b_eval board does not implement Dead Battery
functionality on PD Port2. Change the sample configuration
so that PD Port1 is used, which has Dead Battery support.

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2023-02-06 10:03:13 +01:00
Erwan Gouriou
b577ffbbf7 samples: tfm_ipc: Add b_u585i_iot02a_ns target
Add b_u585i_iot02a_ns target in tfm_ipc CI

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2023-02-01 17:16:13 +09:00
Stancu Florin
e55fd536c8 boards: cc13x2/cc26x2*: enable WDT + update docs & sample
Enables the watchdog timer within the DTS of supported boards,
add sample overlays showing how to use NMI WDT interrupts and
updated the board features inside the boards' doc / yaml files.

Signed-off-by: Stancu Florin <niflostancu@gmail.com>
2023-01-31 16:08:00 -05:00
David Reiss
362874bc09 samples: Fix typo: "CMSI" -> "CMSIS"
Reference: https://arm-software.github.io/CMSIS_5/RTOS/html/index.html

Signed-off-by: David Reiss <dreiss@meta.com>
2023-02-01 03:54:09 +09:00
Siyuan Cheng
86769f03df sample: driver: spi_flash: Add em_starterkit support
Add em_starterkit support in spi_flash driver sample
output log:
JEDEC QSPI-NOR SPI flash testing
==========================

Test 1: Flash erase
Flash erase succeeded!

Test 2: Flash write
Attempting to write 4 bytes
Data read matches data written. Good!

Signed-off-by: Siyuan Cheng <siyuanc@synopsys.com>
2023-01-30 10:06:24 +00:00
Kevin Townsend
d3d80e8b33 samples: tfm_ipc: Remove mps3_an547_ns support
The AN547 no longer functions with this TF-M sample, and has been
broken since TF-M 1.6.0 without CI catching the issue, since this sample
wasn't modified to cause a CI run on the affected target.

Removing this board from the sample until the board support can be
reworked.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: David Brown <david.brown@linaro.org>
2023-01-27 14:25:30 -05:00
Joakim Andersson
8cfa0f40cb samples: tfm_secure_partition: Update sample for TF-M 1.7.0
Update TF-M secure partition sample for TF-M 1.7.0.
Removes the support for Library model in the sample.
Updates to using PSA framework 1.1.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: David Brown <david.brown@linaro.org>
2023-01-27 14:25:30 -05:00
Kevin Townsend
dd12dfb5ad samples: tfm_integration: Update tfm_ipc for 1.7.0
Update the sample to be compatible with API changes introduced in
TF-M 1.7.0, adding a new direct call to the PSA Crypto API to generate
random data, and cleaning up existing functions for compatibility
sake.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: David Brown <david.brown@linaro.org>
2023-01-27 14:25:30 -05:00
Kevin Townsend
c63fb21760 samples: tfm_integration: Remove psa_crypto
Removes the `psa_crypto` sample from the current release, due to
PSA API conflicts that can not be immediately resolved between Zephyr's
instance of MbedTLS in the NS environment, and the TF-M PSA APIs
included when building with TF-M support.

PSA API changes upstream in MbedTLS 3.2.1 (used by TF-M 1.7.0), and
MbedTLS 3.1 (used in TF-M 1.6.0) need to be be resolved in both
upstream projects before this sample can be reintroduced.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: David Brown <david.brown@linaro.org>
2023-01-27 14:25:30 -05:00
Kevin Townsend
a50aafd938 samples: tfm_integration: Remove psa_firmware
Removes the `psa_firmware` sample, which is based on an older version
(0.7) of the FWU service from TF-M 1.6.0. This sample needs to be
refactored to use FWU 1.0, included in TF-M 1.7.0 and future releases.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: David Brown <david.brown@linaro.org>
2023-01-27 14:25:30 -05:00
Joakim Andersson
2ba39d8bf1 samples: Add SFN model configurations
Add SFN model configurations to samples.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: David Brown <david.brown@linaro.org>
2023-01-27 14:25:30 -05:00
Joakim Andersson
2572a53a45 tfm: Remove library model support
In TF-M 1.7.0 release the Library model has been removed.
Remove the library model support from zephyr before updating TF-M
version.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: David Brown <david.brown@linaro.org>
2023-01-27 14:25:30 -05:00
Siddharth Chandrasekaran
08740ca7ef samples: mgmt/osdp: Select ENTROPY_GENERATOR from prj.conf
ENTROPY_GENERATOR is needed for OSDP Secure Channel capability. Now
that Secure Channel patches are merged, enabling it by default.

Signed-off-by: Siddharth Chandrasekaran <sidcha.dev@gmail.com>
2023-01-27 08:30:06 -06:00
Carl Stehle
714f80d225 Bluetooth: Controller: Integrate ISOAL for ISO Broadcast
- Include ISO stream count in ISO streams definitions in
  controller.
- Create ISOAL source on controller when ISO data path is
  setup.
- Send broadcast data buffers transferred from host over
  HCI to ISOAL as ISO SDU fragments.
- Allow bot conn and ISO data to use data_buf_overflow.
- Store ISO interval during BIG create.
- Remove ISO data path for each BIS during BIG terminate
  procedure.
- Set value (temporarily) for ISOAL target_event enabling
  it to Tx data.
- Check status of data fragment sent to ISOAL for memory
  allocation and other errors.
- Destroy ISOAL source when ISO stream released.
- Use ISO Advertising handle, not stream handle to destroy
  ISO data path.
- Remove extra ISOAL sink destroy call when removing ISO
  data path.
- Add FIXME comment as reminder to address LL_ASSERT on
  isoal_status error.

Signed-off-by: Carl Stehle <droid@appception.com>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-01-27 23:04:45 +09:00
Vinayak Kariappa Chettimada
7372870dd0 samples: Bluetooth: hci_rpmsg: Add DF, Broadcast and Connected ISO conf
Add direction finding, Broadcast ISO and Connected ISO conf
files for build coverage and user convenience to build
respective binaries for nRF53 Series network core.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-01-27 23:04:45 +09:00
Dominik Ermel
8febac3627 samples/drivers/soc_flash_nrf: Add missing README.rst
Missing documentation added.

Fixes #53753

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-01-27 19:22:40 +09:00
Brett Witherspoon
5ec1b4d1b2 samples: drivers: uart: Read until FIFO empty in echo_bot
The RX ready condition is unspecified with regard to being level or edge
triggered, so all available data should then be read once the RX ready
condition is detected. This change brings the sample into agreement with
the documentation and tests.

Signed-off-by: Brett Witherspoon <brett@witherspoon.engineering>
2023-01-27 19:21:37 +09:00
Stancu Florin
ae22c697b3 boards: cc1352r1_launchxl: fix echo samples
Recent Zephyr changes (IEEE 802.15.4 config moved from KConfig
to DeviceTree) left the TI CC1352r1_launchxl board's net examples in
a non-working state, mainly due to the fact that CC13x2 has two
IEEE802154 interfaces available (2.4GHz and sub-GHz) and none were
enabled.

This commit enables the 2.4GHz radio inside the board's DTS and also
introduces a new devicetree overlay inside the echo* samples:
'boards/boards/cc1352-enable-subg.overlay', enabling the sub-GHz
interface.

Signed-off-by: Stancu Florin <niflostancu@gmail.com>
2023-01-27 17:44:38 +09:00
Keith Packard
bf384bf41a samples/modules/chre: Support picolibc %p for NULL pointers
glibc and newlib print "(nil)" for NULL pointers while picolibc just prints
"0". Allow either by replacing the exact "(nil)" match with ".*" instead

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-01-26 09:12:35 -08:00
Henrik Brix Andersen
b727446949 samples: canbus: isotp: add missing call to can_start()
Add missing call to can_start().

Fixes: #54078

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-01-26 09:10:45 -08:00
Seppo Takalo
03fd995fd5 samples: net: lwm2m_client: Use Ethernet in QEMU Cortex-M3
By default, qemu_coxtex_m3 target selected SLIP driver as
a network backend. This requires some unstandard tool (tunslip6),
which are error prone and might not necessary work.
Ethernet backend work equally well as in native_posix so
use the same for both.

Change the default emulation platform from X86 to Cortex-M3
because it supports Ethernet by default.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-01-27 00:58:45 +09:00
Johann Fischer
cad8ae7597 samples: hci_usb: enable new experimental USB device support
Enable Bluetooth HCI USB tranport layer from new experimental
USB device support.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-01-27 00:57:22 +09:00
Jamie McCrae
4516e7161c mgmt: mcumgr: transport: smp_bt: Fix wrongly enabling Bluetooth
Bluetooth does not need to be enabled to register services,
therefore the newly introduced automatic bluetooth SMP transport
registration system can be simplified by returning enabling of
bluetooth back to the application.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-01-26 12:36:16 +00:00
Jamie McCrae
ec7044437e treewide: Disable automatic argparse argument shortening
Disables allowing the python argparse library from automatically
shortening command line arguments, this prevents issues whereby
a new command is added and code that wrongly uses the shortened
command of an existing argument which is the same as the new
command being added will silently change script behaviour.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-01-26 20:12:36 +09:00
Seppo Takalo
140e466472 samples: net: lwm2m_client: Allow configuration in Kconfig
Allow endpoint name, PSK and TLS tag and server address
to be configured in Kconfig.

When endpoint name is not defined, use CONFIG_BOARD.
Also use endpoint name as a PSK ID instead of hard coded
"Client_identity" which would collide if more than one instance
is ran against same server. Now we could define different identity
for each endpoint.

Also, as a mininal refactor, allow DNS names to be used in
server address, instead of assuming IP address.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-01-26 10:06:16 +00:00
Keith Packard
124f10fd9c samples: subsys: zbus: Avoid stack overflow with TLS
Enabling TLS increases stack usage by a small amount as that is where any
TLS variables are stored. When enabled, this sample ends up overflowing the
512-byte subscriber task stack and the IDLE_STACK_SIZE consumer stacks

Replace the fixed 512-byte subscriber stack allocation with
CONFIG_MAIN_STACK_SIZE so that it adopts a value controlled by the
configuration in case it needs to be adjusted further.

Increased CONFIG_IDLE_STACK_SIZE to 1024 to provide more space in each
consumer stack.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-01-26 10:04:33 +00:00
Keith Packard
0ee0e6562a sample/zbus: qemu_nios2 needs faster tick for zbus test with picolibc
Picolibc is enough faster than the minimal C library that the zbus
benchmark will likely complete in well under 10ms on qemu_nios2. As this
target cannot provide a clock at higher resolution than the system tick, we
need to increase that rate to get a non-zero runtime for this benchmark.

Add new nios2-specific config variables that change the
CONFIG_SYS_CLOCK_TICKS_PER_SEC value, leaving all other platforms using the
standard value. We cannot just increase it for every platform as
qemu_arc_hs6x fails with a 1kHz rate.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-01-26 10:04:33 +00:00
Brian Juel Folkmann
d0a7ab529d samples: spi_flash: Add option to test multiple sectors
Add tests for erase of multiple consequtive sectors.

Signed-off-by: Brian Juel Folkmann <bju@trackunit.com>
2023-01-26 09:39:59 +00:00
Henrik Brix Andersen
55d0ffa874 drivers: can: remove CAN_HAS_CANFD Kconfig helper
Remove the CAN_HAS_CANFD Kconfig helper symbol in order to allow enabling
CAN-FD support in the API regardless of driver support.

Change default to CAN-FD support being disabled and have samples and tests
that require CAN-FD support turn it on. This aligns the default
configuration across CAN controller drivers regardless of their
capabilities.

The rationale behind this is that we are starting to see MCUs with multiple
CAN controllers, some CAN-FD compatible, some not (e.g. NXP i.MX RT1060 and
FPGAs). Automatically enabling CAN-FD support based on the presence of a
CAN-FD capable CAN controller leads to different application default
settings based on the CAN controller(s) in use.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-01-25 15:00:39 +00:00
Guillaume Gautier
4635af398b dts: arm: st: Remove obsolete properties for all STM32 ADC from dts
In all STM32 dts, remove all reference to the following properties:
- has-temp-channel
- has-vref-channel
- has-vbat-channel

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-01-25 15:00:21 +00:00
Guillaume Gautier
009fcb9305 dts: arm: st: Add ADC temperature and Vref channels for all STM32
Now that we have a binding to define the channel number for temperature
and Vref measurement, update all dtsi to include the information.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-01-25 15:00:21 +00:00
Evgeniy Paltsev
d705f740ee samples/subsys/zbus/benchmark: fix counter synchronization issue
Current implementation has obvious synchronization issue with
global counter variable which is updated (RMW) in multiple threads
without any locking.

Replace regular variable by atomic type. As the maximum possible
value is much less than INT32_MAX it's OK to replace the original
uint64_t by (32-bit) atomic_t.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2023-01-25 11:24:07 +00:00
Marcin Jabrzyk
5787c69b9c samples: watchdog: RP2040 doesn't require custom max timeout
RP2040 accepts window max time in milliseconds then
the default Zephyr sample value is fine.

Signed-off-by: Marcin Jabrzyk <marcin.jabrzyk@gmail.com>
2023-01-24 19:01:34 -08:00
Fabio Baltieri
b787cc088d samples: bt: hids: add a non authenticated mode to the sample
The HIDs sample is currently setup with a passkey callback and requires
authenticated write and read access.

Add a sample option to disable the passkey callbacks, and automatically
set the GATT attributes as encryption required. This is a useful sample
setup as real world HID devices (mice, keyboards...) usually don't have
a passkey mechanism, and removing the callback to reproduce that setup
while not changing the GATT permission leads to automatic disconnections
for encryption failures that can be fairly hard to troubleshoot.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-24 19:33:03 +01:00
Fabio Baltieri
ca2bcf8d15 samples: bt: set a sample names and descriptions
Set a sample name and description for a bunch of tests where those are
left as "TBD" right now.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-24 19:33:03 +01:00
Jeppe Odgaard
74b94b4dff boards: add rt1050 qdec pinmux and overlay
Add a qdec pinctrl definition for rt1050.
Add an overlay in the qdec sample to support rt1050.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-01-24 10:21:39 -06:00
Jeppe Odgaard
35d60dbd0e samples: sensor: add qdec emulation support
Add emulation option to the qdec sample.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-01-24 10:21:39 -06:00
Henrik Brix Andersen
4585a4415c Revert "samples: net: lwm2m_client: Use Ethernet in QEMU Cortex-M3"
This reverts commit 8e3fc793d3.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-01-24 15:02:57 +00:00
Seppo Takalo
8e3fc793d3 samples: net: lwm2m_client: Use Ethernet in QEMU Cortex-M3
By default, qemu_coxtex_m3 target selected SLIP driver as
a network backend. This requires some unstandard tool (tunslip6),
which are error prone and might not necessary work.
Ethernet backend work equally well as in native_posix so
use the same for both.

Change the default emulation platform from X86 to Cortex-M3
because it supports Ethernet by default.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-01-24 14:35:14 +00:00
Manuel Arguelles
df1d148abc samples: boards: nxp_s32: add sample for NETC
The sample application shows how to configure NXP S32 Network Controller
(NETC) for different use-cases.

Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
2023-01-24 14:37:20 +01:00
Kumar Gala
8f04408725 tests: Add newlib filter for some testcases that dont have it
Not all toolchains support newlib so tests that require newlib need
to have a filter to we don't try and build those tests on those
testcases.  Some newer tests are missing:

	filter: TOOLCHAIN_HAS_NEWLIB == 1

so add that to testcases that needed.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-01-24 11:10:27 +00:00
Emil Gydesen
1af16d896c samples: Bluetooth: Broadcast audio source add packing field
Set the packing field when creating the broadcast source. This
is currently missing, and in uninitialized.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-01-24 09:44:09 +01:00
Quang Bui Trong
ad19019b29 samples: watchdog: board s32z270dc2_r52 only build and not running
Currently, the s32z270dc2_r52 board only supports running on RAM,
 so samples or tests watchdogs that perform SoC reset will not produce
 results. Set the build only for these samples and tests until the
 reset SoC function is supported.

Signed-off-by: Quang Bui Trong <quang.buitrong@nxp.com>
2023-01-23 11:46:43 -08:00
Francois Ramu
e9f77f1ecf samples: drivers: use stm32 dma driver binding macro to configure channel
Use the macro as defined by the
include/zephyr/dt-bindings/dma/stm32_dma.h to configure the
dma channel.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-01-23 09:15:21 -06:00
Gerson Fernando Budke
647c48c574 mgmt: updatehub: Add userspace syscalls
The current updatehub version forces user application to run in kernel
mode. This add necessary api syscalls to isolate userspace from kernel.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2023-01-23 10:24:07 +00:00
Gerson Fernando Budke
000257dad0 mgmt: updatehub: Move updatehub.h to header directory
This moves updatehub.h file from subsys to public header include
folder.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2023-01-23 10:24:07 +00:00
Martin Jäger
5dd50f9232 samples: subsys: lorawan: class_a: add clock sync option
Add an option to build the sample with application-layer clock sync
service running in the background.

This will also add a build-check for the clock sync service in CI.

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-01-23 10:05:49 +00:00
Martin Jäger
5b4920c81b samples: subsys: lorawan: class_a: add documentation
Add a README for the LoRaWAN sample.

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-01-23 10:05:49 +00:00
Andrzej Głąbek
8115fc2e9f samples: spi_bitbang: Use gpio_loopback pins for MOSI and MISO
Align pins that are required to be shorted for this sample on
nRF52840 DK with those used in e.g. uart driver tests.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-01-20 13:28:27 +01:00
Dominik Ermel
26d32bdd48 sampes/smp_svr: Bring back UART shell when using BT transport
Adding configuration options to bring old behaviour where
UART shell have been available when overlay-bt.conf has been
used for building sample.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-01-20 11:58:30 +01:00
Keith Packard
35e017a9ee subsys/cpp: Also run C++ tests with picolibc when possible
When the toolchain has picolibc support, run
samples/subsys/cpp/cpp_synchronization and tests/subsys/cpp/libcxx tests
using it.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-01-20 09:03:25 +01:00
Henrik Brix Andersen
03ac89d75b samples: canbus: isotp: add missing isotp tag
Add missing "isotp" tag to the CAN bus ISO-TP sample.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-01-19 16:49:10 -08:00
TOKITA Hiroshi
b70d399a34 samples: sensor: Add CPU temperature monitor sample
Add a polling sample for CPU temperature monitor.
This sample demonstrates how to data fetch and print to the console.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-01-19 15:32:41 -06:00
Ederson de Souza
7965fd2b4a samples/boards/intel_adsp: Make sample work with twister
sample.yaml was missing a tests section, making it unable to run with
twister. This patch adds the section.

While at that, fix an issue in the sample README.rst.

Fixes #53656.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2023-01-19 09:17:06 -08:00
Robert Lubos
340e7c9f79 samples: net: big_http_download: Fix POSIX compability
The sample documentation mentions that the sample can be built directly
on Linux, which was no longer the case. This commit fixes it.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-01-19 11:17:38 +01:00
Robert Lubos
2a02f4f9a9 samples: net: big_http_download: Update URL for TLS download
The old link has expired, the file is no longer avaiable to download.

Update the download link, which now leads to a file in Ubuntu
repositories for the recent LTS release, hopefully making the link valid
for longer period.

As the server ceritficate is signed by a different root CA, update the
root CA as well.

Finally, cleanup how the URL is handled in the sample - for TLS variant
it'll always be provided with a Kconfig, hence no need to repeat it in
the sample.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-01-19 11:17:38 +01:00
Robert Lubos
1c911904d5 samples: net: big_http_download: Add minimal support for redirect
It's often the case with TLS file servers, that the download link does
not lead to downloaded file, but rather redirects to another server.
Therefore it makes sense to have a minimal support in the sample for
HTTP redirection, so that the file can still be downloaded.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-01-19 11:17:38 +01:00
Martin Jäger
aef8419e9e samples: basic: custom devicetree binding demo
This sample shows how to define a custom devicetree binding to use
GPIO pins for a specific purpose.

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-01-19 10:16:34 +01:00
Jarno Lämsä
6dfe7e2458 samples: net: lwm2m_client: Replace deprecated calls
Replace calls to deprecated functions with new ones.

Signed-off-by: Jarno Lämsä <jarno.lamsa@nordicsemi.no>
2023-01-19 10:16:22 +01:00
Mariusz Skamra
18ab7ebf22 samples: unicast_audio_client: Fix enabling the streams
This fixes the application that was not waiting for QoS configuration of
all streams in the group. The QoS operation is done on group of streams,
while the status of each one of the streams is received separately.
Meaning that the application has to control which streams were already
configured before enabling them.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-01-18 09:56:52 +01:00
Mariusz Skamra
36058480e7 Bluetooth: audio: Improve stream coupling for CIS as the unicast client
Allow  the streams to be paired when creating unicast group. This will
allow to reuse the same ISO for the paired streams.

Fixes: #51796
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-01-18 09:56:52 +01:00
Daniel DeGrasse
47271ce8be treewide: update usage of zephyr_code_relocate
Update usage of zephyr_code_relocate to follow new API. The old method
of relocating a file was the following directive:

zephyr_code_relocate(file location)

The new API for zephyr_code_relocate uses the following directive:

zephyr_code_relocate(FILES file LOCATION location)

update in tree usage to follow this model. Also, update the NXP HAL SHA,
as NXP's HAL uses this macro as well.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-01-17 18:08:37 +01:00
Emil Gydesen
4db60883db samples: Bluetooth: Unicast audio server: Add missing supported contexts
Add missing calls to setting supported contexts.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-01-17 13:17:03 +01:00
Théo Battrel
4314480826 Bluetooth: Update Readme of large MTU sample
Update the Readme file of the large mtu sample because the orginal PR
(https://github.com/zephyrproject-rtos/zephyr/pull/53593) has been merged
before the last comment could be addressed.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2023-01-16 16:51:42 +01:00
Emil Gydesen
a1bb9c9d17 Samples: Bluetooth: hci_rpmsg add missing platform_allow
Add nrf5340_audio_dk_nrf5340_cpunet to the platform_allow
as having it only in integration_platforms causes issues
with the CI system.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-01-16 21:32:22 +09:00
Jamie McCrae
fa3c6fdc28 samples: mgmt: mcumgr: Select required symbols
Select required dependency symbolds for the various transports.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-01-16 10:04:45 +01:00
Théo Battrel
00a4a0720f Bluetooth: Update README of MTU update sample
Update the README to add more informations on MTUs. Also add a diagram of
the different MTU and Kconfig symbols in the Host.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2023-01-16 10:01:27 +01:00
Théo Battrel
7e23294bc5 Bluetooth: Add a sample to demonstrate MTU update
Add a new sample that demonstrate how to exchange MTU to allow larger
packet transmission.

The sample is split in two applications. One is the Central, it will
initiate the MTU exchange. The other one is the Peripheral and will try to
send a large notification. If the MTU exchange fail or the new size is not
big enough, the Peripheral will not be able to send the notification.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2023-01-16 10:01:27 +01:00
YuLong Yao
1dd0ffbe40 Revert "samples: jesd216: add support for gd32a503v_eval board"
This reverts commit 0f28a8d120.

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-01-16 09:42:28 +01:00
Andrzej Głąbek
507f4b31d1 samples: drivers: w1: Enable arduino_i2c and arduino_serial explicitly
This sample uses the arduino_i2c and arduino_serial DT nodes, so it
should enable them explicitly, not assume they will be enabled by
default for a given board.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-01-16 09:26:10 +01:00
Andrzej Głąbek
569136a04b samples: net: openthread: coprocessor: Enable uart1 explicitly
This application uses the uart1 DT node, so it should enable it,
not assume that it will be enabled by default for a given board.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-01-16 09:26:10 +01:00
Stephanos Ioannidis
cf211aa7af treewide: Update deprecated CONFIG_LIB_CPLUSPLUS usages
This commit updates all deprecated `CONFIG_LIB_CPLUSPLUS` usages to:

* check if the Zephyr minimal C++ library is enabled using
  `CONFIG_MINIMAL_LIBCPP` instead of relying on the
  `CONFIG_LIB_CPLUSPLUS`-based inference.

* select `CONFIG_REQUIRES_FULL_LIBCPP` when there exists a component-
  level C++ standard library dependency. This allows a component to
  declare C++ standard library dependency without designating a
  specific libray implementation.

* select the correct type of C++ standard library implementation to use
  through one of the `CONFIG_LIBCPP_IMPLEMENTATION` choices.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2023-01-13 17:42:55 -05:00
Stephanos Ioannidis
4a64bfe351 treewide: Use CONFIG_CPP instead of CONFIG_CPLUSPLUS
This commit updates all in-tree code to use `CONFIG_CPP` instead of
`CONFIG_CPLUSPLUS`, which is now deprecated.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2023-01-13 17:42:55 -05:00
Stephanos Ioannidis
8c94410022 samples: cpp: Relocate samples/subsys/cpp to samples/cpp
This commit moves the C++ samples under `samples/subsys/cpp` to
`samples/cpp` because the C++ language and standard library support is
not a "subsystem" (aka. API) in conventional sense and the samples
demonstrating them should belong directly under the top samples
directory as does POSIX support.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2023-01-13 17:42:55 -05:00
Kristoffer Rist Skøien
f0c12dbb82 boards: Added nRF5340 Audio DK (PCA10121)
Copied from nRF Connect SDK and edited
Co-authored-by: Grzegorz Ferenc

Signed-off-by: Kristoffer Rist Skøien <kristoffer.skoien@nordicsemi.no>
2023-01-13 16:14:35 +01:00
Henrik Brix Andersen
c0fb33ab8d samples: modules: canopennode: convert to sysbuild
Convert the CANopenNode sample to use sysbuild for generating MCUboot +
CANopenNode sample binaries instead of using manual instructions.

Rework the twister sample filtering to just list the known good boards.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-01-13 14:05:40 +01:00
Pascal Brogle
b6bc324a1d net: lwm2m: rename path size define
Rename max path constant to prevent string length vs data size confusion

Signed-off-by: Pascal Brogle <pascal.brogle@husqvarnagroup.com>
2023-01-13 12:02:07 +00:00
YuLong Yao
6a8a27ee78 samples: adc: add support for gd32a503v_eval board.
add support for gd32a503v_eval board.

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-01-12 21:45:38 +01:00
YuLong Yao
0f28a8d120 samples: jesd216: add support for gd32a503v_eval board
add support for gd32a503v_eval board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-01-12 21:45:38 +01:00
YuLong Yao
272aa129fa samples: spi_flash: add support for gd32a503v_eval board
add support for gd32a503v_eval board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-01-12 21:45:38 +01:00
YuLong Yao
ba1af141c1 samples: drivers: dac: add support for gd32a50x
add support for gd32a50x

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-01-12 21:45:38 +01:00
Gerson Fernando Budke
eb39f1f12e mgmt: updatehub: Clean-up mcuboot & system dependencies
Currently MCUboot and system reset are invoked directly in the sample
applicatiion. This introduce 2 new methods to isolate system from
application.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2023-01-12 12:11:31 +01:00
Siddharth Chandrasekaran
73809472f8 mgmt/osdp: Add support for event delivery and notifications
The CP app sends PD a "command" and the PD responds to it. Some times,
the PD has something that it wants to tell the PD which it does so in
response to POLL command. Both CP and PD apps need a way to exchange
these info over the OSDP bus. To archive this we will introduce what are
called "events" that allow the PD app to enqueue and CP app to get
notified.

This is analogous to the incumbent "commands" abstraction where, the CP
app enqueues a command and the PD app gets notified of it.

Signed-off-by: Siddharth Chandrasekaran <sidcha.dev@gmail.com>
2023-01-12 12:04:11 +01:00
Sam Hurst
6984162e92 samples: subsys: usb_c: sink: Add USBC_CSM_SINK_ONLY Config to prj.conf
Add CONFIG_USBC_CSM_SINK_ONLY=y to Sink's sample prj.conf.
This selects the Sink only Connection state machine
for the Sink sample and it explicitly show the user
of the Sink sample how the connection state machines are
selected.

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2023-01-11 18:32:43 +01:00
TOKITA Hiroshi
fed4e1857f boards: gd32f450i_eval: Enable DMA transfer for nor-flash
Enable DMA transfer via SPI bus for nor-flash.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-01-11 08:50:56 -08:00
Christopher Friedt
85b44f0ed7 samples: posix: gettimeofday: include time.h
Due to some previous time-related header issues, we included
`<sys/time.h>` without including `<time.h>`. The latter is
necessary for `time()` (specified by both ISO C and POSIX).

Fixes #53673

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-01-11 09:41:29 +01:00
Tom Burdick
36d8c1b7f7 samples: Remove platform filters for external_lib
Instead prefer to add the tag to ignored tags in the board yaml
where its clearer for both cavs25 and other cavs/ace boards what
to ignore even if duplicated.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-01-10 18:29:35 -05:00
Tom Burdick
c0435dbbb4 samples: Replace dmic tag with lower case
Replaces the capitalized DMIC tag with dmic as tags in Zephyr are by
convention lower case.

Was unexpectedly building this sample for intel boards while ignoring
dmic (lower case tag).

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-01-10 18:29:35 -05:00
Tom Burdick
6fed49b765 samples: Replace i2s tag with lower case
Replaces the capitalized I2S tag with i2s as tags in Zephyr are
by convention lower case.

Unexpectedly built the i2s echo sample when given the lower case tag in the
ignore.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-01-10 18:29:35 -05:00
Tom Burdick
89695ddaa3 samples: tag chre sample
Tags the chre sample so it may be ignored for platforms that don't want
to build or run this sample.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-01-10 18:29:35 -05:00
Alp Sayin
345b3bca02 samples: subsys: zbus: benchmark: remove all platform exclusions
The sample is now able to run on all previously excluded platforms.

Signed-off-by: Alp Sayin <alp.sayin@amd.com>
2023-01-10 14:42:40 +01:00
Alp Sayin
f5c39f998c samples: subsys: zbus: benchmark: use native posix host rtc for ARCH_POSIX
Because posix emulated execution is significantly faster than posix
emulated timer and benchmark finishes before even the first tick occurs.

Signed-off-by: Alp Sayin <alp.sayin@amd.com>
2023-01-10 14:42:40 +01:00
Alp Sayin
560c727127 samples: subsys: zbus: benchmark: use sys_clock_cycle instead of k_uptime
Needed because benchmark finishes faster than a tick, especially on
emulated platforms where tick rate is 100Hz. Output units are also updated
to print numbers with less digits.

Signed-off-by: Alp Sayin <alp.sayin@amd.com>
2023-01-10 14:42:40 +01:00
Alp Sayin
ec9c3df239 samples: subsys: zbus: benchmark: increase thread stack sizes
Stack sizes need to be dependent on something arch specific such as
idle stack size because they're smashing their stacks.

Signed-off-by: Alp Sayin <alp.sayin@amd.com>
2023-01-10 14:42:40 +01:00
Jamie McCrae
fc9442c033 samples: mgmt: mcumgr: Fix fs overlay
Fixes the filesystem overlay by enabling flash map, which is
needed for lfs.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-01-10 13:49:32 +01:00
Jamie McCrae
11c7371f99 samples: Explicitly disable boot USB device support init at boot
Disables having USB enabled for boards that configure USB CDC for
console, shell or logging at bootup in applications that enable USB
to prevent a conflict arising whereby USB is registered from
multiple points and later calls fail.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-01-10 12:21:10 +01:00
Johann Fischer
f09111a2a9 samples: cdc_acm: do not block for one second after DTR set
There is no need to block the thread for a second.
Let it sleep for 100 milliseconds, which should be enough
to set the host baud rate.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-01-10 10:30:46 +01:00
Pirun Lee
7015578ff4 sample: bluetooth: OTS sample add checksum
central_otc: read checksum after object data read.
peripheral_ots: add checksum calculate cb.

Signed-off-by: Pirun Lee <pirun.lee@nordicsemi.no>
2023-01-10 09:59:36 +01:00
Gerson Fernando Budke
204758b5d9 samples: fs: littlefs: Add stm32l562_dk and b_u585i_iot02a
Add configs and overlays to run boards stm32l562_dk and b_u585i_iot02a.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2023-01-10 09:23:59 +01:00
Michal morsisko
c3619edf42 samples: bluetooth: Add sample demonstrating accept fliter list
Add new sample that shows how to use BLE filter accept list
during advertising.

Signed-off-by: Michal morsisko <morsisko@gmail.com>
2023-01-09 12:41:18 +01:00
Henrik Brix Andersen
11aa8454f0 Revert "random: Change testing random generator"
This reverts commit d6881de3b3.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-01-09 19:29:50 +09:00
Declan Snyder
d6881de3b3 random: Change testing random generator
The old random timer test was not random-looking
enough on some platforms.

Replace with new test which is psuedo-xoshiro.

The generator is still deterministic
and does not depend on entropy at all,
but should look more random for testing.

Change name of generator tree-wide also.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-01-09 10:16:55 +01:00
Jakub Zimnol
e065050f1b boards: xtensa: m5stickc_plus: initial support
adds initial support for M5StickC-Plus board

Signed-off-by: Jakub Zimnol <j.zimnol@avsystem.com>
2023-01-09 10:16:27 +01:00
Daniel DeGrasse
64ff9aa4d2 samples: drivers: adc: add support for RT595
Add support for RT595 evk to adc driver sample. RT595 uses external
reference voltage, which is set to 1.8V on this board.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-01-08 19:48:54 +01:00
Emil Gydesen
57218eee31 Bluetooth: Host: Add BT_CONN_INTERVAL_TO_US
The macro BT_CONN_INTERVAL_TO_MS was used a fair amount
of places, but it often was used with integers. This meant
that sometimes the resulting (integer) value would be
incorrect, as something like 7.5ms interval would not
be properly stored as a integer in millisecond units.

Adding BT_CONN_INTERVAL_TO_US allows users to still use
integers to store the result, but in a more accurate unit.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-01-08 19:47:03 +01:00
Emil Gydesen
8d86fa0125 Bluetooth: Audio: Add support for encrypted broadcast
Add support for adding a broadcast code to the broadcast
source.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-01-06 10:35:25 +00:00
Sam Hurst
3e98f20d66 samples: subsys: usb_c: sink: Add missing policy notifications
Add missing policy notifications to case statement

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2023-01-05 10:34:06 +01:00
Mahesh Mahadevan
1a27e2bd8e samples: mimxrt595: Add Deep power down sample
Add a sample to put the part into Deep power down mode by
setting the state to PM_STATE_SOFT_OFF.
Wakup the part using an RTC alarm.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-01-04 11:03:42 -06:00
Fabio Baltieri
792469aae9 yamllint: indentation: fix files in samples/
Fix the YAML files indentation for files in samples/.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 14:23:53 +01:00
Daniel DeGrasse
0eb0e2b025 samples: drivers: memc: add sample to test memory controllers
Add sample to test memory controllers that map external RAM into
SOC address space. This sample uses the "sram-ext" alias
node to determine the base address and size of the external RAM
device.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-01-04 10:35:25 +01:00
Fabio Baltieri
620bd5d817 samples, tests: fix key-duplicates in sample.yaml files
Fix few duplicate keys warnings in sample.yaml and testcase.yaml files,
this is going to enable some tests that were otherwise being
unintentionally ignored.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 10:34:18 +01:00
Andrei Emeltchenko
3f62b3803f samples: canopennode: Fix typo
Fixes typo in a canopennode sample.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-01-04 10:34:06 +01:00
Fabio Baltieri
7db1d17ee3 yamllint: fix all yamllint line-length errors
Fix all line-length errors detected by yamllint:

yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
  grep '(line-length)'

Using a limit is set to 100 columns, not touching the commandlines in
GitHub workflows (at least for now).

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 01:16:45 +09:00
Fabio Baltieri
7dd902d035 yamllint: fix all yamllint comments-indentation errors
Fix all comments-indentation errors detected by yamllint:

yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
  grep '(comments-indentation)'

This checks that the comment is aligned with the content.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 01:16:45 +09:00
Fabio Baltieri
a2e5bd1928 yamllint: fix all yamllint comments errors
Fix all hyphens errors detected by yamllint:

yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
  grep '(comments)'

Default config would be to require two spaces after the start of the
comment, proposing to keep it on 1, inline with the Linux binding
config, that is:

```
-  comments:
-    min-spaces-from-content: 1
```

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 01:16:45 +09:00
Fabio Baltieri
e0cc2b8dd0 yamllint: fix all yamllint hyphens errors
Fix all hyphens errors detected by yamllint:

yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
  grep '(hyphens)'

Default config is only one space after the hyphen.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 01:16:45 +09:00
Fabio Baltieri
bd4cdde4b0 yamllint: fix all yamllint colons, commas and empty-lines errors
Fix all colons and commas errors detected by yamllint:

yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
  grep '(brackets)'

yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
  grep '(commas)'

yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
  grep '(empty-lines)'

Default config is no space before, one space after, max 2 empty lines.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 01:16:45 +09:00
Fabio Baltieri
f39f04f232 yamllint: fix all yamllint brackets errors
Fix all brackets errors detected by yamllint:

yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
  grep '(brackets)'

Default config is to have no spaces inside brackets, changed few
documentation strings as well that refered to lists even though the
linter does not care about those.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 01:16:45 +09:00
Fabio Baltieri
5c32300861 yamllint: fix all yamllint truthy errors
Fix all thruthy errors detected by yamllint:

yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
  grep '(truthy)'

This only accepts true/false for boolean properties. Seems like python
takes all sort of formats:

https://github.com/yaml/pyyaml/blob/master/lib/yaml/constructor.py#L224-L235

But the current specs only mention "true" or "false"

https://yaml.org/spec/1.2.2/#10212-boolean

Which is the standard yamllint config.

Excluding codeconv and workflow files, as some are using yes/no instead
in the respective documentation.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 01:16:45 +09:00
Jamie McCrae
445117bb72 samples: mgmt: mcumgr: smp_svr: Removed un-needed UDP file
UDP configuration has now moved to the transport, thus this file is
no longer needed or used.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-01-03 10:19:57 +00:00
Krishna T
59842531d1 net: zperf: Make shell dependency optional
Now that we a proper API, shell is just optional, so, make the
dependency optional by refactoring the code.

Also, add a build test combination in twister.

Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
2023-01-03 11:02:01 +01:00
Oliver Barta
c17b102c65 samples: basic: fade_led: add support for rpi_pico board
PWM device needs to be enabled and configured on rpi_pico board.

Signed-off-by: Oliver Barta <o.barta89@gmail.com>
2023-01-02 13:03:46 +01:00
Oliver Barta
5ad6a7989f boards: rpi_pico: avoid conflicting use of LED
led0 and pwm_led0 are both referring to the same LED. The usage is
mutualy exclusive, as only one pin muxing can be applied.

Disabling child nodes is currently neither supported by gpio-leds device
nor by pwm-leds device. We need to disable either of the devices
completely for correct operation.

Please note that even if disabling of child nodes would be supported, the
devices would be empty anyway, as both have only one singe LED defined at
the moment. Therefore we can completely disable one of the devices in any
case.

Fixes: b876ad9d6f ("boards: arm: rpi_pico: add pwm bindings to
  devictree")
Signed-off-by: Oliver Barta <o.barta89@gmail.com>
2023-01-02 13:03:46 +01:00
Oliver Barta
e24bfc53a6 samples: drivers: led_pwm: fix divider setting for rpi_pico
The fractional part of the divider value is a 4 bit value.

Fixes: 91f659d70a ("samples: led_pwm: add overlay for rpi_pico board")
Signed-off-by: Oliver Barta <o.barta89@gmail.com>
2023-01-02 13:03:46 +01:00
Oliver Barta
681d44b773 samples: drivers: led_pwm: enable immediate logging mode
The default deferred logging mode is not appropriate here. The LOG_INF
messages "Turned on", "Turned off", ... indicate the current state and
should be printed immediately to keep log output in sync with actual
LED state.

Signed-off-by: Oliver Barta <o.barta89@gmail.com>
2023-01-02 13:03:46 +01:00
Oliver Barta
c1852bebeb samples: basic: blinky_pwm: fix divider setting for rpi_pico
The fractional part of the divider value is a 4 bit value. Setting it to
255 leads to an overflow in pwm_rpi_get_clkdiv(). This has resulted in a
slight deviation from the reported timing, which is btw. printed in nsec.

Fixes: c5cb0d1a3b ("samples: blinky_pwm: Fix sample for rpi_pico")
Signed-off-by: Oliver Barta <o.barta89@gmail.com>
2023-01-02 13:03:46 +01:00
Trent Piepho
8c8d41c32f samples: drivers: uart: Detect missing FIFO mode in echo_bot
Print an error message if the UART doesn't support FIFO mode or FIFO
mode is not enabled.

Previously the sample would run with no errors, but wouldn't receive or
echo any data.

Signed-off-by: Trent Piepho <tpiepho@gmail.com>
2022-12-31 18:24:32 +01:00
Piotr Jasiński
48df1a2f2e samples: add debug monitor sample
Implemented a sample that shows configuration and basic usage of monitor
mode debugging feature.

Signed-off-by: Piotr Jasiński <piotr.jasinski@nordicsemi.no>
2022-12-28 12:00:46 +01:00
Jay Vasanth
4dc2d766c7 samples: mec15xxevb: pm: update test clk out config
CONFIG_SOC_MEC1501_TEST_CLK_OUT is removed from mec15xx SOC,
hence remove this configuration in mec15xxevb power management
sample and add board overlay with right configurations.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-12-28 10:43:03 +01:00
Jay Vasanth
0727421862 samples: drivers: clock_xec: Add MEC172x and MEC152x clock driver sample
MEC172x and MEC152x sample demonstrating clock control driver.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-12-28 10:43:03 +01:00
Bartosz Bilas
62eecf9142 samples: basic: button: use gpio_is_ready_dt
Switch to using the dedicated `gpio_is_ready_dt`
function instead of the raw `device_is_ready`.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2022-12-28 10:38:01 +01:00
Bartosz Bilas
135817c44d samples: basic: blinky: use gpio_is_ready_dt
Switch to using the dedicated `gpio_is_ready_dt`
function instead of the raw `device_is_ready`.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2022-12-28 10:38:01 +01:00
HaiLong Yang
d850bec2c8 samples: drivers: adc: add gd32l233r_eval board
adc sample support gd32l233r_eval board.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2022-12-28 10:37:52 +01:00
Francois Ramu
d75292feea samples: sensor: vbat of the stm32u5x channel 14 on ADC4
Enable the channel14 of the ADC4 of the stm32U5x
to measure the vbat voltage with internal on channel 14
of the ADC4 on the nucleo board or disco kit.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-12-27 15:33:06 +01:00
Gerard Marull-Paretas
9c27fabba3 samples: shields: npm6001_ek: remove dead assignment
The voltage gets assigned by regulator_get_voltage, code was likely a
copy&paste from set voltage command.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-12-27 13:12:55 +01:00
Gerard Marull-Paretas
ffdf85ed30 samples: shields: npm6001_ek: add support to query mode
Add a new command to query the regulator operating mode.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-12-27 13:12:55 +01:00
Marek Matej
4a64919c36 samples: driver: adc: Add ESP32 boards support files
Add example code to cover single-shot ADC for ESP32, S2, C3 chips.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2022-12-23 23:45:05 +00:00
Marek Matej
937ea00e7a drivers: adc: esp32: Add support for single-shot conversion
Allow single-shot adc conversion on all supported targets.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2022-12-23 23:45:05 +00:00
Dominik Ermel
db34adf9c3 mgmt/mcumgr: Standardise MCUmgr Kconfig names
Standardise Kconfig options for MCUmgr.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-12-22 12:36:34 +01:00
Hubert Miś
55fdd76a1e samples: ipc: icmsg_me: use nocopy functions
Update one of the threads in the icmsg_me sample to use ipc_service
nocopy functions in both host and remote applications.

Signed-off-by: Hubert Miś <hubert.mis@gmail.com>
2022-12-22 11:07:44 +01:00
Kamil Gawor
d0e21fe6a6 ipc: Enable ICMSG multiendpoint role by default
This commit enables the initiator or the follower
role for the ICMSG multi-endpoint backend
depending on dts by default.
It is needed when BT_RPMSG transport for HCI is used.

Signed-off-by: Kamil Gawor <Kamil.Gawor@nordicsemi.no>
2022-12-22 11:07:44 +01:00
Daniel DeGrasse
71e95ae29d samples: drivers: adc: fixup ADC sample support for LPADC
Fixup ADC sample support for boards with LPADC present. This ADC only
supports an external reference voltage, which is a board-specific value.
Add reference voltage values for all supported boards.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-12-22 11:04:42 +01:00
Jamie McCrae
17e7ca70a9 samples: boards: nrf: mesh: onoff: Remove MCUmgr files
This application does not actually seem to use MCUmgr
functionality, therefore remove it.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-12-22 11:03:04 +01:00
Jamie McCrae
b4b6346cdc mgmt: mcumgr: Make Bluetooth and UDP transport init automatic
This moves the UDP and Bluetooth initialisation for MCUmgr to be
performed automatically with the new hander registration feature.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-12-22 11:03:04 +01:00
Jamie McCrae
d7557102c0 mgmt: mcumgr: Add iterable section to register MCUmgr handlers
This replaces the requirement for applications to manually
register MCUmgr handlers by having an iterable section which
then automatically registers the handlers at boot time.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-12-22 11:03:04 +01:00
Emil Gydesen
4e3205d238 Bluetooth: Audio: Add packing to unicast group create
Add the ISO packing field when creating a unicast group.

This refactors the structure of the unicast group create,
as it now takes both the packing as a group parameter, as well
as an array of stream-specific parameters.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-12-22 10:59:16 +01:00
Erwan Gouriou
66d4c64966 all: Fix "#if IS_ENABLED(CONFIG_FOO)" occurrences
Clean up occurrences of "#if IS_ENABLED(CONFIG_FOO)" an replace
with classical "#if defined(CONFIG_FOO)".

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-12-21 10:09:23 +01:00
Mateusz Sierszulski
85a90d7448 samples: drivers: counter: support alarm sample in counter_gecko_stimer
This commit adds sample support for the counter_gecko_stimer
driver.

Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
2022-12-20 22:50:19 +01:00
Grixa Yrev
2a992c65c0 net: websocket: new receiving algorithm
websocket_recv_msg() is reworked with using fsm. Now the function
return 0 when payload is empty, -ENOTCONN if socket close. Receiving
empty ping and sending empty pong were added in tests.
Fixes #52327

Signed-off-by: Grixa Yrev <grixayrev@yandex.ru>
2022-12-20 17:05:12 +00:00
Lars Knudsen
081b83531b Bluetooth: has: Make HAS registration dynamic
This changes HAS registration to be dynamic and let's the
application set Hearing Aid Type and binaural features.

Often, devices are flashed with generic firmware with some
features stored post factory production, requiring
the settings to be moved from compile time to run-time.

This change will increase the RAM usage as the GATT
service is moved from ROM to RAM.

Signed-off-by: Lars Knudsen <larsgk@gmail.com>
Co-author: Soren Engquist <soren@engquist.dk>
2022-12-20 17:04:45 +00:00
Andriy Gelman
1bd34d89f9 samples: drivers: adc: Add xmc45_relax_kit overlay
Adds xmc45_relax_kit overlay to run the sample.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2022-12-20 14:17:23 +01:00
Steffen Jahnke
a4d67d3c85 sensor: amg88xx: fix sensor sample
Since logging with printk() was updated in commit  c5a40e3,
the amg88xx sample dropped around 60 of the messages after
sampling. Increasing log buffer size will fix this issue.

Signed-off-by: Steffen Jahnke <steffen.jahnke@eu.panasonic.com>
2022-12-19 18:18:48 +01:00
Johann Fischer
eb6207707a samples: usb: shell: extend new USB support sample by host support
Extend new USB support sample to include experimental host support.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-12-16 13:21:12 +01:00
Emil Gydesen
f4ff8f2230 samples: Bluetooth: ISO broadcast receiver pa_interval check move
Move the check for the pa_interval to before we start
parsing the data for the name, as that is more optimized.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-12-16 11:05:24 +00:00
Gerard Marull-Paretas
460f2d04fa samples: shields: npm6001_ek: add utility to test regulators
Add a utility sub-shell to test all regulators embedded in the nPM6001
PMIC.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-12-16 11:26:47 +01:00
Armin Brauns
c1cc2c4a26 modules: lvgl: change mentions of "LittleVGL" to "LVGL"
The project was renamed to LVGL with release 7.0.0, from 2020-05-18.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2022-12-16 09:31:41 +01:00
Marek Matej
ac0cbe3c4e samples: esp32: temp: CPU die temperature sample
Add die temperature measure sample for ESP32 targets
esp32s2_saola, esp32c3_devkitm.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2022-12-15 18:21:39 +01:00
Reto Schneider
c646a5576a net: zperf: Fix SO_RCVTIMEO dependency
Since 6c30c9ac47 (samples: net: zperf:
Rewrite upload part to use sockets), zperf uses SO_RCVTIMEO in UDP mode,
hence must depend on/enable support for it.

Without SO_RCVTIMEO support, zperf fails like this:
> nb_packets=47   delay=188964    adjust=-13
> setsockopt error (109)
> setsockopt error (109)
> -
> Upload completed!
> LAST PACKET NOT RECEIVED!!!
> Statistics:             server  (client)
> Duration:               0 us    (10.19 s)
> Num packets:            0       (50)
> Num packets out order:  0
> Num packets lost:       0
> Jitter:                 0 us
> Rate:                   0 Kbps  (9 Kbps)

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2022-12-15 17:14:26 +01:00
Robert Lubos
f33072a725 samples: net: sockets: net_mgmt: Update flash requirement for twister
The net_mgmt sample enables a lot of features, resulting in pretty large
image sizes for various platforms (~200k). At the same time, the
sample.yaml for the sample did not specify minimum flash requirement for
the sample, causing flash overflows during build in certain cases.
This commit fixes this by setting a reasonable flash requirement for the
sample.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-12-15 14:32:30 +00:00
Tomasz Moń
21975231e2 usb: device: cdc_acm: Prevent recursive logging loop
Allow enabling CDC ACM logging only if CDC ACM is not used as logging
backend. This prevents endless recursive logging loop, especially
visible when minimal footprint logging is enabled.

Fixes: #52981

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2022-12-15 14:54:24 +01:00
Dinesh Kumar K
4eb1a34cac samples: sensor: Added sample for grow_r502a fingerprint sensor
Added sample application for grow_r502a fingerprint sensor

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2022-12-14 18:44:29 +01:00
Emil Gydesen
5102950adc sample: Bluetooth: Add PA interval check in iso broadcast benchmark
Verify that the peridic advertising interval is non-0 to
ensure that the remote device is actually advertising
with peridic advertising enabled.

This fixes an issue where per_interval_ms would be set to 0,
causing bt_le_per_adv_sync_create to fail to invalid values.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-12-14 15:00:13 +01:00
Marcin Niestroj
2d3365200c settings: file: drop CONFIG_SETTINGS_FILE_DIR
There is already CONFIG_SETTINGS_FILE_PATH, which is set to full file path,
while CONFIG_SETTINGS_FILE_DIR is required to be set to its parent
directory. This is redundant, as parent directory path can be easily found
out either during runtime or optionally during buildtime by CMake.

CONFIG_SETTINGS_FILE_DIR was actually introduced recently after Zephyr 3.2
release as a replacement of deprecated CONFIG_SETTINGS_FS_DIR. This means,
that there is no need to deprecate it for 3.3 release and dropping it
should be fine. Adjust 3.3 release notes accordingly, so that
CONFIG_SETTINGS_FILE_PATH will be used directly.

This patch stops using deprecated CONFIG_SETTINGS_FS_DIR. There is actually
no value in respecting it, as setting anything other than parent directory
of CONFIG_SETTINGS_FS_FILE makes no sense.

There is actually one use of CONFIG_SETTINGS_FILE_DIR in file backend
tests, to derive directory for files containing tested settings.
CONFIG_SETTINGS_FILE_PATH is not used there, so it makes little sense to
derive directory name from it. Instead, just use hardcoded "/settings"
subdirectory, as this was the default value of CONFIG_SETTINGS_FILE_DIR.

Deriving parent directory can be done either in runtime or in
buildtime (e.g. using some helper CMake function). Doing it in runtime
however allows to create directory recursively (which this patch actually
implements), e.g. for some more nested FS tree structure. Additionally it
will simplify migration of settings configuration from Kconfig to
device-tree (yet to be developed feature).

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-12-14 14:11:03 +01:00
Marek Matej
85b879594d samples: board: esp32: DAC sample code
Sample code demonstrate the DAC on ESP32 and ESP32-S2

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2022-12-13 16:29:38 +00:00
Erwan Gouriou
13acbf1b68 samples: blinky_pwm: Add nucleo_l476rg support
Enable use of nucleo_l476rg on this sample using a dedicated overlay.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-12-13 10:01:11 +00:00
Francois Ramu
444ddfe268 samples: Use immediate logging mode in nvs sample
Applying same fix as for watchdog relmated samples
in https://github.com/zephyrproject-rtos/zephyr/pull/52949/
Switching to the immediate logging mode, not by just disabling the
LOG_PRINTK option.Do not direct printk to logging subsystem in the sample.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-12-13 17:20:38 +09:00
Johann Fischer
a01fbd0731 sample: usb: shell: add keybord harness string
Add keybord harness string to sample.yaml file.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-12-12 15:00:20 +01:00
TOKITA Hiroshi
e965db984d samples: counter: alarm: add support for GD32 boards
Add support for boards that implements the GD32 SoCs.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2022-12-12 10:08:12 +01:00
Andrzej Głąbek
7d5c9fa7a9 samples: Use immediate logging mode in watchdog related samples
Starting with commit b9b43a0eb772a464bba13833d11e3a31fbf4e09e, printk()
messages are handled by the logging subsystem. This can cause trouble
in watchdog related samples if the deferred logging mode is used (and
currently it is by default), because those samples are ended by a reset
and some messages may not get a chance to be outputted.
Since the same problem concerns also the ordinary logging messages that
may be produced during execution of the samples, this commit fixes it
by switching to the immediate logging mode, not by just disabling the
LOG_PRINTK option.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-12-10 09:45:02 +01:00
Daniel DeGrasse
1ff8fb927f samples: ipc: openamp: Enable openamp sample for iMX.RT1160 EVK
Enable the openamp sample for RT1160EVK. CM4 core has a custom DTS
overlay to use LPUART2 for console information, and use a secondary GPT
timer for the system tick.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-12-05 19:54:37 +01:00
Daniel DeGrasse
10714466c3 samples: ipc: openamp: Enable openamp sample for iMX.RT1170 EVK
Enable the openamp sample for RT1170EVK. CM4 core has a custom DTS
overlay to use LPUART2 for console information, and use a secondary GPT
timer for the system tick.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-12-05 19:54:37 +01:00
Xinyang Tan
535f5a6c04 shell: support setting help string for each entry in a dictionary command
Add support for setting the help description for each entry in a dictionary
command. Currently the syntax string alone may not provide sufficient
description of its entry. This commit also helps keep the help messages
consistent with existing style.

Signed-off-by: Xinyang Tan <xinyang.tan@delve.com>
2022-12-05 18:40:46 +01:00
Gerard Marull-Paretas
e7c659fb29 samples: shields: npm6001_ek: fix build
Commit ff3aaa6ef3 moved some getopt
declarations to unistd.h. Update sample to include the header, so that
we can access optarg.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-12-05 18:21:31 +01:00
Franciszek Zdobylak
9b4aa2d553 samples: fs: Add sample using fs_mkfs function
Provide a demo which uses newly added fs_mkfs function.

Signed-off-by: Franciszek Zdobylak <fzdobylak@internships.antmicro.com>
2022-12-05 15:36:00 +01:00
Glauber Maroto Ferreira
2ad13a50a7 soc: esp32: add light sleep sample code
Add light sleep sample code.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-12-05 15:09:53 +01:00
Glauber Maroto Ferreira
f6705220ff esp32: samples: power management: add deep sleep sample
Add deep sleep sample code with support for the
following wake-up sources:

- Timer
- EXT0/EXT1: IO under RTC domain
- GPIO (ESP32-C3 only)

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-12-05 15:09:53 +01:00
Anas Nashif
37c4110104 samples: jesd216: fix integration platforms
Fix integration platforms to match what is allowed (platform_allow).

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-12-05 14:55:00 +01:00
Andrzej Puzdrowski
0e8005e860 sample/drivers/jesd216: spi-nor config for nrf52840dk
Added configuration which allows to test the sample using SPI_NOR
driver instead of NRF_QSPI driver.
SPI_NOR driver is generic, so nice to add possibility to check
how it is working.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-12-05 12:11:29 +01:00
Chris Friedt
ff3aaa6ef3 posix: getopt: move declarations to unistd.h
Declarations for `getopt()` should be in `<unistd.h>`
according to the spec. The extended versions `getopt_long()`
and `getopt_long_only()` are declared in `<getopt.h>`.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-12-04 14:51:52 +01:00
Madhurima Paruchuri
fa738b0f74 usb-c: Generate USB-C connector VIF policies XML file
Generates XML file containing VIF policies by reading the device tree
using EDT.pickle generated during build
This script writes a subset of general and sink-pdo VIF policies in
output file
This script gets invoked during build if enabled through kconfig
The generated XML containing USB-C VIF policies could be used by
USB PD/Type-C analysers/testers to understand USB-C properties and
perform tests accordingly

Signed-off-by: Madhurima Paruchuri <mparuchuri@google.com>
2022-12-02 08:46:04 -06:00
Johann Fischer
dc26a617d7 samples: usb: console: enable optional new USB device support
Add code and configuration to enable new USB device support.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-12-02 12:55:18 +01:00
Johann Fischer
13766dd417 samples: cdc_acm: enable optional new USB device support
Add code and configuration to enable new USB device support.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-12-02 12:55:18 +01:00
Johann Fischer
f5ef4c4288 samples: usb: add shell sample for new USB support
The sample enables new experimental USB device support
and the shell function.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-12-02 12:55:18 +01:00
Jay Vasanth
06fde72092 samples: drivers: led: Add sample for Microchip XEC LED driver
Add a sample program demonstrating the LED driver for Microchip's
XEC microcontrollers. The sample can be built for MEC152x and
MEC172x.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-12-02 11:31:50 +01:00
Chris Friedt
4d906d944b Revert "posix: getopt: move declarations to unistd.h"
This seems to have caused build failures in spite of CI being
green in PR 52653.

This reverts commit fc92eb1b37.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-12-02 14:09:37 +09:00
Chris Friedt
fc92eb1b37 posix: getopt: move declarations to unistd.h
Declarations for `getopt()` should be in `<unistd.h>`
according to the spec. The extended versions `getopt_long()`
and `getopt_long_only()` are declared in `<getopt.h>`.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-12-01 15:52:47 -05:00
Armin Brauns
52dfd528b8 samples: syslog_net: use utility function for backend init
log_backend_init() does the exact same thing, but shorter.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2022-12-01 09:48:42 +01:00
Armin Brauns
b923f962aa samples: syslog_net: correctly late-initialize log backend
log_backend_activate() does not assign the backend id (backend->ctx->id),
which is required for runtime filtering.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2022-12-01 09:48:42 +01:00
Jamie McCrae
cb50f2fb16 samples: external_lib: Add building on windows support
Adds support for building the external_lib sample application on a
windows host operating system.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-11-30 16:35:40 +01:00
Gerard Marull-Paretas
e0c8de1e39 drivers: regulator: fixed: simplify implementation
Remove regulator-fixed-sync specialization, create a single driver that
is always synchronous. The asynchronous part is rarely/never used, so
let's keep things simple for now.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-30 15:49:30 +01:00
Manuel Arguelles
cc70daacdf samples: counter: support System Timer on s32z270dc2_r52
Enable counter alarm sample on s32z270dc2_r52 boards, using the first
System Timer Module instance.

Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
2022-11-30 11:29:39 +01:00
Anas Nashif
ba7d730e9b tests/samples: use integration_plaforms in more tests/samples
integration_platforms help us control what get built/executed in CI and
for each PR submitted. They do not filter out platforms, instead they
just minimize the amount of builds/testing for a particular
tests/sample.
Tests still run on all supported platforms when not in integration mode.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-29 16:03:23 +01:00
Gerson Fernando Budke
5c773ae45e samples: drivers: counter: alarm: Add support to TFM
Add cmake rules to allow build boards with TFM enabled.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2022-11-29 13:40:27 +00:00
Krzysztof Chruscinski
b53a8e5fea samples: tfm_integration: psa_firmware: Improve logging handling
Remove redundant initialization and add logs flushing before
the reboot.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-11-29 10:46:26 +01:00
Francois Ramu
b839a0f9db samples: drivers: jesd216 jedec ID and SFDP from octo-flash
This adds the support jedec configuration to run
the jedec  sample application. So target boards can display
the content of the octo-NOR flash
of the stm32u585 and stm32l562 or stm32h735 disco boards.
The sfdp-bfp table is provided as example (overlay file),
to run this sample on the stm32l562e_dk platform.
It has to be defined in the deviceTree "in cases were runtime
retrieval of SFDP data is not desired."

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-11-29 09:32:22 +00:00
Emil Gydesen
ae11b5879b Bluetooth: Audio: Remove bt_vcp from vol rend API
Remove the struct bt_vcp pointer from the volume
renderer API, as there is only ever a single
Volume Renderer instance on a device.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-11-28 17:43:40 +01:00
Emil Gydesen
c82af2885e Bluetooth: Audio: Split vol_ctlr and vol_rend callback structure
Split the `bt_vcp_cb` struct into separate structure for
the volume controller and the volume renderer.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-11-28 17:43:40 +01:00
Emil Gydesen
7f69b866f0 Bluetooth: Audio: Specify bt_vcp_vol_rend API
The VCP server, known as the volume renderer, has a
more explicity bt_vcp_vol_rend API naming scheme now.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-11-28 17:43:40 +01:00
Emil Gydesen
ce2b8f9fe1 Bluetooth: Audio: Rename VCS to VCP
Renames almost all occurences of VCS to VCP, as we want to
use the profile as the namespace for volume control.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-11-28 17:43:40 +01:00
Emil Gydesen
aaac86dada Bluetooth: Audio: Rename vcs.h to vcp.h as well as the Kconfig file
Rename vcs.h to vcp.h to better detail what the
file contains, as it is more than just VCS. This also
renames the Kconfig file.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-11-28 17:43:40 +01:00
Emil Gydesen
d8e7a0db42 samples: Bluetooth: Increase subgroup count for broadcast audio sink
Imcrease the supported number of subgroups to 2 as well as the number of
streams to 2, so that it matches the default configuration of the
broadcast audio source sample.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-11-28 14:38:25 +01:00
Andrei Emeltchenko
55843e7d77 samples: net: Add qemu_x86_64 to platform_allow
Allow to build for qemu_x86_64 platform.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-11-28 13:19:51 +01:00
Théo Battrel
e458f5aae6 Bluetooth: Use Zephyr standard log system instead of bluetooth/common/log
The `bluetooth/common/log.h` and `bluetooth/common/log.c` files have been
removed. Files that were using them have been updated to use
`zephyr/logging/log.h` instead.

Those replacement have been done consequently:
- `/BT_DBG/LOG_DBG/`
- `/BT_ERR/LOG_ERR/`
- `/BT_WARN/LOG_WRN/`
- `/BT_INFO/LOG_INF/`
- `/BT_HEXDUMP_DBG/LOG_HEXDUMP_DBG/`
- `/BT_DBG_OBJ_ID/LOG_DBG_OBJ_ID/`

Also, some files were relying on the `common/log.h` include to include
`zephyr/bluetooth/hci.h`, in those cases the include of `hci.h` has
been added.

For files that were including `common/log.h` but not using any logs,
the include has been removed and not replaced.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2022-11-25 17:08:36 +01:00
Fabio Baltieri
2f2eba7517 samples: chre: exclude qemu_leon3
This test used to only run on native_posix due to the test filter until
e478a4e850 was merged. Now it's running on all platforms but it's failing
on qemu_leon3 for some address alignment issue.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-11-24 16:37:49 +01:00
Fabio Baltieri
80e3d68691 samples: chre: use CONFIG_LOG_MODE_MINIMAL
The sample depends on the log output to check for a successful run. This
means that with a small enough log buffer we could lose messages and
fail the run, as it's happening right now on qemu_cortex_m0.

Switching to CONFIG_LOG_MODE_MINIMAL to avoid the problem in the first
place.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-11-24 16:37:49 +01:00
Emil Gydesen
292db21a18 Bluetooth: Audio: Use svc_inst instead of bt_csip for set_member
Use the service instance struct instead of the more generic
`bt_csip` for the CSIP set member API.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-11-24 15:23:48 +01:00
Emil Gydesen
87f86cebe2 Bluetooth: Audio: Rename bt_csip to bt_csip_set_member
Renamed remaining structs and functions that are not
for the set coordinator to use the set member CSIP
role name.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-11-24 15:23:48 +01:00
Emil Gydesen
93b3944a51 Bluetooth: Audio: Rename CSIS to CSIP
Renamed the coordinated set implementation to use the
profile (CSIP) name instead of the service (CSIS) name, as
the former is more general.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-11-24 15:23:48 +01:00
Emil Gydesen
22002b8717 samples: Bluetooth: Increase timeout for broadcast audio source
Increase the time between resets from 30s to 120s.
This make it easier to properly use, while still get
the chance to test the stop functionality.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-11-24 15:23:36 +01:00
Emil Gydesen
40e3930ebd Bluetooth: Audio: Broadcast source subgroup and BIS codec support
Updates the broadcast source API to create subgroups and
to set BIS specific codec configuration

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-11-24 10:21:36 +01:00
Francois Ramu
819cb95438 boards: arm: stm32l562e_dk includes the sdfp table for its octoflash
Moving the SDFP table property from the sample to the device tree
of the stm32l562e_dk disco kit.
The MX52lm51245 Nor octoflash mounted on this boarddoes not
provide its own internal SFDP parameters.
With this patch, the SFDP table is given by the board DTS.
So that the stm32 ospi driver can initialized the  NOR octoflash
correctly with the parameter from that property instead of
relying on the nor octoflash.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-11-24 09:37:07 +01:00
Marcin Niestroj
daee6cb4a9 settings: file: change FS (or file system) wording to File
Currently there is inconsistency in repository file names, APIs, Kconfig
options and documentation around file / file-system backend for settings
storage, as both "file" and "FS (file system)" are used. As an example,
there is `CONFIG_SETTINGS_FS` Kconfig option, but the file that implements
this settings backend is called `settings_file.c`. Another example are
names of static functions that implement settings storage API:
`settings_file_load()`, `settings_file_save()` and
`settings_fs_storage_get()`.

This backend is actually storing all settings in a single file, so it makes
sense to use "File" as the name of backend, instead of a more general
"FS" (which would make sense if several files would be used to store
settings).

Fix inconsistency in used wording in the tree and unify it to "settings
file backend". This naming is more precise to how the implementation looks.
It will also make it easier to grep through the codebase and analyze
existing code.

Deprecate settings_mount_fs_backend() function and all Kconfig options
starting with `CONFIG_SETTINGS_FS`.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-11-24 09:36:31 +01:00
Andrzej Głąbek
1ef35090d0 samples: modules: chre: Flush log messages after initialization
On targets where POST_KERNEL initialization routines, executed after
the logging thread has started, take significant amount of time,
log messages produced during CHRE initialization may collide with
printk messages output by the sample. Prevent this by flushing all
log messages right after the initialization is performed.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-11-23 17:22:16 +00:00
Anas Nashif
cffe98d9de crc: Make the build of crc function dependent on a Kconfig
Add CONFIG_CRC for building CRC related routines.
CRC routines are now being built for each application, whether used or
not and are add in the build system unconditionally.

Keep CONFIG_CRC enabled by default for now and until all users have
converted to use the new option.

Partial fix for #50654

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-23 13:30:00 +01:00
Francois Ramu
d24f3b9baa samples: drivers: jesd216 jedec ID and SFDP from octo-flash
This adds the support jedec configuration to run
the jedec  sample application. So target boards can display
the content of the octo-NOR flash
of the stm32u585 and stm32l562 or stm32h735 disco boards.
The sfdp-bfp table is provided as example (overlay file),
to run this sample on the stm32l562e_dk platform.
It has to be defined in the deviceTree "in cases were runtime
retrieval of SFDP data is not desired."

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-11-22 14:26:57 +00:00
Francois Ramu
055c1c637e samples: drivers: stm32u5x octospi enables DMA
Adds the dma transfer for the octoSPI on NOR octo Flash
of the b_u585i_iot02a disco kit.
The channel for the GPDMA is 0-15 (0-7 for DMA1, 8-15 for DMA2)
The channel 12 to 15 are used for GPDMA transfers
to/from external memories.
The request is 41 for the OCTOSPI2.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-11-22 12:00:00 +00:00
Johann Fischer
1c4011ff6e usb: remove usb_pid.Kconfig file
Remove Kconfig file samples/subsys/usb/usb_pid.Kconfig added in
the commit e5cbe6a9e7 ("usb: cdc: Add unique PIDs for each sample")
with the motivation to have a separate ID for each sample supposedly
to be recognizable by the host.

The new USB support does not use the options, VID/PID is set
directly in the application. As a note, it is not necessary to have
unique PID for each sample, especially for the well known USB classes.

Replace the individual Kconfig options in the documentation
by a table with the references to the samples and PIDs.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-11-22 11:09:21 +01:00
Gerard Marull-Paretas
767dd47f98 samples: shields: npm6001_ek: initial version
Add a sample that demonstrates usage of the nPM6001 PMIC (all of its
functionalities).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-22 11:05:19 +01:00
Jeppe Odgaard
7d27309816 samples: Basic system heap Demo
A demo to showcase some of the sys_heap functions

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2022-11-22 13:17:59 +09:00
Mirai Shinjo
d595148c98 samples: sensor: doc: fix a code block formatting issue
This commit fixes a code block formatting issue in the stm32_vbat_sensor
sample documentation.

Signed-off-by: Mirai Shinjo <miraishinjo@icloud.com>
2022-11-22 12:54:44 +09:00
Chris Friedt
7a0fd7ad14 samples: drivers: flash_shell: disambiguate flash shell app
Both `drivers/flash/flash_shell.c` and
`samples/drivers/flash_shell/src/main.c` provide a flash shell
utility called `flash`.

Rename the latter to disambiguate.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-11-19 14:24:38 -05:00
Anas Nashif
b512c8e4fa samples: fix duplicate identifier
Test identifier was duplicated.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-18 09:19:47 -05:00
Dominik Ermel
31d4a2e7bd samples/nrf/onoff_level_light: Convert to new MCUmgr header paths
Header paths changed.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-11-17 15:31:17 +01:00
Dominik Ermel
0556275faf samples/mcumgr/smp_svr: Apply rework in MCUMgr subsystem
Code changes required by rework in MCUMgr souce code structure.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-11-17 15:31:17 +01:00
Dominik Ermel
7c2924f4bc mgmt/mcumgr: Move transport headers to transport subdir
The MCUmgr transport headers have been moved to
zephyr/mgmt/mcumgr/transport/

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-11-17 15:31:17 +01:00
Benjamin Perseghetti
bc72ad318f boards: rddrone_fmuk66 fix pwm pinmux and servos
Fixes the channel 2 PWM pinmux adds servos and PWM LEDs.
Required to operate servo motors and status lighting.
Tested on RDDRONE board.

Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
Co-authored-by: Sumit Batra <sumit.batra@nxp.com>
Co-authored-by: Landon Haugh <landon.haugh1@gmail.com>
2022-11-16 10:18:46 -06:00
Henrik Brix Andersen
f0199dc3e7 samples: drivers: eeprom: remove EEPROM shell overlay
Remove the EEPROM shell overlay from the EEPROM driver sample as this was
only introduced as a build test for the EEPROM shell. This is now done in
tests/drivers/eeprom/shell.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-11-15 09:43:42 -06:00
Kristofer Jonsson
e35e981564 samples: Add a TFLU Ethos-U sample program
Add a sample program that demonstates how to run inferences on
Arm Ethos-U.

Signed-off-by: Kristofer Jonsson <kristofer.jonsson@arm.com>
Signed-off-by: Fredrik Knutsson <fredrik.knutsson@arm.com>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-15 14:47:43 +01:00
Daniel DeGrasse
1aa01c18bb samples: drivers: ipm: update to use sysbuild
Update ipm_mcux sample to use sysbuild for multicore images

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-11-15 14:46:02 +01:00
Daniel DeGrasse
e033677787 samples: openamp: update openamp sample to use sysbuild
Update IPC openamp sample to use sysbuild for multi core images.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-11-15 14:46:02 +01:00
Daniel DeGrasse
71d8b0ab68 samples: openamp: add separate overlay files for remote cores
with sysbuild, DTS overlays for boards cannot automatically be passed to
the remote core. This means DTS overlays must be present for remote cores
as well.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-11-15 14:46:02 +01:00
Daniel DeGrasse
407fe95af3 samples: openamp: add lpc54114 configuration settings
Add lpc54114 configuration settings to enable booting second core with
sysbuild, and LMA address adjustment

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-11-15 14:46:02 +01:00
Daniel DeGrasse
a969b93ec7 samples: openamp: add additional required KConfigs for LPC55s69
LPC55s69 requires the second core to output a hex build to ensure the
image is flashed to the correct location, and uses the
CONFIG_SECOND_CORE_MCUX symbol in each core's build to indicate the build
targets a dual core config

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-11-15 14:46:02 +01:00
Jędrzej Ciupis
741972cf56 samples: net: wpan(usb|serial): exclude thingy53_nrf5340_cpuapp_ns
This commit excludes thingy53_nrf5340_cpuapp_ns platform from building
wpanusb and wpan_serial samples. The platform doesn't support TF-M yet
and therefore the build is bound to fail.

Due to limitations of the filter functionality, a more generic approach
where _ns platforms without TF-M support would be excluded from the
build, for example:

filter: dt_chosen_enabled("zephyr,ieee802154") and
	CONFIG_NRF_SOC_SECURE_SUPPORTED

doesn't properly filter out the needed platforms. As a result,
platform_exclude syntax is used to specifically exclude the platform.

Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2022-11-15 12:13:46 +00:00
Chris Friedt
dae6d2f84b samples: drivers: fpga: fpga_controller: fix links in README.rst
Markdown links were incorrectly used in this ReST document.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-11-15 05:59:09 -05:00
Rodrigo Peixoto
27ec69eca1 samples: zbus: Add benchmark sample
The sample measures the time to transfer 256KB from the
producer to the consumers.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2022-11-14 17:25:29 -05:00
Rodrigo Peixoto
078d561bf6 samples: zbus: Add runtime observer registration sample
The sample illustrates a way of using the runtime observer registration
feature. With this sample the developer can understand how to use static
and runtime observer registration.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2022-11-14 17:25:29 -05:00
Rodrigo Peixoto
86513fb7af samples: zbus: Add the remote mock sample
The sample illustrates a way of exchange message with a host mock
running in a Python script. It can be used to improve the testability
and controllability of the tests.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2022-11-14 17:25:29 -05:00
Rodrigo Peixoto
0528a43345 samples: zbus: Add the UART bridge sample
The sample illustrates a way of send all the channel event to the host
by using the UART, a user_data portion, and the claim/finish APIs.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2022-11-14 17:25:29 -05:00
Rodrigo Peixoto
bc6963fd5b samples: zbus: Add dynamic channels sample
The sample illustrates a way of using dynamically allocated messages in
static channels.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2022-11-14 17:25:29 -05:00
Rodrigo Peixoto
5ed4781c54 samples: zbus: Add work queue sample
The work_queue sample illustrates three reaction styles available for
using zbus. The first is a listener that reacts by callback; use it should
for urgent reaction. The second is a listener that responds by callback;
instead of executing the code, it pushes a job to a work queue that will
be executed shortly but not immediately. The last one is the subscriber
that reacts using a queue; use it for an asynchronous reaction where the
developer would like to control the flow.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2022-11-14 17:25:29 -05:00
Rodrigo Peixoto
68b5b05165 samples: zbus: Add the hello world sample to zbus
The hello world sample illustrates a simple way of using zbus. There is
a listener and a subscriber interacting each other by using a read-only
and a regular channel. The APIs are called by using the function
and macro variation.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2022-11-14 17:25:29 -05:00
Anas Nashif
67e8d03280 tests/samples: fix some missing tags
Many driver samples or tests only had 'drivers' as the tag, without a
tag indicating what driver that is exactly, so add some missing tags.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-14 07:08:04 -05:00
Yonatan Schachter
b49b11555c samples: flash_shell: Fix flash range printing
When running a flash read command on the flash shell, the hexdump
prints came out incorrect. There was a space missing between the
ninth element and its preceding "|", and a redundant newline.
This commit fixes this issue.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2022-11-14 12:38:03 +01:00
Yonatan Schachter
c5cb0d1a3b samples: blinky_pwm: Fix sample for rpi_pico
The RP2040 needs a DTS overlay for the PWM to work with the
blinky_pwm examples. This commit adds the required overlay.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2022-11-14 12:37:47 +01:00
Benjamin Lindqvist
85c6de4335 lorawan: enable run-time config of region/freq
This commit adds support for compiling in support for several different
regions/frequencies and dynamically choosing which to use in run-time.
This commit introduces no API breakages - if a prj.conf contains only a
single region Kconfig, the new function lorawan_set_region() does not
need to be called.

Signed-off-by: Benjamin Lindqvist <benjamin@eub.se>
2022-11-14 11:16:16 +00:00
Francois Ramu
838cd28195 samples: drivers: watchdog stm32 wwdg decrease apb clock
The most of the wwdg peripherals requires a reduced apb clock
to pass the sample.drivers.watchdog.stm32_wwdg testcase.
This apb1 prescaler is added to the overlay file
for that particular clock.
Specific overlay for the stm32h7 family because of the APB1
bus clock named d2ppre1.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-11-11 08:40:23 +00:00
Gerson Fernando Budke
92ca06577f samples: usb: mass: Add support to TFM NS boards
This add TFM cmake definitions to build mass storage sample for non
secure firmware boards versions. The stm32l562e_dk_ns board was used
to demonstrate. It uses SDMMC/SD with TFM profile large. Tests were
conducted using a 2GB transflash card with FAT-32 partition.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2022-11-10 11:26:11 +00:00
Gerson Fernando Budke
151e145b44 boards: arm: stm32l562e_dk: Enable usb tags for tests
This enables usb and usb_device tag for tests. It explicitly disable
samples/subsys/usb/dfu for non-secure version of this board due to
building errors, which can be explored in future.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2022-11-10 11:26:11 +00:00
Gaël PORTAY
a8ae2217e2 samples: modbus: print returned error code
This prints the returned error code, just like the other calls do.

Signed-off-by: Gaël PORTAY <gael.portay@gmail.com>
2022-11-09 10:46:02 -06:00
René Beckmann
a507186d12 samples: net: mqtt-sn: Add MQTT-SN publisher sample
This sample demonstrates the usage of the MQTT-SN library over UDP.
It connects to a gateway, publishes to the topic "/uptime" and also
subscribes to "/number".

Signed-off-by: René Beckmann <rene.beckmann@grandcentrix.net>
2022-11-09 10:43:00 +01:00
Hubert Miś
b2c5d7cb60 sample: add icmsg multi endpoint sample
Add a sample presenting ipc_service working with icmsg multi endpoint
backend. The sample creates multiple instances of icmsg, one of them
consisting of two endpoints.

Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
2022-11-09 10:41:43 +01:00
Seppo Takalo
83d79b5996 net: lwm2m: We should not use read callbacks to generate new data
When read callbacks are used, it bypasses LwM2M engine data
handling and therefore LwM2M observation cannot work properly.

Read callbacks should be used only on special cases.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2022-11-09 09:16:22 +00:00
Peeyush Kumar
38907d1c65 samples: boards: stm32: Rename README.md to README.rst
Updated the README file extension from .md to the expected extension .rst

Signed-off-by: Peeyush Kumar <peeyush.ei@gmail.com>
2022-11-08 13:47:09 -06:00
Kevin Townsend
1cb49a389b samples: ipc: rpmsg: Fix AN521 buffer location
Updates the location of the shared memory buffer to account for
memory map chains with `mps2_an521_remote`.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2022-11-08 10:57:35 -05:00
Kevin Townsend
e3b21b88b0 samples: ipc: openamp: Fix AN521 buffer location
Updates the location of the shared memory buffer to account for
memory map chains with `mps2_an521_remote`.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2022-11-08 10:57:35 -05:00
Pavel Vasilyev
8a77f6e79e samples: bluetooh: mesh_demo: Fix compilation for bbc_microbit
Reduce number of relay buffers to compile mesh_demo for bbc_microbit
platform.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2022-11-08 10:47:46 +01:00
Maciej Perkowski
15afd31862 tests: usb: Make tests for usb mass sample more robust
It was found that the existing regex check was not enough to validate
correctness of execution of mass samples. Tests would pass even when
a filesystem failed to be mounted. An additional line to check is added
to validate the setup of a filesystem.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2022-11-08 10:45:08 +01:00
Jose Alberto Meza
2a8f7188c6 samples: drivers: peci: Add mec172xxebv overlay
Define DT alias for PECI

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2022-11-08 09:42:27 +00:00
Jamie McCrae
f33eab8fb6 samples: mgmt: mcumgr: Remove un-necessary modules from build
This removes some modules and functionality from the sample to
reduce the output application size to assist in fitting it to MCUs
with less flash storage space.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-11-08 09:41:24 +00:00
Francois Ramu
15cc076126 samples: subsys: littlefs on nucleo_h743zi
This commit fixes the overlay file for running the
samples/subsys/fs/littlefs on the nucleo_h743zi platform.
The storage_partition is moved to the qspi_nor flash
instead of the internal flash.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-11-05 19:57:40 +01:00
Sean Madigan
34718446e1 Samples: Bluetooth: Increase sync timeout for sync samples
Currently, the sync timeout means the device will timeout
straight after it syncs. This means we cannot send a sync
transfer as we are no longer synced.

Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
2022-11-05 19:57:31 +01:00
Stephanos Ioannidis
d7f69fccc3 samples: chre: Correct main() function prototype
C++ standard requires C++ main() to have the return type of 'int'.

This commit updates the CHRE sample to define main() as
`int main(void)` and enable  `CONFIG_CPP_MAIN`, which instructs the
Zephyr kernel to call the C++ main().

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-11-05 16:41:45 +09:00
Stephanos Ioannidis
cb43c90058 samples: cpp_synchronization: Allow running on POSIX arch boards
This commit updates the cpp_synchronization to run on the "POSIX
architecture" boards such as `native_posix`, since the POSIX arch now
properly supports the main() defined in a C++ source file.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-11-05 16:41:45 +09:00
Stephanos Ioannidis
17ea196b02 samples: cpp_synchronization: Enable CONFIG_CPP_MAIN
This commit updates the cpp_synchronization sample to enable
`CONFIG_CPP_MAIN` since it defines its main() in a C++ source file.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-11-05 16:41:45 +09:00
Stancu Florin
b9f462e890 boards: cc13x2/cc26x2*: add ADC sample + update docs
Add ADC driver sample overlays + update features in doc + metadata for TI
CC13x2/CC26x2 based boards (cc1352r_sensortag, cc1352r1_launchxl,
cc26x2r1_launchxl).

Signed-off-by: Stancu Florin <niflostancu@gmail.com>
2022-11-04 17:31:59 -04:00
Kamil Serwus
278120acb6 board: samc21: add support for SAMC21N Xplained Pro Board
Add basic support board with SAMC21N soc including SPI, UART, I2C,
ADC, Flash, Leds.

Signed-off-by: Kamil Serwus <kserwus@gmail.com>
2022-11-04 16:03:01 +01:00
Anas Nashif
aead5b523b sample: tracing: add a configuration for percepio
Add a sample configuration for percepio.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-04 10:00:48 +01:00
Ederson de Souza
7ffc6c31b5 samples/boards: Add intel_adsp/code_relocation sample
A simple sample with some (explained) tricks to get code relocation for
Intel ADSP CAVS platforms.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-11-03 10:25:07 +01:00
Joakim Andersson
777ec7b48c samples: tfm_secure_partition: Add library configuration to sample.yaml
Add library model configuration to tfm_secure_partition model.
IPC model is now the default, so add back the library configuration
for the sample as an additional configuration to the default.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-11-02 16:10:18 -05:00
Francois Ramu
2749cfed8e samples: compression: lz4 requires more than 64kB of RAM
Set the min_ram limit to 64kB so that with new ztest lib
can run the sample on board with enough ram.
Smaller ram platforms are not used anymore.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-11-02 16:06:06 -05:00
Markus Swarowsky
c859f3069b samples: psa_crypto: Add twister regex for attestation token
So far running twister tests didn't fail even though the sample failed
to receive the initial attestation token data.
Therefore this adds the regex lines that the samples prints if the
IAT data were received.

Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2022-11-02 15:41:41 +09:00
Maureen Helm
0ddc2a9b65 drivers: sensor: Remove brackets from sensor info shell command output
Brackets were originally used in the sensor info shell command output to
make it obvious when a field is a null string, however they incorrectly
suggest that a field is an array. Remove the brackets and conditionally
print "(null)" instead.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-11-02 15:40:24 +09:00
Maureen Helm
387a108b5f samples: sensor: Fix sensor shell application build command
Fixes the sensor shell sample application build command to use the
correct source directory.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-11-02 15:40:24 +09:00
Henrik Brix Andersen
836f582664 drivers: can: skip all CAN loopback mode tests for kvaser,pcican
Skip all CAN controller tests utilizing CAN loopback mode for the
kvaser,pcican CAN controller card as emulated in QEMU.

QEMU emulation of the SJA1000 CAN controller backend does not yet support
the SJA1000 Self Reception Request command which is required for proper
loopback operation.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-11-01 15:22:31 -04:00
Henrik Brix Andersen
4af4fc0314 samples: modules: canopennode: exclude qemu_x86 from storage build
Exclude the qemu_x86 and qemu_x86_64 boards from the build-only CANopenNode
storage test.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-11-01 15:22:31 -04:00
Henrik Brix Andersen
05d02e2dac samples: drivers: can: counter: use printf() instead of printk()
Use printf() instead of printk() for printing sample output. According to
the documentation Zephyr printk() and friends are for printing kernel debug
messages.

With printf() instead of printk() the CAN counter sample passes twister
test execution on native_posix and native_posix_64.

Fixes: #50570

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-11-01 09:02:41 +00:00
Ingar Kulbrandstad
7367980bea Bluetooth: Mesh: Extended advertiser as default
Setting the extended advertiser as default advertiser
to improve both preformence and reliability.

Signed-off-by: Ingar Kulbrandstad <ingar.kulbrandstad@nordicsemi.no>
2022-11-01 08:52:56 +00:00
Kumar Gala
117039ca2b IPM: remove defconfig/proj setting of IPM drivers
Now that IPM drivers are enabled based on devicetree we can
remove any cases of them getting enabled by Kconfig, *defconfig*,
and *.conf files.

We need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-31 16:45:56 -05:00
Gaël PORTAY
1578a991bd samples: blinky_pwm: fix missing project renaming
The commit bfb1040612 has renamed the
sample blink_led to blinky_pwm, however, the project still have the
former name: blink_led.

This renames the project to its new name: blinky_pwm.

Signed-off-by: Gaël PORTAY <gael.portay@gmail.com>
2022-10-31 09:22:59 -05:00
Maureen Helm
32aa66d57e samples: sensor: Enable sensor info shell command
Enables the new sensor info shell command in the sensor shell sample
application and documents its usage.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-10-31 11:21:37 +01:00
Maureen Helm
eef0e1a180 samples: sensor: Update sensor shell documentation
Updates the sensor shell sample documentation to reflect the currently
supported sensor shell commands. The list and list_channels commands
were removed in commit 95b4d37230 but the
documentation wasn't updated at the time.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-10-31 11:21:37 +01:00
Keith Packard
d61d941ec8 samples/bluetooth: Fix mis-use of bt_data 'data' field
The data field is a *pointer* to the buffer, not the actual buffer itself.
Instead of smashing past the end of the struct, write through that pointer.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-10-29 11:32:06 +03:00
Johann Fischer
b26fca430c drivers: flashdisk: remove all DISK_FLASH* Kconfig options
Remove all obsolete DISK_FLASH* Kconfig options.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2022-10-28 12:45:58 +02:00
Tomasz Moń
51c46e98c7 samples: usb: mass: add disk description to overlays
Add flash disk description to overlays. Specify custom flashdisk
partition for fat fs api test to match the Kconfig values, because
native posix storage partition is too small for FatFS filesystem.

Co-authored-by: Johann Fischer <johann.fischer@nordicsemi.no>
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2022-10-28 12:45:58 +02:00
Kumar Gala
7fff3de993 samples: synchronization: Convert CONFIG_MP_NUM_CPUS handling
Move runtime checks to use arch_num_cpus() and build checks
to use CONFIG_MP_MAX_NUM_CPUS.  This is to allow runtime
determination of the number of CPUs in the future.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-27 13:59:57 -04:00
Kumar Gala
6aa67666c4 samples: smp: pktqueue: Convert CONFIG_MP_NUM_CPUS handling
Move runtime checks to use arch_num_cpus() and build checks
to use CONFIG_MP_MAX_NUM_CPUS.  This is to allow runtime
determination of the number of CPUs in the future.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-27 13:59:57 -04:00
Kumar Gala
9092b83d03 samples: smp: pi: Convert CONFIG_MP_NUM_CPUS handling
Move runtime checks to use arch_num_cpus() and build checks
to use CONFIG_MP_MAX_NUM_CPUS.  This is to allow runtime
determination of the number of CPUs in the future.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-27 13:59:57 -04:00
Nikolay Agishev
5b6f2f4fb6 twister: Add fiters to SYS-T related tests
New filter "TOOLCHAIN_HAS_NEWLIB == 1" was applied
because of following chain of dependencies:
LOG_MIPI_SYST_ENABLE=y --> CONFIG_MIPI_SYST_LIB --> \
--> REQUIRES_FULL_LIBC --> NEWLIB_LIBC.

Not all compillers announced in Zephyr support NewLib.

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2022-10-27 11:03:30 +02:00
Thomas Stranger
338f1b9488 samples: subsys: canbus: isotp: fix sample path in Readme.rst
The path in the readme did not match the sample's real path.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-10-27 11:02:57 +02:00
Joakim Andersson
96698450c4 sample: tfm_regression_test: Only have audit partition in Library config
Only enable the TF-M Audit Partition in the TF-M regression tests when
Library model is used.
This is not supported in IPC model and produces a Kconfig warning.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-10-27 10:37:18 +02:00
Joakim Andersson
8bc9a3c042 sample: tfm_regression_test: Set library model explicitly
Set the TF-M library mode explicitly instead disabling IPC model and
relying on this selecting Libray model in the choice.
This is a follow-up on the TFM_IPC being put into a choice selection
when SFN model was added.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-10-27 10:37:18 +02:00
Dominik Ermel
a5f2b6bb43 samples/boards/nrf: Fix onoff_level_lighting_vnd_ap sample
Remove inclusion of moved and non needed header.
Other unneeded headers have been also removed.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-10-27 02:21:39 +09:00
Mariusz Skamra
2627063ab2 Bluetooth: audio: pacs: Replace capabilities API with pacs
This changes the API to use proper naming convention, as the code has
been moved out of capabilities.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-10-26 08:49:00 +02:00
Henrik Brix Andersen
30c7d31fde samples: drivers: can: babbling: set CAN-FD mode if requested
Set the CAN controller to CAN-FD mode before attempting to send FD format
frames.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-10-25 16:32:10 +02:00
Henrik Brix Andersen
f8a88cdb27 drivers: can: use flags fields for can_frame and can_filter structs
The can_frame and can_filter structs support a number of different flags
(standard/extended CAN ID type, Remote Transmission Request, CAN-FD format,
Bit Rate Switch, ...). Each of these flags is represented as a discrete bit
in the given structure.

This design pattern requires every user of these structs to initialize all
of these flags to either 0 or 1, which does not scale well for future flag
additions.

Some of these flags have associated enumerations to be used for assignment,
some do not. CAN drivers and protocols tend to rely on the logical value of
the flag instead of using the enumeration, leading to a very fragile
API. The enumerations are used inconsistently between the can_frame and
can_filter structures, which further complicates the API.

Instead, convert these flags to bitfields with separate flag definitions
for the can_frame and can_filter structures. This API allows for future
extensions without having to revisit existing users of the two
structures. Furthermore, this allows driver to easily check for unsupported
flags in the respective API calls.

As this change leads to the "id_mask" field of the can_filter to be the
only mask present in that structure, rename it to "mask" for simplicity.

Fixes: #50776

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-10-25 16:32:10 +02:00
Henrik Brix Andersen
a9c7c58345 canbus: isotp: avoid reusing CAN controller driver API definitions
Avoid reusing the CAN_EXTENDED_IDENTIFIER and CAN_STANDARD_IDENTIFIER
definitions from the CAN controller driver API for ISO-TP structure members
as this is a fragile design.

The ISO-TP layer must be responsible for its own definitions where
needed. Replace the "id_type" ISO-TP struct member with a well-known
abbreviated "ide" bit (Identifier Extension Bit) struct member.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-10-25 16:32:10 +02:00
Jamie McCrae
ff624a186c samples: mgmt: mcumgr: smp_svr: Fix stack overflow with bt
Fixes an issue with a possible stack overflow when using the
Bluetooth transport for large mcumgr transfer, the issue was caused
by moving to a dedicated workqueue but not moving the enlarged
system workqueue overlay to the new smp workqueue.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-10-25 16:25:13 +02:00
Emil Gydesen
31bf99cbd2 Bluetooth: ISO: Change ISO seq_num to 16-bit
The sequence number is by the core spec defined as 16-bit.
We had implemented a workaround for the wrapping of the
sequence number, which required the type to be larger
than 16-bit (32-bit).

However, since the definition of the sequence number,
and the use of, is poorly defined by the core spec, we
are reverting this workaround and reducing the sequence
number to 16-bit again. This way it is more in line
with the core spec, as well as more intuitive given the
other uses for the sequence number.

This change moves the responsibility of using the
right value to the upper layers, as the stack can
and will no longer provide any guarantees.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-10-24 10:38:49 +02:00
Sam Hurst
c2e9462637 samples: boards: Remove board specific USB-C Sink sample
This CL removes the board specific USB-C Sink sample in
favor of the generic USB-C Sink sample.

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2022-10-22 18:38:35 -04:00
Sam Hurst
e2f5fcd91a samples: usb-c: sink: Add USB-C Subsystem Sink Sample
Implementing USB-C Sink functionality can be difficult.
This sample application serves as an example of how
to create an application with Power Delivery Sink
functionality.

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2022-10-22 18:38:35 -04:00
Krishna T
52ddc6e32d samples: net: zperf: Add loopback overlay
This is useful to profile networking stack using loopback interface, a
TX only option is also added but disabled by default.

Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
2022-10-21 13:15:05 +02:00
Michal Sieron
702caf1c7e samples: boards: Add Qomu board sample
First pads are being configured for use by the FPGA.
Then CPU loads usbserial bitstream.
Finally it reenables clocks, sets up USB PID and waits for device to
enumerate.

Also disable software resets in used clocks.

Signed-off-by: Michal Sieron <msieron@antmicro.com>
2022-10-20 15:41:09 +02:00
Kumar Gala
ad5966a432 samples: move to using CONFIG_MP_MAX_NUM_CPUS=1
For samples that set CONFIG_MP_NUM_CPUS=1, switch to using
CONFIG_MP_MAX_NUM_CPUS=1 instead as we work to phase out
CONFIG_MP_NUM_CPUS.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-20 22:04:10 +09:00
Felipe Neves
5760fcc8ab soc: xtensa: esp32_net:
Fixes boot sequence for esp32_net, also reflect the changes in the
esp32 ipm driver.

Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2022-10-19 16:03:00 +02:00
Stephanos Ioannidis
9dd570f8a2 tests: Remove explicit newlib nano override
This commit removes explicit `CONFIG_NEWLIB_LIBC_NANO=n` overrides
because the newlib nano variant is no longer enabled by default when
it is available.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-10-19 16:02:51 +02:00
Andrei Emeltchenko
87217eff6b samples: edac: Add sample documentation
Add EDAC sample documentation.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-10-18 16:59:34 +02:00
Torsten Rasmussen
36ea41fad3 samples: introduce 'with_mcuboot' sample to show sysbuild feature
This sample is intended to show users how they can create a sample which
has dedicated configuration files for extra images included in a build.

MCUboot is used as example on how its default can be adjusted and
MCUboot itself automatically be included in the build when using
sysbuild.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-10-18 14:13:27 +02:00
Veijo Pesonen
2fbb9e64be samples: lwm2m: allow longer endpoint names
Server might return the endpoint name in a registration reply. Default
max allowed endpoint name is only 12 characters.

Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
2022-10-17 20:06:32 +02:00
Gerard Marull-Paretas
178bdc4afc include: add missing zephyr/irq.h include
Change automated searching for files using "IRQ_CONNECT()" API not
including <zephyr/irq.h>.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-17 22:57:39 +09:00
Emil Obalski
2230857a44 samples: ipc: icmsg: Add usage of endpoint deregister
Expand the sample to show deregister functionality
for IPC service with icmsg backend.

Signed-off-by: Emil Obalski <Emil.Obalski@nordicsemi.no>
2022-10-17 14:49:42 +02:00
Emil Obalski
e25ca9f757 samples: ipc: icsmg: Clean up the sample
Make the sample exchange the data between cores
for predefined time. Clean up logging messages
and do not print transfer speed on each side.

This sample is now used to demonstrate functionalities
of ipc service with icmsg backend.

Signed-off-by: Emil Obalski <Emil.Obalski@nordicsemi.no>
2022-10-17 14:49:42 +02:00
Krzysztof Chruscinski
7e71bb7089 samples: subsys: logging: Add multidomain logging sample
Add sample which demonstrates multidomain logging.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-10-17 10:16:53 +02:00
Krzysztof Chruscinski
e322447109 logging: Initial multidomain support
Adding multidomain support by introducing log_link module which
acts as a receiver of log messages created by another domain.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-10-17 10:16:53 +02:00
Sean Madigan
5b1dd71f3e Bluetooth: kconfig: Add config options for PAST
Add config options specific for periodic advertising sync transfer.

Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
2022-10-17 10:14:10 +02:00
Kumar Gala
c778eb2a56 smp: Move arrays to use CONFIG_MP_MAX_NUM_CPUS
Move to use CONFIG_MP_MAX_NUM_CPUS for array size declarations instead
of CONFIG_MP_NUM_CPUS.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-17 14:40:12 +09:00
Daniel DeGrasse
2169183ae1 samples: fat_fs: update overlays for nrf52840 and esp_wrover_kit
Update nrf52840 and esp_wrover overlays to use new sdmmc bindings.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-10-14 09:56:10 +02:00
Emil Gydesen
7ab1cafbc2 Bluetooth: Audio: Add Broadcast source application AD
This refactors how the BAP broadcast source handles the
extended and periodic advertising.

First it removes the start and stop of the extended
advertising, and instead expects the application
(or upper layers) to do this.

Second it exposes API functions to get the
necessary advertising data from BAP (service data and
the BASE), which the upper layers will then also
be responsible for setting and updating.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-10-14 09:51:39 +02:00
Florian Grandel
b309822e8e samples: net: wpanusb: document endianness
The WPAN-USB sample did not document endianness of some user space
variables. As the IEEE 802.15.4 stack uses attributes in several
different encodings, the endianness should be documented.

Signed-off-by: Florian Grandel <jerico.dev@gmail.com>
2022-10-12 18:40:59 +02:00
Christopher Friedt
dbe2c0d59e include: net: http: rename http_x.h http/x.h
Some minor housekeeping prior to adding an http server
implementation. There are already a number of http headers
and that number will likely increase with subsequent work.
Moving them into a common directory cleans up the
`include/net` directory a bit.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2022-10-12 09:02:21 -04:00
Gerard Marull-Paretas
3976ccd5f7 include: add missing sys/printk.h include
Some files were using the printk API without including sys/printk.h

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas
6a0f554ffa include: add missing kernel.h include
Some files make use of Kernel APIs without including kernel.h, fix this
problem.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Seppo Takalo
f3ef443a97 samples: net: lwm2m_client: Split sensor modules out from main
Each module deserves their own file so we don't clutter the
main application.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2022-10-11 11:12:07 +02:00
Vinayak Kariappa Chettimada
2d6f6a7729 samples: Bluetooth: hci_rpmsg with 2 BIS configuration
Update the config file to support 2 Broadcast Streams in
hci_rpmsg samples for running iso_broadcast and iso_receive
samples on nRF5340 DK.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-10-10 13:55:06 +02:00
Vinayak Kariappa Chettimada
52a91fd02e samples: Bluetooth: Add configuration file for all controller features
Add project configuration overlay file to build the current
full feature set Bluetooth Low Energy Controller.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-10-07 14:34:14 +02:00
James Johnson
0eaff5a11d drivers: sensor: add ams AS621x Temperature Sensor driver support
Added support for the AMS AS621x series of temperature sensors as a
variant of the TI TMP108 temperature sensor.

Signed-off-by: Jared Baumann <jared.baumann8@t-mobile.com>
Signed-off-by: James Johnson <james.johnson672@t-mobile.com>
2022-10-07 10:01:47 +02:00
Mariusz Skamra
28ce0a96b1 Bluetooth: audio: capabilities: Remove redundant direction parameter
The direction is used to identify the list to append the registered
capabilities. There is no need to keep it in the bt_audio_capabilities,
it can be provided as a function parameter instead.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-10-06 22:41:27 +00:00
Franciszek Zdobylak
64feccf23d drivers: flash: shell: Add flash shell tools
This commit adds two new commands to flash shell tools: flash load and
flash page_info.

Signed-off-by: Franciszek Zdobylak <fzdobylak@internships.antmicro.com>
2022-10-06 22:35:57 +00:00
Chris Friedt
2114104223 samples: net: socketpair: use CONFIG_ARCH_POSIX shorthand
The `CONFIG_ARCH_POSIX` Kconfig option covers all POSIX
boards, so no need to specify them individually.

Signed-off-by: Chris Friedt <cfriedt@fb.com>
2022-10-06 15:32:49 -04:00
Benjamin Björnsson
2ba91ce850 samples: flash_shell: Add board to platform_exclude list
Exclude Arduino Portenta H7 because the flash driver isn't
supported yet on the M4 core.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-10-06 13:52:40 -05:00
Vinayak Kariappa Chettimada
aa50f7db74 samples: Bluetooth: Add boards to platform allowed to catch regressions
Add boards to CI platform_allowed list to catch regressions.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-10-05 16:20:06 +00:00
Vinayak Kariappa Chettimada
b56c6eb697 samples: Bluetooth: Fix peripheral_ht compile error
Fix peripheral_ht compile error introduced in
commit a202341958 ("devices: constify device pointers
initialized at compile time").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-10-05 16:20:06 +00:00
Tom Burdick
f9d16072e8 rtio: Add macro to define iodev submission queue
The iodev submission queue existed but wasn't easily constructed as
there was no macro to define it.

Adds a simple macro wrapper around RTIO_SPSC_DEFINE for creating
the RTIO IO Device Submission Queue enabling each IO device to
have its own pending queue of requests.

The sample has been updated to use the iodev submission queue rather
than a k_msgq.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-10-05 12:42:16 +02:00
Erwan Gouriou
426c51af76 samples: shields: x_nucleo_53l0a1: Fix nodelabels
Following change of nodelabels names in shields, fix their usage in this
sample.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-10-05 16:15:44 +09:00
Joakim Andersson
41e040a3f8 samples: direction_finding_connectionless_tx: Use identity address
Use Identiy address in direction_finding_connectionless_tx sample.
Without this option the advertiser is advertising using an NRPA since
it is a non-connectable advertiser.
The function bt_le_ext_adv_oob_get_local cannot be used to get the NRPA
address of the non-connectable advertiser when privacy is disabled.

Check the return address of bt_le_ext_adv_oob_get_local.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-10-04 14:07:29 +00:00
TOKITA Hiroshi
c28fd3079e samples: driver: watchdog: Add GD32 SoCs support
Add support for boards that implement GD32 SoC.

Overlay file for longan_nano_lite enables FWDGT.

Add WDT_FEED_INTERVAL to make adjustable
the execution cycle of wdt_feed().

And also, make waiting for the WDT_FEED_INTERVAL period
for the watchdog window opens at the start of the test.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2022-10-03 18:07:16 +02:00
Erwan Gouriou
397a992d5f samples: shields: lmp90100_evb: Fix nodelabel
Shield's nodelabels should now be in the form <device>_<shield_name>.
This occurrence was left out in the initial change.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-10-03 14:15:08 +02:00
Juha Heiskanen
8279489aee net: lwm2m: RD Client update registration timeout
Renamed LWM2M_RD_CLIENT_EVENT_REG_UPDATE_FAILURE to
LWM2M_RD_CLIENT_EVENT_REG_TIMEOUT.

Changed reported event type for registration timeout to
LWM2M_RD_CLIENT_EVENT_REG_TIMEOUT from
LWM2M_RD_CLIENT_EVENT_REGISTRATION_FAILURE.
LWM2M_RD_CLIENT_EVENT_REGISTRATION_FAILURE should be only
reported case when server reject by response registration.

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2022-10-03 10:20:13 +02:00
Mariusz Skamra
9ecbee2587 Bluetooth: audio: capabilities: Remove callbacks
This removes the callbacks from capabilities. The callbacks are used for
unicast server role only, while the capabilities are used for the
broadcast sink role as well. Thus the callbacks can be removed as there
is another bt_audio_unicast_server_cb API that is specific for unicast
server role.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-10-03 10:17:21 +02:00
Martin Jäger
9cec058e8e boards: posix: native_posix: enable can_loopback0 by default
The .yaml file states that CAN is supported, but the basic sample
application samples/drivers/can/counter cannot be compiled without
additional configuration.

The loopback driver does not require any additional steps like the
linux SocketCAN driver, so it is safe to enable it by default and
get rid of the many overlay files in the tests.

ISO-TP tests and the counter sample are excluded via .yaml from
twister tests because of timing issues.

Signed-off-by: Martin Jäger <martin@libre.solar>
2022-10-03 10:17:12 +02:00
Mariusz Skamra
124d66e885 Bluetooth: audio: tbs_client: Make GTBS client only build option
Refactor Kconfig to add a way to enable GTBS only client.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-10-03 10:15:03 +02:00
Jim Mussared
e1c134a582 samples/bluetooth/hci_uart: Add support for USB CDC UART.
This PR adds support using the USB CDC UART in the hci_uart sample,
including sample configuration for the nRF 52840 dongle.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-03 10:14:35 +02:00
Michal morsisko
3b26d50012 samples: bluetooth: Add sample demonstrating direct advertising
This sample shows how to run BLE direct advertising towards central
with enabled privacy.

Signed-off-by: Michal morsisko <morsisko@gmail.com>
2022-10-03 10:13:40 +02:00
Pieter De Gendt
fd81163f58 samples: subsys: display: lvgl: Add native_posix overlay for SDL input
Enable SDL keyboard events using the zephyr,gpio-emul-sdl driver and
alias key to sw0.
Pressing 'r' on the keyboard resets the counter.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-10-03 10:12:03 +02:00
Pieter De Gendt
aa4082a093 samples: subsys: display: lvgl: Add button to reset counter
Connect the sw0 alias to reset the counter.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-10-03 10:12:03 +02:00
Ryan Erickson
eadb45612d samples: mcumgr: smp_svr: Add support for MG100 board
Add support to build the sample for the MG100 board.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-10-03 10:11:28 +02:00
Ryan Erickson
3996c0327b samples: net: mqtt_publisher: Add support for MG100 board
Add support to build the sample for the MG100 board.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-10-03 10:11:28 +02:00
Ryan Erickson
b612c49424 samples: net: lwm2m_client: Add support for MG100 board
Add support to build sample for MG100 board.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-10-03 10:11:28 +02:00
Valerio Setti
2bcc6f9194 samples: sensor: adding a sample application for the STM32 qdec driver
Sample application for the STM32 quadrature encoder driver

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2022-10-03 10:10:31 +02:00
Peter Marheine
5eb75b81f7 arm: rename default RAM region from 'SRAM' to 'RAM'
It's useful for RAMABLE_REGION to have a uniform name when
CODE_DATA_RELOCATION is supported, because otherwise the build system
needs to be aware of how the region name differs between architectures.
Since architectures tend to prefer one of 'SRAM' or 'RAM' for that
region, prefer to use 'RAM' as the more general term.

Signed-off-by: Peter Marheine <pmarheine@chromium.org>
2022-10-03 10:09:53 +02:00
Grant Ramsay
5a1845e9f8 samples: boards/esp32: Add ESP32 Ethernet sample
A sample project for ESP32 Ethernet testing.
Possibly this should be consolidated into existing networking samples

Signed-off-by: Grant Ramsay <grant.ramsay@hotmail.com>
2022-10-01 14:51:28 -04:00
Grant Ramsay
7bc8211aa4 boards: xtensa: Add esp32_ethernet_kit board
Adds support for the esp32_ethernet_kit board.
esp32_ethernet_kit board is useful for testing ESP32 Ethernet

Signed-off-by: Grant Ramsay <grant.ramsay@hotmail.com>
2022-10-01 14:51:28 -04:00
Anas Nashif
ebade6f48c samples: remove SOF sample
Sample is now maintained in the SOF repository, no need for duplication.
The SoF project maintains the board configurations and SOF related
configs better than we do.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-01 06:22:21 -04:00
Jose Alberto Meza
dafdef83b4 samples: drivers: espi: Re-enable eSPI SAF for MEC152x board
Add missing device tree entry for SAF HW block.
Re-enable driver for MEC152x board.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2022-09-29 14:59:32 +00:00
Stephanos Ioannidis
165cf8ddb5 samples: display: cfb_custom_font: Fix stale sample reference
The `cfb_custom_font` sample has been relocated from `samples/display`
to `samples/subsys/display`.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
4a35002adb samples: shields: x_nucleo_iks01a2: Fix outdated pinmux file reference
This commit removes the outdated reference to the board pinmux file and
updates the documentation point to point to the relevant Arduino
connector-related devicetree files.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
a0d335042a samples: ft800: Update outdated links
Apparently the URLs for these old products have been moved to under
"old2020" without any redirects ...

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
016fc8c22f samples: grove_display: Update outdated link
The "Grove Base Shield" seems to be no longer listed in the Seeed
website, so its link is replaced with that of the "Base Shield V2",
which is the successor of the "Grove Base Shield."

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
579de846b2 samples: led_lpd8806: Remove outdated link
The "RGB LED strips: an overview" link no longer works and there is no
direct replacement, so there is no point in listing this document in
the references anymore.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
50cced58d2 samples: counter: maxim_ds3231: Fix outdated link
This commit fixes the outdated link to the "Chronodot" product page.

It seems "macetech" no longer lists the older versions of this product
with DS3231, so the link has been replaced with the one from Adafruit.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
e04e9f3958 samples: sensor: th02: Fix outdated link to TH02 datasheet
This commit replaces the outdated link to the TH02 sensor datasheet
with the link to the Si7005 datasheet (the original part name of TH02
is Si7005).

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
ad39da73bb samples: bluetooth: unicast_audio_server: Fix incorrect link
The sample is named `unicast_audio_server`, not `audio_unicast_server`.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
3d80f937fb samples: sensor: ds18b20: Fix incorrect link
This commit fixes the incorrect link to the DS18B20 sensor product
page.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
25062a51c0 samples: sensor: bme280: Fix incorrect link
This commit fixes the incorrect link to the BME250 sensor product page.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
fab0f2afda samples: tfm_integration: Fix TF-M documentation link
Update the link for the TrustedFirmware-M documentation to point to the
official user guide.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
909abaf367 samples: openthread: coprocessor: Fix outdated link
This commit replaces the outdated link to the Tridonic net4more Border
Router product page, which now reports 404, with a link to its
datasheet (it seems like this product is no longer available).

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
6950aa94f7 samples: st_ble_demo: Fix incorrect app link
This commit fixes the incorrect app link and removes other unreferenced
links.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
45a8ace1f3 doc: Use inline literals
Use inline literals where applicable -- especially for the words that
contain `@`; otherwise, Sphinx will think it is an email address.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Jordan Yates
58b65082c2 samples: lora: remove platform_allow
The twister docs specify that `platform_allow` should only be used
if applications can only possibly run on the specified platforms. This
is not the case for these applications, which should be able to run on
any board with LoRa support.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-09-29 08:59:03 +00:00
Jordan Yates
3cf42040ae samples: lorawan: verify region compilation
Issue #49960 showed that individual regions can fail to compile when
enabled. As requested in #50626, validate that each region compiles in
CI.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-09-29 08:59:03 +00:00
Emil Gydesen
3d7af0f272 samples: Bluetooth: unicast audio server stop sending on stopped
When the stopped callback is called, then the CIS is disconnected.
This should stop the sending of data from the server.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-09-27 09:16:21 +00:00
Dominik Ermel
882fe8f951 samples/smp_svr: Remove double inclusion of fs_mgmt.h
Cleanup.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-26 08:08:06 +00:00
Fabio Baltieri
b1715156dd samples: usb: dfu: exclude lpcxpresso55s69_cpu0
Exclude lpcxpresso55s69_cpu0 from the USB DFU tests, this triggers a
build assert due to unsupported flash write block size (512 bytes,
mcuboot supports 8 to 32).

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-23 11:31:52 +00:00
Jay Vasanth
3bab0081dd samples: espi: add pinctrl in mec1501 board overlay
update mec1501modular board overlay to include pinctrl
properties for spi

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-09-21 18:05:32 +00:00
Vinayak Kariappa Chettimada
6843eef4cf samples: Bluetooth: Fix broadcast and receive to wait for all channels
Fix the iso_broadcast and iso_receive sample to wait on
semaphore for all channel establishment and all channel
terminate callbacks to be invoked.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-19 18:11:40 +02:00
Vinayak Kariappa Chettimada
3559abed4d samples: Bluetooth: iso_broadcast increase Tx buffers
Increase the ISO Tx Buffers to avoid throttling of ISO data
transmission when using 2 Broadcast ISO streams.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-19 18:11:40 +02:00
Pirun Lee
5b8b5b86db sample: ots: comply to coding guidelines MISRA C:2012 Rule 14.4
The controlling expression of an if statement
and the controlling expression of an iteration-statement shall have
essentially Boolean type.

Signed-off-by: Pirun Lee <pirun.lee@nordicsemi.no>
2022-09-19 10:57:10 +02:00
Pirun Lee
f6df36b148 Bluetooth: ots: fix sample data operation error
Peripheral: Fix wrong objects index
Central: Fix client not working after re-connect.
         Check object properties before read/write.

Signed-off-by: Pirun Lee <pirun.lee@nordicsemi.no>
2022-09-19 10:57:10 +02:00
Thomas Stranger
c1592fd4c7 samples: drivers: can: babbling: start can node
The device must be started before sending any frames.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-09-16 08:26:47 +00:00
Fabio Baltieri
067e82de4a samples: bt: hids: implement a sample report
The peripheral_hids sample currently implements the HID descriptor and
characteristics, but no notify report. Add some code for implementing a
simple one button click report for boards that have sw0 defined, so that
the sample actually does something beside connecting and enumerating the
device.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-15 16:27:35 +00:00
Fabio Baltieri
7eeed4ab73 samples: bt: hids: set report id in the report_map
The default report_map for peripheral_hids mouse sample descriptor is
missing a report id field. This seems to be confusing Android hosts into
somehow parsing reports incorrectly.

Adding a report id seems to fix the problem and still works correctly on
bluez hosts.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-15 16:27:35 +00:00
Francois Ramu
44b9cde054 samples: boards: stm32 serial wakeup form LPUART on nucleo_wl55jc
This overlay shows the LPUART at 9600 with wakeUp capability
to exit the nucleo_wl55jc target plaform from the low Power
stop mode, EXTI_Line 28 is the corresponding wakeUp source.
The LPUART is sourced by the LSE (32768Hz) and max baudrate
is 9600. Set the console to 9600.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-09-15 15:02:47 +00:00
Ryan Erickson
e7b6e0286a samples: net: wpanusb: exclude pinnacle_100_dvk
This sample does not support the pinnacle_100_dvk

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-09-15 11:58:23 +01:00
Ryan Erickson
37b35fb6e5 samples: net: wpan_serial: exclude pinnacle_100_dvk
This sample does not support the pinnacle_100_dvk

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-09-15 11:58:23 +01:00
Ryan Erickson
894b530f46 samples: mcumgr: smp_svr: Remove pinnacle_100_dvk overlay
The pinnacle_100_dvk enables appropriate drivers by
default if mcuboot is enabled.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-09-15 11:58:23 +01:00
Ryan Erickson
468cee3cd4 samples: net: mqtt_publisher: Remove pinnacle_100_dvk overlay
The pinnacle_100_dvk enables appropriate drivers by
default if networking is enabled.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-09-15 11:58:23 +01:00
Ryan Erickson
de1e50247a samples: net: lwm2m_client: Remove pinnacle_100_dvk overlay
The pinnacle_100_dvk enables appropriate drivers by
default if networking is enabled.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-09-15 11:58:23 +01:00
Aastha Grover
28bf1aaf25 docs: add definition and minimum criteria for samples
Adding guidelines for writing samples which includes definition
and minimum criteria to qualify as a sample.

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
2022-09-14 17:27:05 -04:00
Henrik Brix Andersen
180cdc105e drivers: can: add start and stop CAN controller API functions
Up until now, the Zephyr CAN controller drivers set a default bitrate (or
timing) specified via devicetree and start the CAN controller in their
respective driver initialization functions.

This is fine for CAN nodes using only one fixed bitrate, but if the bitrate
is set by the user (e.g. via a DIP-switch or other HMI which is very
common), the CAN driver will still initialise with the default
bitrate/timing at boot and use this until the application has determined
the requested bitrate/timing and set it using
can_set_bitrate()/can_set_timing().

During this period, the CAN node will potentially destroy valid CAN frames
on the CAN bus (which is using the soon-to-be-set-by-the-application
bitrate) by sending error frames. This causes interruptions to the ongoing
CAN bus traffic when a Zephyr-based CAN node connected to the bus is
(re-)booted.

Instead, require all configuration (setting bitrate, timing, or mode) to
take place when the CAN controller is stopped. This maps nicely to entering
"reset mode" (called "configuration mode" or "freeze mode" for some CAN
controller implementations) when stopping and exiting this mode when
starting the CAN controller.

Fixes: #45304

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-09-13 16:06:50 +00:00
Anders Storrø
97ed0061cb Bluetooth: Mesh: Remove experimental tag from CDB
The CDB module is a mandatory part of provisioning features in BTM, and
can not be regarded as experimental anymore.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2022-09-12 14:14:27 +00:00
Daniel Leung
47bf9ee51c samples: sensors: add a new one for lsm6dso as I2C on I3C bus
This adds some skeleton files to enable using LSM6DSO on I3C bus
while still acting like a I2C device. The new files here are
simply to provide a way to have overlay for each board that
would not conflict with the pure I2C one. Also this is set to
build only because it require external hardware that is not
necessary on the board being tested.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-09 17:42:33 -04:00
Daniel Leung
34e353c0a8 samples: sensors: adds a new one for lps22hh on I3C bus
This adds some skeleton files to enable using LPS22HH on I3C bus.
This still uses the C source file for I2C. The new files here
are simply to provide a way to have overlay for each board that
would not conflict with the I2C one. Also this is set to build
only because it may require external hardware that is not
necessary on the board being tested.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-09 17:42:33 -04:00
Rajkumar Kanagaraj
b32f81642c sample: psa_firmware: Fix the review comments
As suggested updated the docs `west build` command with
zephyr-app-commands.

Signed-off-by: Rajkumar Kanagaraj <rajkumar.kanagaraj@linaro.org>
2022-09-09 16:31:20 -04:00
Rajkumar Kanagaraj
6b67c1a6ff samples: psa_firmware: fix documentation
Updated the document with the correct west build command,
and done some restructuring as well.

Signed-off-by: Rajkumar Kanagaraj <rajkumar.kanagaraj@linaro.org>
2022-09-09 16:31:20 -04:00
Mulin Chao
839031271f driver: espi: npcx: add the controller attached flash sharing API
Add the flash channel support by implementing the controller attached
flash sharing APIs, including flash_read, flash_write, and flash_erase.
For flash_read, the max data payload the module can support is 64 bytes
in one transaction.
For flash_write, the max data payload the module can support is 16
bytes in one transaction.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2022-09-09 16:30:51 -04:00
Gerson Fernando Budke
b5f65f201d boards: arm: stm32l562e_dk_ns: Add flash partitions
The current stm32l562_dk_ns has no flash partitions defined. This add
flash partitions following partition sizes that are compatible with
the TF-M platform defined at flash_layout.h and removes the redundant
overlays board files.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2022-09-09 16:40:20 +00:00
Thomas Stranger
2ef81686b6 samples/drivers/w1: scanner: add ds2485 overlay
Adds an overlay for the ds2485 and adds a test configuration
for it.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-09-09 14:11:30 +00:00
Francois Ramu
3402dfb3da samples: drivers: stm32h7 octospi enables DMA
Adds the dma transfer for the octoSPI on NOR octo Flash
of the stm32h7b3i and stm32h735g disco kits.
The channel for the MDMA is 0-15.
The MDMA request is 0x16 for the OCTOSPI1 fifo threshold

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-09-08 10:07:21 +00:00
Francois Ramu
446b09361a samples: drivers: stm32l562 octospi enables DMA
Adds the dma transfer for the octoSPI on NOR octo Flash
of the stm32l562e_dk disco kit.
The channel for the DMAMUX is 0-15 (0-7 for DMA1, 8-15 for DMA2)
The DMAMUX request is 41 for the OCTOSPI.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-09-08 10:07:21 +00:00
HaiLong Yang
ebc4a37a21 samples: flash_shell: add support for gd32 boards
After add zephyr,flash-controller property, most gd32 boards support
flash_shell sample.

gd32vf103c_starter and gd32vf103v_eval only have 32KB SRAM, so we
should reduce CONFIG_HEAP_MEM_POOL_SIZE to 8KB.

gd32f350r_eval only have 16KB driver, exclude from flash_shell sample.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2022-09-08 10:13:05 +02:00
Marek Materzok
33b851f71e boards: frdm_k64f: add SD/MMC support
The FRDM-K64F board has a SD/MMC slot. This patch modifies the DTS
files so that this feature works out of the box. This includes
configuring the SPI peripheral connected to the slot on the board.
This change follows the SD/MMC support for other boards, e.g.
Olimexino-STM32. It was tested on a FRDM-K64F board with the
fat_fs sample.

Signed-off-by: Marek Materzok <tilk@tilk.eu>
2022-09-07 16:37:36 -05:00
Pierre Marzin
10d6685f57 samples: blinky_pwm: add rcar_h3ulcb_cr7 board overlay's
Use dts overlay to declare the pwm-led only when needed.
This is only used for demo purpose of PWM0 on RCAR gen3
boards (H3ULCB only at the moment).

Signed-off-by: Pierre Marzin <pierre.marzin@iot.bzh>
2022-09-07 15:50:49 +02:00
Gerard Marull-Paretas
37c956ffb9 samples: pm: demonstrate usage of the policy latency APIs
Even though we have unit tests that cover the PM policy latency APIs, it
may not be obvious on how to use it in practice. This patch adds a new
sample where both the application and a device driver impose latency
requirements. The sample illustrates how latency requirements are
aggregated and are taken into account when choosing the CPU power state.
The test has been designed to run on native_posix, since it only serves
for demonstration purposes.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-09-07 10:28:55 +02:00
Vinayak Kariappa Chettimada
0c88407a28 samples: Bluetooth: Increase adv data Len for broadcast audio source
Increase the Controller supported Advertising Data Length
Maximum so that Advertising Data set by Broadcast Audio
Source sample is accepted by the controller.

Also, tune down the supported ISO Tx PDU size to suffice the
Broadcast Audio Source usecase.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-06 17:44:38 +02:00
TOKITA Hiroshi
519af86d38 samples: drivers: adc: Add rpi_pico support
Add support for rpi_pico board to adc driver sample.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2022-09-06 17:11:19 +02:00
Henrik Brix Andersen
424f696ce9 samples: drivers: can: add babbling node sample
In a Controller Area Network a babbling node is a node continuously (and
usually erroneously) transmitting CAN frames with identical - often high -
priority. This constant babbling blocks CAN bus access for any CAN frame
with lower priority as these frames will loose the bus arbitration.

Being able to simulate a babbling CAN node is useful when examining the
behavior of other nodes on the same CAN bus when they constantly loose bus
arbitration.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-09-06 09:56:57 +02:00
Henrik Brix Andersen
795280e2a2 samples: drivers: can: rename the CAN counter sample
Rename the CAN controller "counter" sample to make room for more CAN
related samples.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-09-06 09:56:57 +02:00
Dominik Ermel
60e0c698f6 tests/settings: Switch from FLASH_AREA_ to FIXED_PARTITION_ macros
The commit switches flash area access from FLASH_AREA_ macros
to FIXED_PARTITION_ macros and to usage of DTS node labels,
to identify partitions, instead of label property.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-06 09:56:37 +02:00
Dominik Ermel
353a8f9682 samples/subsys/settings: Switch to FIXED_PARTITION_ macros
The commit switches flash area access from FLASH_AREA_ macros
to FIXED_PARTITION_ macros and to usage of DTS node labels,
to identify partitions, instead of label property.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-06 09:56:37 +02:00
Dominik Ermel
00c16f6db2 samples: subsys: nvs: Switch to FIXED_PARTITION_ macros
The commit switches flash area access from FLASH_AREA_ macros
to FIXED_PARTITION_ macros and to usage of DTS node labels,
to identify partitions, instead of label property.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-06 09:56:37 +02:00
Dominik Ermel
cf62fa28f8 fs: littlefs: sample: Switch to FIXED_PARTITION_ macros
The commit switches flash area access from FLASH_AREA_ macros
to FIXED_PARTITION_ macros and to usage of DTS node labels,
to identify partitions, instead of label property.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-06 09:56:37 +02:00
Dominik Ermel
df5d7a4cb4 samples: reel_board: mesh_badge: Switch to FIXED_PARTITION_ macros
The commit switches flash area access from FLASH_AREA_ macros
to FIXED_PARTITION_ macros and to usage of DTS node labels,
to identify partitions, instead of label property.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-06 09:56:37 +02:00
Dominik Ermel
35b82cb6da samples: esp32: Switch to FIXED_PARTITION_ macros
The commit switches flash area access from FLASH_AREA_ macros
to FIXED_PARTITION_ macros and to usage of DTS node labels,
to identify partitions, instead of label property.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-06 09:56:37 +02:00
Dominik Ermel
80e34e2a24 samples: usb: mass: Switch to FIXED_PARTITION_ macros
The commit switches flash area access from FLASH_AREA_ macros
to FIXED_PARTITION_ macros and to usage of DTS node labels,
to identify partitions, instead of label property.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-06 09:56:37 +02:00
Dominik Ermel
d69bc24702 samples/soc_flash_nrf: Switch to FIXED_PARTITION_ macros
The commit switches flash area access from FLASH_AREA_ macros
to FIXED_PARTITION_ macros and to usage of DTS node labels,
to identify partitions, instead of label property.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-06 09:56:37 +02:00
Dominik Ermel
c696f93014 samples/mgmt/mcumgr/smp_svr: Switch to FIXED_PARTITION_ macros
The commit switches code from using FLASH_AREA_* macros to
FIXED_PARTITION_* macros.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-06 09:56:37 +02:00
Krishna T
25d0f87b3c net: dhcp: Add support for restarting DHCP
If a L2 link has been established, then the DHCP is taking too long as
it has to go through its capped exponential backoff timers to trigger
discover (The DHCP starts immediately during init, this is itself wrong,
it should start on a link UP notification) that delays the DHCP for
few seconds to a minute.

And if we do stop and start DHCP then also it goes through the initial
delays (though configurable), which is also not ideal.

Add support for restarting DHCP without any delay, i.e., release and
send discover immediately.

This is also useful in case L2 switches to a different subnet, in this
case Zephyr doesn't restart DHCP automatically, this API can be used by
L2 apps/drivers to restart DHCP to get new subnet IP.

Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
2022-09-06 09:56:22 +02:00
Vinayak Kariappa Chettimada
92f289597e samples: Bluetooth: iso_receive: Updated to synchronize upto 2 streams
Updated the iso_receive sample to configure and synchronize
upto 2 BISes in the created BIG sync.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-05 17:37:47 +02:00
Vinayak Kariappa Chettimada
db84c7d679 samples: Bluetooth: iso_broadcast: Updated to broadcast 2 streams
Updated the iso_broadcast to configure and broadcast 2 BISes
in the created BIG.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-05 17:37:47 +02:00
Sylvio Alves
d524015f82 samples: boards: remove esp32 wifi sample code
`samples/net/wifi` replaces custom esp32 wifi sample
code. Then it can be removed from main repository.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-09-05 15:32:34 +00:00
Sylvio Alves
7d9edc8bf0 wifi: esp32: add support to wifi api mgmt
Moved all MBEDTLS dependencies from prj.conf
to Kconfig as WiFi depends on it.

Update esp32 wifi driver to enable `samples/net/wifi`
to work. Commands as such as `wifi connect` and `wifi scan` are now
available.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-09-05 15:32:34 +00:00
Gerard Marull-Paretas
79e6b0e0f6 includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h>
As of today <zephyr/zephyr.h> is 100% equivalent to <zephyr/kernel.h>.
This patch proposes to then include <zephyr/kernel.h> instead of
<zephyr/zephyr.h> since it is more clear that you are including the
Kernel APIs and (probably) nothing else. <zephyr/zephyr.h> sounds like a
catch-all header that may be confusing. Most applications need to
include a bunch of other things to compile, e.g. driver headers or
subsystem headers like BT, logging, etc.

The idea of a catch-all header in Zephyr is probably not feasible
anyway. Reason is that Zephyr is not a library, like it could be for
example `libpython`. Zephyr provides many utilities nowadays: a kernel,
drivers, subsystems, etc and things will likely grow. A catch-all header
would be massive, difficult to keep up-to-date. It is also likely that
an application will only build a small subset. Note that subsystem-level
headers may use a catch-all approach to make things easier, though.

NOTE: This patch is **NOT** removing the header, just removing its usage
in-tree. I'd advocate for its deprecation (add a #warning on it), but I
understand many people will have concerns.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-05 16:31:47 +02:00
Gerard Marull-Paretas
a6fb18541d samples: net: lldp: remove duplicate include
<zephyr/zephyr.h> was included twice.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-05 16:31:47 +02:00
Michal Narajowski
5c27067dcd Bluetooth: Mesh: Align Config Client API with Health Client API
This PR adds a `*_cli_*` infix to the Config Client API to match
the changes in Health Client. The old API is marked as deprecated.

Signed-off-by: Michal Narajowski <michal.narajowski@codecoup.pl>
2022-09-05 13:56:25 +03:00
Martin Jäger
e5b049249e samples: net: sockets: can: unconditionally include can.h
This header is also needed for struct can_filter, so it should not
only be included if one wants to set the device into loopback mode.

Signed-off-by: Martin Jäger <martin@libre.solar>
2022-09-05 08:57:16 +00:00
Fabio Baltieri
1ecd016e6a sample: smp_svr: fix test name mcumg -> mcumgr
The test names are missing an "r" from "mcumgr" for some reason. Add it
back.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-05 10:18:10 +02:00
Erwan Gouriou
14ae669a8d samples: sensors: lsm6dso: Fix regex filter following unit fix
https://github.com/zephyrproject-rtos/zephyr/pull/49068 fixed units
displayed by  the sample from dps to rad/s but did not update the
sample twister regex filter.
Fix the filter as well to allow testing in CI.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-09-02 11:24:08 +00:00
Erwan Gouriou
6654a06fad samples: stm32 serial wakeup: Don't run on stm32l562e_dk in CI
On STM32 PM serial wakeup sample, a power efficient configuration using
lpuart is provided for stm32l562e_dk target.
Though, since default configuration of the board is using ST-Link virtual
port com on uart1, which can't be changed in CI and hence can't be tested,
then remove this target from sample yaml configuration.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-09-02 11:23:09 +00:00
Parthiban Nallathambi
75479f5338 modbus: add user data for adu callback
add user data for adu callback, which helps in passing
socket and relevant application parameters.

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2022-09-02 10:51:57 +02:00
Erwan Gouriou
5106b9cc2a samples: hts221: Fix testing support by twister
-In order to allow non regression of trigger mode in CI, add
a dedicated configuration for this mode
-Fix regex
-Use a filter on compat rather than using a fixture

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-09-01 13:15:14 -05:00
Mahesh Mahadevan
e1818f16fa samples: usb: Exclude frdm_kl25z from USB DFU test
Flash is disabled on frdm_kl25z

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-09-01 12:36:01 -05:00
Kumar Gala
00931ddf77 samples: i2s: echo: Remove DT_COMPAT_<compat> defines
We auto-generate DT_COMPAT_<compat> defines so we dont need to
explicitly define them anymore.

NOTE: we need to source Kconfig.zephyr first to pull in the autogen
Kconfig.dts files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-09-01 14:58:25 +00:00
Kumar Gala
e501c5c1bd wifi: remove defconfig/proj setting of Wifi drivers
Now that Wifi drivers are enabled based on devicetree we can
remove any cases of them getting enabled by *.conf files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-31 21:57:06 +00:00
Florian Grandel
705a8b6ea1 net: ieee802154: introduce consistent MTU definition
Zephyr IEEE 802.15.4 drivers and L2 stack use the same constant names
for different MTU definitions. The intent of this change is to introduce
a consistent MTU definition which can be used everywhere in zephyr to
avoid confusion, bugs and name conflict.

Signed-off-by: Florian Grandel <jerico.dev@gmail.com>
2022-08-31 21:52:37 +00:00
Yannick Thesen
8700bfd789 drivers: sensor: Added sample for the Würth Elektronik WSEN-HIDS sensor.
Added sample for the WSEN-HIDS humidity and temperature sensor.

Signed-off-by: Yannick Thesen <Yannick.Thesen@we-online.de>
2022-08-31 21:47:58 +00:00
Henrik Brix Andersen
720eeab30f samples: drivers: can: increase the maximum number of shell arguments
Remove the custom Kconfig value for CONFIG_SHELL_ARGC_MAX as it is too low
to account for the new arguments to the "can send" shell command.

The default for CONFIG_SHELL_ARGC_MAX was increased to 20 in
32ebeb0a5c which is sufficient for sending
non-CAN-FD format frames using the new "can send" shell command.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-08-31 10:45:35 +02:00
Pirun Lee
c3f2da178b samples: bluetooth: adding central_otc sample
Added a Bluetooth Central sample that demonstrates how to use
GATT Object Transfer Profile.

Signed-off-by: Pirun Lee <pirun.lee@nordicsemi.no>
2022-08-31 10:39:33 +02:00
Gerard Marull-Paretas
50cfb3a567 samples: drivers: led_pwm: use DT_FOREACH_CHILD_SEP_VARGS
use DT_FOREACH_CHILD_SEP_VARGS to avoid an auxiliary macro.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-30 16:19:57 +02:00
Kumar Gala
492a741d9f crypto: remove proj setting of crypto drivers
Now that crypto drivers are enabled based on devicetree we can
remove any cases of them getting enabled by proj.conf files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-30 10:43:12 +00:00
Katarzyna Giadla
52fe06495d samples: Rename 'samples' to 'sample'
Samples testcases should start with 'sample'. Some testcases
start with 'samples'.
This commit rename these testcases.

Signed-off-by: Katarzyna Giadla <katarzyna.giadla@nordicsemi.no>
2022-08-29 07:30:42 -04:00
Katarzyna Giadla
a84531f4fd samples: Add name "sample" in the some samples modules
Some test cases in the module `samples` have not a name of this module.
This change adds the name `sample` to these test cases.

Signed-off-by: Katarzyna Giadla <katarzyna.giadla@nordicsemi.no>
2022-08-29 07:30:10 -04:00
Flavio Ceolin
86b87ae42d samples: sof: Uses CONFIG_SCHED_CPU_MASK_PIN_ONLY
SoF pins threads to specific cores and don't need them to be executed in
multiple cores. This options allows Zephyr to do cache optimizations
during context switches.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-08-29 11:39:02 +02:00
Andy Ross
7f5e1904cc samples: Add fuzz sample
This is a simple example of fuzz test integration with Zephyr apps
that displays LLVM libfuzzer's most important feature: it's ability to
detect and explore deep and complicated call trees by exploiting
coverage information gleaned from instrumented binaries.

See README.rst and the inline comments for details

Signed-off-by: Andy Ross <andyross@google.com>
2022-08-26 11:57:46 +02:00
Aastha Grover
8a730b818b samples: kernel: Add README for simple condition variable sample.
Add README for simple conditional variable kernel sample.

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
2022-08-25 13:24:14 -05:00
Kumar Gala
3f8ba07b90 usb_device: remove Kconfig.defconfig* setting of usb device drivers
Now that usb device drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-25 08:05:54 -05:00
TLIG Dhaou
366a32bccf Samples: sensor: stm32_temp_sensor: Edit the yaml file of the sample
-Edit the yaml file of the sample in order to execute tests.

Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
2022-08-24 11:35:45 +02:00
Francois Ramu
6bd5ef3137 samples: boards: stm32 serial_wakeup does not check device ready
Since the change in the PR  #49167
samples: boards: stm32: serial_wakeup: fix device usage issues
the sample should not check the "Device ready" anymore

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-08-23 14:44:44 +00:00
Francois Ramu
db39cd1169 samples: boards: pm on stm32 boards with serial wakeup
This commit retrains the power management testcase
tests/samples/boards/stm32/power_mgmt/serial_wakeup
to bun on stm32 boards only.
Limiting first to nucleo_wg55 and stm32l562dk targets,
more to be added.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-08-23 14:44:44 +00:00
Vinayak Kariappa Chettimada
e80ff5ff7a samples: Bluetooth: Refactor observer for bsim test reuse
Refactor the observer sample so that it can be reused as
bsim test to verify Extended advertisement chaining.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-08-23 16:21:00 +02:00
Vinayak Kariappa Chettimada
a5e62b09c4 samples: Bluetooth: Refactor broadcaster multiple for bsim test reuse
Refactor the broadcaster multiple sample so that it can be
reused as bsim test to verify Extended advertisement
chaining.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-08-23 16:21:00 +02:00
Vinayak Kariappa Chettimada
40115f5d62 samples: Bluetooth: Add Extended Scanning support to Observer sample
Added implementation to Observer sample so that when
Extended Advertising feature is enabled, it can receive
Extended Advertising Reports, and hence receive long AD
data from peer Extended Advertising Broadcaster Multiple
sample.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-08-23 16:21:00 +02:00
Vinayak Kariappa Chettimada
4fd7eb2193 samples: Bluetooth: Multiple Broadcaster
Added Extended Advertising multiple advertising set
broadcaster sample.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-08-23 16:21:00 +02:00
Carles Cufi
4c26b8518e modules: liblc3: Rename the module for consistency
The old project, liblc3codec, is not used anymore. Rename the Zephyr
module name, folders, and Kconfig options based on the new name, liblc3.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-22 20:40:59 +02:00
Gerard Marull-Paretas
a202341958 devices: constify device pointers initialized at compile time
Many device pointers are initialized at compile and never changed. This
means that the device pointer can be constified (immutable).

Automated using:

```
perl -i -pe 's/const struct device \*(?!const)(.*)= DEVICE/const struct
device *const $1= DEVICE/g' **/*.c
```

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-22 17:08:26 +02:00
Gerard Marull-Paretas
aa0a7dfa92 samples: task_wdt: improve device usage
When no hardware device is available, set WDT_NODE to DT_INVALID_NODE.
Also switch to a single initializer using DEVICE_DT_GET_OR_NULL so that
we can constify the pointer.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-22 17:08:26 +02:00
Francois Ramu
e195c3cad3 samples: drivers: adc running on the stm32U575 nucleo board
This change creates an overlay file so that the adc sample
is running on the nucleo_u575zi_q board.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-08-22 10:23:53 +00:00
Piotr Pryga
34438da58e samples: Bluetooth: df: Add use of 16 bits wide IQ sampels
Change implementation of cte_recv_cb to print information about IQ
samples type. The changed code is ready for use of 8 bits and 16 bits
signed integer IQ samples. User has sample level option to enable
printing IQ samples.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-08-19 16:26:10 +02:00
Kumar Gala
de894f8aab dts: Replace DT_LABEL(node) with DT_PROP(node, label)
Toward deprecated DT_LABEL() macro, replace the handful of cases
that use DT_LABEL(node) with DT_PROP(node, label).

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-19 06:49:50 -05:00
Carlo Caione
e05c4b0a92 s2ram: Deal with system off failure
Some platforms have the possibility to cancel the powering off until the
very latest moment (for example if an IRQ is received). Deal with this
kind of failures.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-08-19 12:10:25 +02:00
Adam Zelik
65663516e1 samples: boards: nrf: ieee802154: Remove RTC user channel count setting
Setting CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT here is unnecessary
as the value needed is equal to the default.

Signed-off-by: Adam Zelik <adam.zelik@nordicsemi.no>
2022-08-19 12:08:59 +02:00
Mariusz Skamra
6219c12035 Bluetooth: csis: Expose bt_csis_generate_rsi function
The function will be used to update the RSI value. The returned value
can be later used in advertisement data for set identification. This
removes the need of specific bt_csis_advertise function so that the user
can call the API to generate new RSI once needed (e.g. on RPA change).
This allows the user to manage the advertisement data to fit it's needs.

< HCI Command: LE Set Extended Advertising Enable (0x08|0x0039) plen 6
        Extended advertising: Disabled (0x00)
        Number of sets: 1 (0x01)
        Entry 0
          Handle: 0x00
          Duration: 0 ms (0x00)
          Max ext adv events: 0
> HCI Event: Command Complete (0x0e) plen 4
      LE Set Extended Advertising Enable (0x08|0x0039) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Extended Advertising Data (0x08|0x0037) plen 33
        Handle: 0x00
        Operation: Complete extended advertising data (0x03)
        Fragment preference: Minimize fragmentation (0x01)
        Data length: 0x1d
        Flags: 0x06
          LE General Discoverable Mode
          BR/EDR Not Supported
        Unknown EIR field 0x2e: 16e61d64dc45
        Name (complete): audio test shell
> HCI Event: Command Complete (0x0e) plen 4
      LE Set Extended Advertising Data (0x08|0x0037) ncmd 1
	Status: Success (0x00)
< HCI Command: LE Set Advertising Set Random Address (0x08|0x0035) plen 7
        Advertising handle: 0x00
        Advertising random address: 4E:21:29:F8:94:93 (Resolvable)
> HCI Event: Command Complete (0x0e) plen 4
      LE Set Advertising Set Random Address (0x08|0x0035) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Extended Advertising Enable (0x08|0x0039) plen 6
        Extended advertising: Enabled (0x01)
        Number of sets: 1 (0x01)
        Entry 0
          Handle: 0x00
          Duration: 0 ms (0x00)
          Max ext adv events: 0
> HCI Event: Command Complete (0x0e) plen 4
      LE Set Extended Advertising Enable (0x08|0x0039) ncmd 1
        Status: Success (0x00)

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-08-19 12:07:31 +02:00
Gerard Marull-Paretas
e0125d04af devices: constify statically initialized device pointers
It is frequent to find variable definitions like this:

```c
static const struct device *dev = DEVICE_DT_GET(...)
```

That is, module level variables that are statically initialized with a
device reference. Such value is, in most cases, never changed meaning
the variable can also be declared as const (immutable). This patch
constifies all such cases.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Gerard Marull-Paretas
dee062bf0b samples: usb: audio: initialize devices at compile time
Initialize devices at compile time, allowing to constify device pointer.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Gerard Marull-Paretas
b84da98b6e samples: net: wpan_serial: initialize devices at compile time
Initialize devices at compile time so that device pointers can be
constified.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Gerard Marull-Paretas
a74ee417bd samples: net: gsm_modem: initialize devices at compile time
Initialize devices at compile time so that device pointers can be
constified.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Gerard Marull-Paretas
87d3bb857a samples: ipc: initialize devices at compile time
Initialize devices at compile time so that device pointers can be
constified.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Gerard Marull-Paretas
af61ed61f5 samples: drivers: ps2: fix test issues
- Test effectively requires a microchip,xec-ps2, but it was "optional"
  even though the test continued setting up a callback that makes use of
  the device.
- Improve test filtering so that it requires a valid compatible to be
  enabled (allows to delete redundant ps2 tag)
- Initialize device at compile time (allowing to constify its pointer)

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Gerard Marull-Paretas
14968b4f0f samples: drivers: peci: improve test
- Require peci-0 alias (test without it is pointless)
- Initialize peci device at compile time
- Filter depending on alias
- Remove redundant peci tag

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Gerard Marull-Paretas
86b5517f99 samples: drivers: espi: initialize devices at compile time
Initialize devices at compile time so that device pointers can be
constified.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Gerard Marull-Paretas
e4e85d3fa2 samples: boards: stm32: usbc: initialize devices at compile time
Initialize ADC device at compile time, allowing to constify the device
pointer.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Gerard Marull-Paretas
a11848fc32 samples: boards: stm32: serial_wakeup: fix device usage issues
Device ready check was wrong (< 0 ?!), so fix it. Also drop static
qualifier for the device variable (not needed) and initialize at
definition time.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Gerard Marull-Paretas
7fc33f9d47 samples: boards: reel_board: mesh_badge: initialize epd at compile time
Initialize epd device at compile time, so we can constify epd device
pointer.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Gerard Marull-Paretas
f1442c8bcc samples: boards: 96b_argonkey: sensor: init device at compile time
Initialize device at compile time so that device pointer can be
constified.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Henrik Brix Andersen
590cd5cb72 drivers: can: rename can_state enumerations
Rename the can_state enumerations to contain the word STATE to make their
meaning more clear:
- CAN_ERROR_ACTIVE  => CAN_STATE_ERROR_ACTIVE
- CAN_ERROR_WARNING => CAN_STATE_ERROR_WARNING
- CAN_ERROR_PASSIVE => CAN_STATE_ERROR_PASSIVE
- CAN_BUS_OFF       => CAN_STATE_BUS_OFF

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-08-18 21:41:11 +00:00
Hu Zhenyu
424668f5a7 tests: mec15xxevb_assy6853: Enlarge the IDLE_STACK_SIZE from 256 to 512
The test case "samples/boards/mec15xxevb_assy6853/power_management" could
always pass until commit 5f60164 was merged in. This patch changes the sem
take timeout value from 50ms to forever of the log thread, it will make the
idle thread run longer and takes more stack memory. Analyzed the coredump
of the failed test case, it can be found that the test case stucks at
z_idle_stacks. The test case used default CONFIG_IDLE_STACK_SIZE = 256 in
kernel/Kconfig, now we increase the value to 512 in prj.conf for this test
only. With this change, the test case can pass with the commit of 5f60164.
Fixes #47987

Signed-off-by: Hu Zhenyu <zhenyu.hu@intel.com>
2022-08-18 21:38:56 +00:00
Daniel Leung
ee40548788 samples: condvar: extra stack space for custom threads
When coverage is enabled, some boards require more stack space
for the custom threads created in main(). Since this "samples"
already has CONFIG_TEST enabled, we can pad the stack size
with CONFIG_TEST_EXTRA_STACK_SIZE.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-08-18 17:23:18 +02:00
Emil Gydesen
a301afca93 samples: Bluetooth: Restrict Audio TX length to SDU for unicast audio
Restrict the unicast audio samples to not send more data than
the configured SDU.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-08-18 12:33:44 +02:00
Måns Nilsson
1acd4bf422 samples: add support for optimized CMSIS-NN kernels
Updates tflite-micro sample hello_world to use CMSIS-NN optimized
kernels. This is also documented in the corresponding README file.

Signed-off-by: Måns Nilsson <mans.nilsson@arm.com>
2022-08-18 12:26:51 +02:00
Henrik Brix Andersen
27eb12ed48 net: socketcan: decouple SocketCAN and CAN controller headers
Decouple the zephyr/net/socketcan.h and zephyr/drivers/can.h header files
by moving the SocketCAN utilities to their own header.

This is preparation for including the SocketCAN types defined in
socketcan.h in a native posix (Linux) SocketCAN driver context without name
clashes.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-08-18 10:19:29 +02:00
Henrik Brix Andersen
d1d48e8304 net: socketcan: rename SocketCAN header from socket_can.h to socketcan.h
Rename the SocketCAN header from socket_can.h to socketcan.h to better
match the naming of the functionality.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-08-18 10:19:29 +02:00
Henrik Brix Andersen
b40a8cb9fd net: socket: can: rename utility functions
Rename the SocketCAN utility functions to reflect the new naming of the CAN
controller API and SocketCAN API data types.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-08-18 10:19:29 +02:00
Henrik Brix Andersen
13c75417ba drivers: can: remove z prefix from public CAN API types
Remove the "z" prefix from the public CAN controller API types as this
makes them appear as internal APIs.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-08-18 10:19:29 +02:00
Henrik Brix Andersen
d159947443 net: socket: can: prepend SocketCAN data types with socketcan
Rename the SocketCAN data types to "socketcan_*" in preparation of renaming
the low-level CAN controller API data types.

This breaks the naming compatibility with the similar SocketCAN data types
from the Linux kernel, but Zephyr and Linux SocketCAN are not 100%
compatible anyways (only the structure fields are compatible, extended
functionality such filtering, error reporting etc. are not).

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-08-18 10:19:29 +02:00
Maureen Helm
4dfc43e296 samples: sensor: Fix displayed gyro units in lsm6dso sample
The sensor driver API specifies gyroscope units in radians/second, not
degrees/second. Fix the lsm6dso sample application printk string to
display the correct units.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-08-17 17:06:23 +02:00
Katarzyna Giadla
eae01f0fc5 samples: tests: Rename duplicated testcases
Names of some testcases are duplicated in another files.
This change rename duplicated testcases.

Signed-off-by: Katarzyna Giadla <katarzyna.giadla@nordicsemi.no>
2022-08-17 12:11:00 +02:00
Marcin Niestroj
af37c09440 modules: mbedtls: convert mbedTLS log levels to Zephyr log levels
So far LOG_DBG() was used inside debug hook for mbedTLS library. This meant
that it was hard to distinct log messages by simply looking at the log
level number, even though Zephyr logging subsystem supports colorful logs
depending on log level.

Choose an appropriate Zephyr LOG_*() macro based on log level coming from
mbedTLS library. Remove log level number from formatted log messages, as it
is now redundant.

One controversial thing about this change is that mbedTLS' "2 State change"
log level is mapped to Zephyr's "warning" log level. Those are not really
warnings in real life, but rather informational messages. However, using
"warning" log level for those allows to clearly distinguish between "2
State change" and "3 Informational" debug messages from mbedTLS.
Additionally, mbedTLS debug message implementation does not seem to be safe
to use in production, so keeping in mind MBEDTLS_DEBUG will be enabled just
during debugging phase, printing "2 State change" logs as warnings should
not be a big deal.

Set default MBEDTLS_DEBUG_LEVEL value depending on selected Zephyr logging
module level, so that only single option needs to be configured in
application project.

Remove prompt for MBEDTLS_DEBUG_LEVEL, so that interactively (e.g. via
menuconfig) adjusting MBEDTLS_LOG_LEVEL will always result in automatically
updating MBEDTLS_DEBUG_LEVEL option. This is to prevent so called "stuck
symbol syndrome".

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-08-17 12:03:52 +02:00
Tim Cooijmans
ea80d9e1d7 samples: drivers: lora: Add public_network and iq_inverted config
Explicitly set the newly add public_network and iq_inverted settings
in lora_modem_config in the lora send and receive samples.

Signed-off-by: Tim Cooijmans <timcooijmans@gmail.com>
2022-08-16 18:06:18 +02:00
Felipe Neves
d94dc98fd6 soc: xtensa: esp32_net: fixes include paths
that were changed with zephyr prefix  after rebasing.
Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2022-08-16 18:06:02 +02:00
Felipe Neves
d808fa2c6d samples: drivers: ipm_esp32: add return
when ipm driver initialization fails.

Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2022-08-16 18:06:02 +02:00
Felipe Neves
a5379b71f8 drivers: ipm: ipm_esp32: remove hardcoded nodelabels
by making shared memory property  of IPM binding.

Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2022-08-16 18:06:02 +02:00
Felipe Neves
0e17b8307a samples: drivers: ipm: added esp32 sample
code to demonstrate the utilization of assymetric
dual core infrastructure based on soft-IPM implementation.

Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2022-08-16 18:06:02 +02:00
Manuel Arguelles
7f26c1c25c tests: samples: revert timeout change for FVP BaseR
Partially revert commit 0028e9733295316d152eba07bf56677d83f4b1b5.
Timeout for tests/posix/common must be still increased for slow
platforms (previously was 120 sec).

Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
2022-08-16 15:51:38 +02:00
Kumar Gala
1ddcb3ab02 ethernet: remove defconfig/proj setting of ethernet drivers
Now that ethernet drivers are enabled based on devicetree we can
remove any cases of them getting enabled by proj.conf files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-15 14:32:45 +02:00
Thomas Stranger
daa477f75b samples/tests: w1: remove overlays after moving to 'select bus'
Because 1-wire drivers no longer use depends on serial/i2c, but select
the Kconfig for the bus they depend on, several overlays can be removed.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-08-14 09:08:19 -05:00
Kumar Gala
632069b3de video: remove defconfig/proj setting of video drivers
Now that video drivers are enabled based on devicetree we can
remove any cases of them getting enabled by proj.conf files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-14 09:05:36 -05:00
Kumar Gala
d8e6aed92f audio: remove defconfig/proj setting of audio drivers
Now that audio drivers are enabled based on devicetree we can
remove any cases of them getting enabled by proj.conf files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-14 09:05:09 -05:00
Kumar Gala
8eead50071 manifest: Update lvgl
Update lvgl for devicetree updates to use zephyr,keyboard-scan.

Remove Kconfig symbol (LV_Z_POINTER_KSCAN_DEV_NAME) that don't exist
anymore since these values are coming from devicetree.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-12 17:54:03 -05:00
Kumar Gala
5ac8fca9cb kscan: Introduce zephyr,keyboard-scan chosen prop
Introduce zephyr,keyboard-scan chosen node property to point to the
node that implements the default KSCAN device.  This is similar to
the zephyr,display property.

We switch over the samples to utilize the new property instead of
kscan0 alias.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-12 17:54:03 -05:00
Kumar Gala
5281b58d29 samples: espi: disable SAF testing
espi saf node is not enabled in mec15xxevb_assy6853.dts so the sample
will fail to build.  For now disable CONFIG_ESPI_SAF to get the sample
to build.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-12 17:59:05 +02:00
Kumar Gala
9e8fb08c0f eeprom: remove defconfig/proj setting of eeprom drivers
Now that eeprom drivers are enabled based on devicetree we can
remove any cases of them getting enabled by proj.conf files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-12 11:34:16 +02:00
Erwan Gouriou
f5378424f7 samples: boards: stm32: Add a serial wakeup sample
Add a sample to demonstrate use of (LP)U(S)ART with wakeup capability
This sample is provided with 2 configurations
- nucleo_wb55rg: Basic configuration that could be exercised in CI
- stm32l562e_dk: "Full feature" configuration that require some set up
configuration (be able to display console from lpuart) and allows to
achieve lowest power consumption.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-08-12 08:51:38 +01:00
Johann Fischer
9a1b990006 modbus: remove label property from devicetree overlays
Remove label property from devicetree overlays.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-08-11 09:39:24 -07:00
Johann Fischer
46a0e5347d modbus: remove the use of DT_INST_LABEL and DT_PROP(inst, label)
Although it is possible to simply use the interface number,
it has proven convenient to use the names for the interfaces
in the samples.

Migrate to DEVICE_DT_NAME().

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-08-11 09:39:24 -07:00
Francois Ramu
8ec02948c5 samples: drivers: watchdog application running on stm32 boards
Adding configuration to run the watchdog sample application
on the stm32 boards through 2 common overlay files:
one for running on the IWDG one for WWDG, if compatible.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-08-11 17:47:05 +02:00
Kumar Gala
0e1a7e0241 drivers: led: Remove unnecessary Kconfig settings
Having the LED device enabled in devicetree will now get the driver
enabled by default when CONFIG_LED=y is set.  So we can remove
setting driver enabling Kconfig values in various .conf files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-11 17:46:43 +02:00
Kumar Gala
6de4cc5293 samples: i2s: echo: exclude litex_vexriscv
The litex platform has its own sample and echo sample does not
build on litex_vexriscv so exclude it.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-11 12:20:33 +02:00
Hang Fan
7bc54c168f samples: bluetooth: set available contexts for unicast audio server
set available contexts for unicast audio server

Signed-off-by: Hang Fan <fanhang@xiaomi.com>
2022-08-10 16:10:48 +02:00
Krzysztof Frydryk
8dd57467cc drivers: dai: Enable Zephyr runtime power mgmt in Intel SSP driver
Enable Zephyr device runtime power management mechanisms in Intel SSP
driver. This allows Zephyr to track usage reference for power
domain gating.

Signed-off-by: Krzysztof Frydryk <krzysztofx.frydryk@intel.com>
2022-08-10 11:58:45 +02:00
Gerard Marull-Paretas
e2e9155dd5 boards: remove unused tag from supported list
All IEEE 802.15.4 tests/samples use DT-based filter now, so the
ieee802154 tag can be deleted.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-10 11:57:34 +02:00
Gerard Marull-Paretas
b74a22924e net: lib: config: remove NET_CONFIG_IEEE802154_DEV_NAME
Remove NET_CONFIG_IEEE802154_DEV_NAME in favor of DT based choice using
zephyr,ieee802154.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-10 11:57:34 +02:00
Gerard Marull-Paretas
b27f89342f samples: net: sockets: echo_(client|server): remove IEEE802154_DEV_NAME
Remove usage of CONFIG_NET_CONFIG_IEEE802154_DEV_NAME as it now works
with DT based choice.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-10 11:57:34 +02:00
Gerard Marull-Paretas
5b224055ba samples: net: openthread: coprocessor: remove Kconfig IEEE802154 choice
Remove Kconfig choice for IEEE802154. In this case, there's no in-tree
board, so there's no overlay or board to be updated.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-10 11:57:34 +02:00
Gerard Marull-Paretas
ec05fa81ff samples: net: wpan(usb|serial): filter based on zephyr,ieee802154
Rely on zephyr,ieee802154 choice being enabled for the samples.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-10 11:57:34 +02:00
Gerard Marull-Paretas
f0dab27dd8 samples: net: wpan_serial: use zephyr,ieee802154
Use the choisen zephyr,ieee802154 from DT as
CONFIG_NET_CONFIG_IEEE802154_DEV_NAME is being phased out.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-10 11:57:34 +02:00
Gerard Marull-Paretas
96c33ad2cb samples: net: wpanusb: use zephyr,ieee802154
Use the choisen zephyr,ieee802154 from DT as
CONFIG_NET_CONFIG_IEEE802154_DEV_NAME is being phased out.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-10 11:57:34 +02:00
Robert Lubos
2091b34820 net: zperf: Extract zperf into library
Make a library out of the zperf shell sample. This makes to enable the
module in any application, not only the dedicated sample.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-08-10 11:15:21 +02:00
Joakim Andersson
c51505f661 modules: tfm: Exclude non-secure TF-M application from build
Exclude the non-secure TF-M application from being built by TF-M.
This also stops the building of the tfm_ns_api library that we were
linking against.
This library is defined by the tf-m regression tests.
Add the installed interface source files exported by the TF-M build
system compile them in the zephyr build system.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-08-09 13:59:02 +02:00
Daniel DeGrasse
b896826cab samples: gptp: increase number of ethernet RX buffers for RT1050/1060
RT1050 and RT1060 were selecting an invalid number of RX/TX buffers
(below the allowed default). Raise this value for the gptp sample.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-08-09 12:29:18 +02:00
Daniel DeGrasse
21d9ffaf66 samples: zperf: enable hardware acceleration for RT1050/RT1060
enable hardware acceleration of ethernet checksum calculation for
RT1050 and RT1060

Performance change (as tested with iperf on RT1050)
TCP RX: 50.6Mbps->52.4Mbps
TCP TX: 49.5Mbps->50.2Mbps

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-08-09 12:29:18 +02:00
Daniel DeGrasse
929db1ba65 samples: zperf: use systick timer for RT1050
Use systick timer for RT1050 to provide better performance than low
frequency GPT timer

Performance change (as tested with iperf on RT1050)
TCP RX: 49.1Mbps->50.8Mbps
TCP TX: 40.8Mbps->46.2Mbps

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-08-09 12:29:18 +02:00
Kumar Gala
63769bd1c1 drivers: display: Remove unnecessary Kconfig settings
Have the display enabled in devicetree will now get the driver
enabled by default when CONFIG_DISPLAY=y is set.  So we can remove
setting driver enabling Kconfig values in various .conf and
defconfig files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-09 12:27:44 +02:00
Maureen Helm
17437f9dc5 samples: sensor: Remove adxl372 accelerometer sample
The accel_polling sample application supports the adxl372 driver, so we
can remove this redundant driver-specific sample.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-08-09 12:27:07 +02:00
Maureen Helm
5306db05af samples: sensor: Remove adxl362 accelerometer sample
The accel_polling sample application supports the adxl362 driver, so we
can remove this redundant driver-specific sample.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-08-09 12:27:07 +02:00
Glauber Maroto Ferreira
7a58522b54 esp32: counter: samples: fix build config
Remove unnecessary build config and rename
Kconfig build variable.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-08-08 13:00:38 -05:00
Georgios Vasilakis
eeb970ebba samples: tfm_integration: tfm_regression_test Default to isol level 2
This defaults the TF-M regression tests to isolation level 2.
It is set in order to showcase a more secure configuration
by default. The default behavior of the sample is changed in
the prj.conf file. The yaml file which includes the test cases
enables testing for the three configurations: the library mode,
the IPC mode isolation level 1 and the IPC mode isolation level 2.

Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
2022-08-08 14:17:53 +02:00
Pirun Lee
5d1e59b984 bluetooth: ots: fix stack overflow
Default size of BT_RX_STACK_SIZE 1024 is not enough for this sample.
Increase it to prevent stack overflow.

Signed-off-by: Pirun Lee <pirun.lee@nordicsemi.no>
2022-08-08 14:16:26 +02:00
Kumar Gala
6986cb5b7d samples: nrf53_sync_rtc: drop IPM support
Nordic platform utilizes mailbox so remove the IPM support
from this sample.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-08 10:52:10 +02:00
Kumar Gala
daf7609cb7 boards: arm: nrf5340: Drop RPMSG service configuration
The preferred ipc service on NRF platforms is ipc_service.  Remove
configuration for rpmsg_service and just utilize ipc_service.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-08 10:41:55 +02:00
Reto Schneider
1c1801ee7f drivers: eeprom: Fix format strings
Building for native_posix_64 exposes faulty format strings.

Changes in this commit also ensure that the shell code gets built in CI,
thus this kind of problem can not be introduced again later on.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2022-08-07 14:29:36 +01:00
Kumar Gala
aaaed30071 samples: openamp_performance: remove sample
Remove sample as its only supported on one platform, should really
utilize the ipc subsystem, and so forth.

For now its better to drop it and when we have something better we
can add that.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-05 15:16:47 +02:00
Gerard Marull-Paretas
61361e870b kconfig: remove redundant IEEE 802.15.4 defaults or selections
All IEEE 802.15.4 drivers are now automatically enabled if they are
'okay' in DT and all of its dependencies are 'y', including
CONFIG_IEEE802154. This means individual driver enablement is not
necessary anymore in Kconfig.defconfig files or samples/tests. Boards
need to still make sure any dependencies are enabled, e.g. SPI bus in
some cases.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-05 12:56:47 +02:00
Gerard Marull-Paretas
cb448591ed samples: modules: tflite-micro: magic_wand: add missing CONFIG_I2C=y
The magic_want sample requires I2C bus to be enabled (used sensor is
connected to the bus).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-05 12:55:51 +02:00
Gerard Marull-Paretas
c26d7259f8 samples: drivers: lcd_cyclonev_socdk: add missing CONFIG_I2C=y
The sample relies on using I2C API, so it must enable CONFIG_I2C.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-05 12:55:51 +02:00
TOKITA Hiroshi
4c326ea5da samples: sensor: accel_polling: Correct integration platform name
bl5340_dvk is a non-exists target.
I fix it to bl5340_dvk_cpuapp to fix the CI error.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2022-08-05 00:00:09 +09:00
TOKITA Hiroshi
9179350c40 samples: sensor: Add 3-Axis accelerometer polling sample
Add a polling sample for 3-Axis accelerometers.
This sample demonstrates how to data fetch and print to the console.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2022-08-04 09:06:57 -05:00
Kumar Gala
e6357ae160 samples: openamp: Convert to use DEVICE_DT_GET
Update sample to use DEVICE_DT_GET to remove usage of
device_get_binding.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-04 08:38:54 -05:00
Troels Nilsson
745cc6d099 samples: bluetooth: Update central_multilink to support ext. adv.
Small update to have the central_multilink sample work correctly
with extended advertising (when enabled)

Signed-off-by: Troels Nilsson <trnn@demant.com>
2022-08-04 13:45:17 +02:00
Juha Heiskanen
43c8bfb3e5 samples: net: lwm2m_client: Updated RD client event handler
Added missed LWM2M_RD_CLIENT_EVENT_ENGINE_SUSPENDED event handler

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2022-08-04 13:42:55 +02:00
Gerard Marull-Paretas
e6a345f967 drivers: ieee802154: uart_pipe: make driver DT-based
Use Devicetree to describe the UART UPIPE IEEE 802.15.4 driver. This
allows to remove usage of IEEE802154_UPIPE_DRV_NAME in preparation for
the removal of NET_CONFIG_IEEE802154_DEV_NAME.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-04 13:25:35 +02:00
Aastha Grover
5d23d4f4a6 samples: kernel: metairq: Update ReadMe
Update ReadMe for metairq sample application.

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
2022-08-03 14:00:22 -05:00
Gerard Marull-Paretas
44250fe3d3 soc: arch: synopsys: move timer0/1 IRQ information to DT
timer0/1 IRQ information was hardcoded in soc.h, however, Devicetree is
nowadays a better place to describe hardware. Note that I have followed
existing upstream Linux code to do these changes.

Ref.
- https://elixir.bootlin.com/linux/latest/source/arch/arc/boot/dts/
  hsdk.dts
- https://elixir.bootlin.com/linux/latest/source/Documentation/
  devicetree/bindings/timer/snps,arc-timer.txt

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-03 07:46:14 -04:00
Anas Nashif
31e0d86484 samples: do not use CONFIG_TEST_EXTRA_STACK_SIZE
samples should not use CONFIG_TEST_EXTRA_STACK_SIZE, instead, they
should set the recommended stack size directly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-08-03 11:22:20 +02:00
Veijo Pesonen
ebaf501de9 samples: net: lwm2m: overlay for interop testing
For further details about interoperability testing please see

   * https://lwm2m.openmobilealliance.org/ - Test V1.1 12-Sep-2019

Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
2022-08-03 11:20:50 +02:00
Robert Lubos
7a626bfd2c samples: net: sockets: packet: Wait for the interface to come up
Make sure that the network interface is up before running the sample.
Otherwise, the sample could stop rightaway due to send failure.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-08-03 11:11:55 +02:00
Robert Lubos
189964ae1b samples: net: sockets: packet: Make sure all sockets are closed on exit
First off, fix the FD check when closing a socket - currently not all
sockets were closed on exit (0 is also a valid file descriptor).

Second issue is the use of k_thread_abort() on tx/rx threads. The
receving thread was blocked in recv(), and aborting its thread prevented
it from ending gracefully (i. e. the socket mutex allocated in recv()
was not released as the function did not exit properly). This resulted
on a consecutive `close()` call lock. Fix this by setting a timeout on a
receiving socket, and instead of aborting threads allowing them to exit
gracefully.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-08-03 11:11:55 +02:00
Fabio Baltieri
def230187b test: fix more legacy #include paths
Add a bunch of missing "zephyr/" prefixes to #include statements in
various test and test framework files.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-08-02 16:41:41 +01:00
Dominik Ermel
63c2347207 samples/nvs: Switch flash_area_offset to use STORAGE_NODE_LABEL
The sample has been defining STORAGE_NODE_LABEL to be used
to point to storage partition, but flash_area_offset has still
been using "storage" directly.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-08-02 15:18:19 +02:00
Piotr Pryga
a0a8a12642 Bluetooth: hci: Use extended VS fatal error in hci and hci_rpmsg sample
Provide common helper functions to create extended extended Zephyr
Fatal Error functionality in HCI common code.

Use the implementation in hci_rpmsg sample.

The sample didn't provide an information about Controllers assert
or system fatal error to an application code while run with nRF5340
SoC. The goal for hci_rpmsg sample change is to enhance user experience
for conformance testing of the Bluetooth Controller while executed with
nRF5340.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-08-02 13:53:32 +02:00
Emil Gydesen
404d0c7a6e samples: Bluetooth: Unicast audio server set location
The unicast audio server sample did not set a location value,
and would report an invalid value of 0 when read.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-08-01 18:11:26 +01:00
Mariusz Skamra
acb9da2ba0 Bluetooth: samples: Add HAP Hearing Aid sample application
This adds sample application that can be used as reference
implementation and for HAP qualification purposes.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-08-01 18:10:34 +01:00
Hake Huang
cedc99b8ed samples: application_development: remove the code_relocation sample
covert this sample to a test cases

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2022-08-01 18:09:28 +01:00
Benjamin Björnsson
e172b1dbda debug: gdbstub: Move to DTS for uart device
Move from using Kconfig GDBSTUB_SERIAL_BACKEND_NAME to a devicetree
chosen property ("zephyr,gdbstub-uart"). This is similar to a number
of other functions like "zephyr,shell-uart" or "zephyr,bt-uart".

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-08-01 09:09:45 -07:00
Kumar Gala
346ac6b896 samples: Remove label property from devicetree overlays
"label" properties are not required.  Remove them from samples.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-01 17:59:32 +02:00
Caspar Friedrich
f2a7b88ef5 samples: Add 1-Wire scanner example
This adds a simple example to show basic 1-Wire bus operations

Signed-off-by: Caspar Friedrich <c.s.w.friedrich@gmail.com>
2022-08-01 10:33:10 +02:00
Dominik Ermel
21f1c54089 samples/soc_flash_nrf: Fix flash device reference
Sample has been referencing flash area by its label, but flash device
by chosen `zephyr,flash-controller`, while flash area does not have
to be positioned on a device selected by the chosen directive.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-07-30 08:26:21 -05:00
Pieter De Gendt
7256a19056 samples: modules: nanopb: Limit the integration platforms
Reduce the number of build tests by explicitly setting the
integrations platforms.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-07-29 13:35:48 -04:00
Kumar Gala
2014c59d20 clock_control: remove defconfig/proj setting of clock control drivers
Now that clock control drivers are enabled based on devicetree we
can remove any cases of them getting enabled by *defconfig and
proj.conf files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-29 14:12:12 +02:00
Kumar Gala
930f56baef samples: tracing: Add filter for uart tests
Add a filter to make sure devicetree chosen node has
property 'zephyr,tracing-uart' set in it.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-29 05:57:54 -04:00
Kumar Gala
3c9932ddf8 samples: tracing: make example in readme work
Add mps2_an521.overlay so that the example in the README.txt will
actually build.  Update README.txt to document needing to have
'zephyr,tracing-uart' property set under chosen node in devicetree.

Fixes #48416

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-29 05:57:54 -04:00
Aastha Grover
66786ed612 samples: Add missing sample.yaml
Adding the yaml files to sub-applications to avoid bitrot and
specifying the main applications with remote harness instead of
build_only.

Fixes #47613

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
2022-07-28 20:51:14 +02:00
Kumar Gala
add2b28a3b samples: 96b_argonkey: Have README match actual code
Update README.rst code snippet to match what the actual code
was doing.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-28 08:50:27 -05:00
Emil Gydesen
d4b132a059 Bluetooth: Audio: Unicast client read available contexts
Read the available contexts during discovery and subscribe
for notifications.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-07-28 08:29:29 +02:00
Francois Ramu
8aa3960874 samples: drivers flash add a test case for stm32h7 octospi
This add a removes the SPI config
for the stm32H735 and stm32H7b3 disco boards
when testing the octoSPI.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-07-27 18:46:25 +02:00
Kumar Gala
fb9c241530 spi: remove defconfig/proj setting of SPI drivers
Now that SPI drivers are enabled based on devicetree we can remove
any cases of them getting enabled by *defconfig and proj.conf files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-27 09:49:00 +02:00
Håvard Reierstad
a68e52d848 samples: bluetooth: mesh_provisioner: push button to provision
In order to keep a flashed sample from provisioning forever, the sample
requires the user to press a button to provision a detected device.

The feature is only enabled if the board has a push button connected
via GPIO.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2022-07-27 09:46:39 +02:00
Dominik Ermel
3d64a0df6a samples: reel_board: mesh_badge: Select flash controller by area
Flash controller has been specified by `zephyr,flash-controller`
chosen DTS, which does not have to be the same controller as
a flash area exists on.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-07-26 14:10:16 -05:00
Alexandre Bourdiol
2495a06f1a samples: subsys: nvs: disco_l475_iot1: keep quadspi node
Due to introduction of alias spi-flash0
sha1: 64fbbd9a44
it is necessary to keep quadspi node
Instead of removing quadspi node, remove storage_partition node

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2022-07-26 14:34:17 +00:00
Kumar Gala
46850a12d3 samples: lwm2m_client: Fix building on native_posix
Sample code uses GPIO api's but wasn't enabling CONFIG_GPIO.  So
on native_posix this would cause the sample to not build.  Add
CONFIG_GPIO=y to prj.conf to fix this.

Fixes #48306

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-26 14:33:18 +00:00
Anas Nashif
ae8c4a934e samples: move sof under samples/modules
This is not a sample of an audio subsystem in zephyr, it is a sample
that completely depends on sof and its audio support.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-25 14:41:37 -04:00
Kumar Gala
5d36157c7c sensors: Remove unnecessary Kconfig setting of sensors
Sensor Kconfig sybmols should be enabled if CONFIG_SENSOR=y
and the devicetree node for the sensor is enabled.  We can
remove explicitly enabling specific sensor drivers in .conf
files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-25 15:18:56 +02:00
Carlo Caione
780ee52bde samples: Add missing READMEs
Add some missing README.rst

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-25 15:17:48 +02:00
Carlo Caione
ecdf224766 samples: Specify the remote harness
Instead of 'build_only'.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-25 15:17:48 +02:00
Carlo Caione
badafa59c5 samples: Add missing sample.yaml
Some samples are missing the sample.yaml file.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-25 15:17:48 +02:00
Kumar Gala
ef964ca4e1 samples: th02: simplify sample and use DEVICE_DT_GET_ONE
Update sample to use DEVICE_DT_GET_ONE to remove usage of
device_get_binding.  Additionally simplfy the sample to
just access a single TH02 device.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-25 09:39:51 +02:00
Benjamin Björnsson
e81c0b07e2 samples: subsys: mgmt: updatehub: Update sample to use DEVICE_DT_GET_ONE
Update sample to use DEVICE_DT_GET_ONE in order to remove DT_INST
usage.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-24 14:33:15 -05:00
Benjamin Björnsson
6ede1da434 samples: drivers: led_pwm: Update driver to remove DEVICE_DT_GET
Update driver to use DEVICE_DT_GET and remove usage of DT_INST.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-23 11:39:11 -05:00
Kumar Gala
6b5ae7799a samples: fpga: Convert to test to use use DEVICE_DT_GET
Update sample to use DEVICE_DT_GET to remove usage of
device_get_binding.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-23 09:28:40 -05:00
Kumar Gala
f2bcc794cd mgmt: osdp: Move to DTS for uart device
Move from using Kconfig OSDP_UART_DEV_NAME to a devicetree
chosen property ("zephyr,osdp-uart").  This is similar to a number
of other functions like "zephyr,shell-uart" or "zephyr,bt-uart".

Changed the integration platform for the osdp samples to
stm32_min_dev_black as it already has zephyr,osdp-uart set.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-23 09:25:23 -05:00
Benjamin Björnsson
84649d2d83 samples: drivers: spi_flash: Update sample to use alias
Simplify driver by using DT_ALIAS instead of DT_LABEL.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-22 19:15:13 +00:00
Carlo Caione
d7f24b1743 sample: s2ram: Use harness remote
The sample requires a manual user interaction. Make CI skipping that by
requiring a remote harness (the user).

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-22 14:04:08 +00:00
Benjamin Björnsson
45cecadb35 samples: net: gsm_modem: Update sample to remove use of DT_INST
Simplify sample by removing usage of DT_INST.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-21 17:26:44 -05:00
Francois Ramu
31b9a6acc6 samples: usb: audio application uses static dev declaration
This change the applications to get device from the
compatible of the zephyr_udc0 node.
It is defined by the DTC_OVERLAY_FILE="app.overlay"

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-07-21 13:24:24 -05:00
Kumar Gala
894e8814af drivers: serial: rv32m1_lpuart: Remove unused Kconfig symbols
The driver has be DT_INST based for a while so the Kconfig
symbols CONFIG_UART_RV32M1_LPUART_<n> aren't used.  So lets
remove them.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-21 16:40:28 +00:00
Benjamin Björnsson
c8ba22f561 samples: sensor_batch_processing: Update sample to remove DT_INST
Update sample to use DT_COMPAT_GET_ANY_STATUS_OKAY in order to remove
DT_INST.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-21 14:01:55 +00:00
Kumar Gala
6cfaa9c381 samples: crypto: Convert to use Update sample to use DEVICE_DT_GET_ONE
Update sample to use DEVICE_DT_GET_ONE to remove usage of
device_get_binding if the device is devicetree based.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-21 14:00:38 +00:00
Benjamin Björnsson
5ad251b8d2 samples: sensor: tmp116: Update sample to remove use of DT_INST
Simplify sample by removing usage of DT_INST.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-21 08:28:29 -05:00
Benjamin Björnsson
706949cf71 samples: drivers: espi: Convert to use DT_NODELABEL
Convert to use DT_NODELABEL to remove usage of DT_INST in sample.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-21 06:06:02 -05:00
Benjamin Björnsson
2bed3950c3 samples: drivers: ht16k33: Update sample to remove use of DT_INST
Simplify sample by removing usage of DT_INST.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-21 05:31:57 -05:00
Fabio Baltieri
dd24c61a4a samples: fix shell_module Kconfig menu name
Shell sample has the wrong mainmenu name, rename it one that makes
sense.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-07-20 09:41:32 -05:00
Kumar Gala
60d3d49405 samples: boards: arc_secure_services: Remove empty prj.conf
We get the following error message from twister:

ERROR   - samples/boards/arc_secure_services/prj.conf:
          can't find: cannot mmap an empty file

Fix by removing the empty file.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-20 09:29:11 -05:00
Thomas Stranger
0cb7a1edcd samples/drivers/dac: add overlay file for nucleo_u575zi_q
Add overlayfile for the dac sample to use dac1_out1 on pa4.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-07-20 11:08:42 +02:00
Kumar Gala
dcfcd05ed3 tracing: Move to DTS for uart device
Move from using Kconfig TRACING_BACKEND_UART_NAME to a devicetree
chosen property ("zephyr,tracing-uart").  This is similar to a number
of other functions like "zephyr,shell-uart" or "zephyr,bt-uart".

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-19 16:00:47 -07:00
Benjamin Björnsson
93f71d6a8a samples: boards: nrf: battery: Remove uneccesary if-def
Remove if-def since io-channels is a required property of
the voltage-devider compatible so the else case won't happen.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-19 22:54:50 +00:00
Kumar Gala
c77035c61e samples: module: Remove label property from devicetree overlays
"label" properties are not required.  Remove them from samples.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-19 10:00:36 -07:00
Kumar Gala
6f5e75ba31 samples: usb: dfu: Fix building of sample on a few platforms
Fix building this sample on bl5340_dvk_cpuapp_ns and
pinnacle_100_dvk.  On these boards the NORDIC_QSPI_NOR
driver needs to be enabled for the sample to build.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-19 15:29:41 +00:00
Benjamin Björnsson
1f630f838a samples: drivers: watchdog: Update sample to use alias
Simplify sample by using DT_ALIAS to make the sample more generic.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-19 09:28:43 -05:00
Benjamin Björnsson
f047816f0f samples: drivers: watchdog: Add alias to overlays
Add alias to overlays for boards that switch the watchdog to be
used while running this sample.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-19 09:28:43 -05:00
Benjamin Björnsson
ab4a926c27 boards: Add alias to boards with watchdog enabled
Add alias to boards with watchdog enabled to facilitate the
move of samples/drivers/watchdog to use DT_ALIAS.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-19 09:28:43 -05:00
Benjamin Björnsson
55d47d341a samples: drivers: watchdog: Remove uneccesary overlays
These watchdogs are already enabled in device tree.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-19 09:28:43 -05:00
Kumar Gala
88021ecd47 samples: sensors: Remove label property from devicetree overlays
Label properties are not required

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-19 08:23:35 -05:00
Kumar Gala
a97765706a samples: boards: Remove label property from devicetree overlays
"label" properties are not required.  Remove them from samples.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-19 12:32:14 +00:00
Emil Gydesen
df75bfd8f6 Bluetooth: Audio: Add PACS location read for unicast client
The unicast client will now read the PACS location value
during the discovery procedure, as well as subscribing to
it.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-07-19 12:27:00 +00:00
Henrik Brix Andersen
7da63e1551 samples: net: sockets: can: add console harness configuration
Add a console harness for validating the output from the SocketCAN sample.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-07-19 10:31:10 +02:00
Henrik Brix Andersen
dd96b86835 net: samples: sockets: can: add support for native_posix
Add support for running the SocketCAN sample on
native_posix/native_posix_64 using the CAN loopback interface.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-07-19 10:31:10 +02:00
Kumar Gala
a8c400d1a5 samples: net: Remove label property from devicetree overlays
"label" properties are not required.  Remove them from samples.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-19 10:30:39 +02:00
Kumar Gala
28143b1cdc samples: subsys: Remove label property from devicetree overlays
"label" properties are not required.  Remove them from samples.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-19 10:30:20 +02:00
Carlo Caione
ec0b3148cc test: syscall_perf: Do not re-define csr_read
No need to re-define csr_read().

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-18 12:22:00 -04:00
Tomislav Milkovic
0fe2c1fe90 everywhere: Fix legacy include paths
Any project with Kconfig option CONFIG_LEGACY_INCLUDE_PATH set to n
couldn't be built because some files were missing zephyr/ prefix in
includes
Re-run the migrate_includes.py script to fix all legacy include paths

Signed-off-by: Tomislav Milkovic <milkovic@byte-lab.com>
2022-07-18 16:16:47 +00:00
Aastha Grover
35f42797b8 samples: drivers: fpga: merge both samples and add sample.yaml
Merge the fpga_controller and fpga_controller shell
sample applications and add sample.yaml to enable testing in
twister.

Fixes #47613

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
2022-07-18 10:28:08 -05:00
Benjamin Björnsson
b92144ca3b samples: sensor: stm32_temp_vbat: Update sample to use DEVICE_DT_GET_ONE
Update sample to use DEVICE_DT_GET_ONE to remove usage of DT_INST.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-18 14:32:09 +00:00
Benjamin Björnsson
8af2f0460d samples: sensor: stm32_temp_sensor: Update to use DEVICE_DT_GET_ONE
Update sample to use DEVICE_DT_GET_ONE to remove usage of DT_INST.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-18 14:31:54 +00:00
Reto Schneider
6a6b3a1217 samples: net: zperf: Fix format specificer missmatch
NULL (void *) is not of type char *.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2022-07-18 13:18:56 +00:00
Kumar Gala
cbc848f328 dts: bindings: device labels are now optional
All in tree device drivers use some form of DEVICE_DT_GET
so we no longer need to require label properties.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-18 10:39:14 +00:00
Attie Grande
adeb181a72 boards: arm: atsamr34: Add SAMR34 Xplained board
Implement support for SAMR34 Xplained Pro dev board.

Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
2022-07-18 10:35:46 +00:00
Attie Grande
876dc19d27 boards: arm: atsaml21: Add SAML21 Xplained board
Implement support for SAML21 Xplained Pro dev board.

Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
2022-07-18 10:35:46 +00:00
Kumar Gala
eecaf6dce4 samples: boards: nrfx_prs: use DT_LABEL macro
Change code to use DT_LABEL macro so its more obvious what is going on.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-17 16:43:31 -05:00
Jimmy Ou
d98cad84c6 samples: drivers: display: add support for max7219
Add max7219_8x8 into sample.yaml for testing.

Signed-off-by: Jimmy Ou <yanagiis@gmail.com>
2022-07-15 10:10:48 +02:00
Ola Tangen Kulseng
1563d4a0c3 net: lwm2m: Default ssid
Created the variable CONFIG_LWM2M_SERVER_DEFAULT_SSID to be
the default ssid when not using bootstrap. Needed for access control.

Signed-off-by: Ola Tangen Kulseng <ola.kulseng@nordicsemi.no>
2022-07-15 10:10:16 +02:00
Johann Fischer
d402911801 shields: add shield support for AMG88xx sensor
Add shield support for Panasonic AMG88xx sensor and
remove app.overlay from amg88xx sample.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-07-15 10:07:30 +02:00
Kumar Gala
774f8b5b73 samples: sensor: qdec: Remove sample
The sensor shell can handle / does everything this sample does so just
remove the sample in favor of sensor shell.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-15 10:00:30 +02:00
Kumar Gala
6b33c03892 samples: lps22hh: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding.  This
is more generic than the hardcoded string that was being used.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-14 14:08:44 -07:00
Kumar Gala
3a223bc45b samples: sensor: hts221: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding.  This
is more generic than the hardcoded string that was being used.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-14 14:08:44 -07:00
Johann Fischer
3c971307dc arch/kernel/soc/samples: use unsigned int for irq_lock()
irq_lock() returns an unsigned integer key.
Generated by spatch using semantic patch
scripts/coccinelle/irq_lock.cocci

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-07-14 14:37:13 -05:00
Alexandre Bourdiol
ff9e6f2661 sample: subsys: nvs: support stm32l562e_dk board
Add stm32l562e_dk support to sample nvs

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2022-07-14 10:43:53 +02:00
Alexandre Bourdiol
f73873b9e2 sample: subsys: nvs: support nucleo_wb55rg board
Add nucleo_wb55rj support to sample nvs

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2022-07-14 10:43:53 +02:00
Alexandre Bourdiol
88140089f0 sample: subsys: nvs: support nucleo_l152re board
Add nucleo_l152re support to sample nvs

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2022-07-14 10:43:53 +02:00
Alexandre Bourdiol
75f8685bd1 sample: subsys: nvs: support nucleo_g071rb board
Add nucleo_g071rb support to sample nvs

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2022-07-14 10:43:53 +02:00
Alexandre Bourdiol
e0f7ed09fe sample: subsys: nvs: support nucleo_f429zi board
Add nucleo_f429zi support to sample nvs

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2022-07-14 10:43:53 +02:00
Alexandre Bourdiol
e9014130f8 sample: subsys: nvs: support nucleo_f103rb board
Add nucleo_f103rb support to sample nvs

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2022-07-14 10:43:53 +02:00
Alexandre Bourdiol
503514f0b9 sample: subsys: nvs: disco_l475_iot1: use MCU flash instead of QSPI
This allow storage partition to be erased on automatic bench,
(mass erase) and thus test is now passed.
By the way it allows to test MCU flash driver,
whereas other drivers tests operates on QSPI.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2022-07-14 10:43:53 +02:00
Attie Grande
d713aa8e2f samples: drivers: adc: fixup sam0 samples
The sam0 ADC driver has ADC_CONFIGURABLE_INPUTS enabled, which means
that the device tree ADC nodes must include the zephyr,input-positive
property.

Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
2022-07-14 10:31:19 +02:00
Glauber Maroto Ferreira
c4ed27f0ec esp32: samples: counter: conf removal & overlay inclusion
Removes deprecated conf files from the counter/alarm
sample and adds overlays to enable timer nodes in use.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-07-13 15:53:04 +02:00
Johann Fischer
a1bfd8336e samples: rtu_server: add support for CDC ACM UART
Allow to use RTU server sample on any board that has supported
USB device controller. Although it is only a point to point
connection and does not represent a bus, it can, apart from
testing the server implementation, also be used practically
for example to control relays or to read ADC values via
USB connection without implementing custom USB class or driver.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-07-13 11:36:59 +02:00
Henrik Brix Andersen
d22a9909a1 drivers: net: canbus: move CAN bus network driver to drivers/net
Move the CAN bus network driver from drivers/can to drivers/net as it
implements a network driver, not a CAN controller driver.

Use a separate Kconfig for enabling the CAN bus network driver instead of
piggybacking on the SocketCAN Kconfig. This allows for other
(e.g. out-of-tree) SocketCAN transports.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-07-13 10:34:51 +02:00
Francois Ramu
b5f3df0303 samples: canopenmode exclude nvs_sector_size above 64K
This commits is restricting the execution of the
samples/modules/canopennode to board configuration where
the nvs_sector_size is less than 0x10000.
When the CONFIG_CANOPENNODE_STORAGE is selected, the
settings_subsys_init do not accept
nvs_sector_size > UINT16_MAX.
Then all the stm32h723/h743/h745/h750 cannot run the
sample.modules.canopennode testcase

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-07-13 10:14:03 +02:00
Emil Gydesen
c699ae5850 Bluetooth: Audio: Expose broadcast sink adv data to application
In the broadcast sink `scan_recv` which is called when we
scan for broadcast source, we now also provide the entire
AD struct to the application.

The reason for this is that the advertising data may
contain other information that is useful for the application
like the broadcaster device name or any other
vendor/application specific data.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-07-12 14:17:02 +02:00
Emil Gydesen
bd64be452c samples: Bluetooth: Update unicast audio client to disconnect
Update the sample to reset data and restart scanning for new
unicast audio servers if the connected one disconnected.

This does not handle if a disconnect happens in the middle of
setting up the audio streams.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-07-12 14:12:08 +02:00
Emil Gydesen
9b15426455 Bluetooth: Audio: Refactor ISO allocation endpoints
Modify how the ISO channels are allocated for the audio streams,
as well as how the CIG is allocated for the unicast group.

This fixes an issue where the unicast group could not be
fully allocated before _after_ the bt_audio_streams had been
configured by bt_audio_stream_config, thus making it impossible
to create a unicast group before the connections have been established.

This leaves us with 3 basic data types:
1) Streams allocated by the application
2) Endpoints that represent ASEs
3) Audio_iso which is used to couple streams and ISO channels.

The Unicast Group for the unicast client will now have the same
lifetime as the ISO CIG for the central.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-07-12 14:12:08 +02:00
Kumar Gala
4fab930c6d samples: video: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-12 10:20:00 +02:00
Gerard Marull-Paretas
e0c647c147 samples: drivers: flash_shell: remove duplicate include
<stdlib.h> was included twice, keep the first occurence only.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-11 17:56:55 +02:00
Gerard Marull-Paretas
d424d66aff samples: drivers: flash_shell: remove unused soc.h
The sample included soc.h for no reason, remove it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-11 17:56:55 +02:00
Carlo Caione
2f5fef960e sample: s2ram: Introduce S2RAM sample
Introduce a template / sample for S2RAM running on rf5340dk.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-11 15:26:26 +02:00
Jonathan Rico
1f226e0c4b samples: boards: fix bbc_microbit pong build
The GATT caching feature isn't needed, and was making the memory
consumption blow up because of the recent addition of `long_wq` for
deferred work.

Fixes #47428 .

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2022-07-11 14:38:10 +02:00
Manuel Arguelles
f2ae4b67b2 tests: samples: bump timeout for FVP BaseR board
Timeout must be increased for fvp_baser_aemv8r_aarch32 board. Enabling
MPU on this board makes simulation slower.

Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
2022-07-11 11:17:02 +02:00
Kumar Gala
ca22924f2f samples: drivers: espi: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-11 10:51:30 +02:00
Kumar Gala
d1b685a84b samples: drivers: espi: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-11 10:51:30 +02:00
Aastha Grover
6f5c26d71e samples: kernel: condvar: add README
Add readme for the sample for conditional variables in kernel.

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
2022-07-08 21:06:33 -04:00
Emil Gydesen
4b953eabf8 Bluetooth: Audio: Moved ASCS metadata verification to higher layer
Instead of rejecting metadata at the BAP layer, we now
expect the higher layer to provide the verification.

The reason for this is that the higher layer may be better
equiped at determining which metadata it supports.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-07-08 20:08:45 +00:00
Kumar Gala
4faf362030 soc: apollo_lake: gpio: Drop use of DT_LABEL
Change APL_GPIO_DEV_* defines to be DT_NODELABELs instead of
"label" strings.  This lets us change users of these defines to
use DEVICE_DT_GET.

We update samples/board/up_squared/gpio_counter to use DEVICE_DT_GET
as part of this change.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-08 20:01:47 +00:00
Gerard Marull-Paretas
6026022ccf samples: boards: bbc_microbit: line_follower: use i2c-dt-spec
Create a sample level compatible for the motor controller and make use
of i2c-dt-spec facilities.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-08 14:08:47 +02:00
Gerard Marull-Paretas
6a23d983a7 samples: boards: bbc_microbit: line_follower: refactor motor code
Simplify motor control logic to improve application
readability/structure.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-08 14:08:47 +02:00
Gerard Marull-Paretas
dd54e82b84 samples: boards: bbc_microbit: line_follower: fix variable types
For left/right gpio values:

- GPIO API returns `int` (signed).
- Drop array as only first index was used.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-08 14:08:47 +02:00
Gerard Marull-Paretas
c1f0c9afe8 samples: boards: bbc_microbit: line_follower: use gpio-dt-spec
Specify left/right GPIOs in DT (zephyr,user node). Make use of
gpio-dt-spec and cleanup the code.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-08 14:08:47 +02:00
Gerard Marull-Paretas
ee9ab9756c samples: boards: bbc_microbit: pong: use pwm-dt-spec
Specify PWM parameters in Devicetree. Code has been updated to operate
in native PWM units (nsec) everywhere.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-08 14:08:47 +02:00
Gerard Marull-Paretas
ab959061ff samples: boards: bbc_microbit: sound: use pwm-dt-spec
Specify PWM parameters in Devicetree. Period in DT is used as the
initial period. Code has been updated to operate in native PWM units
(nsec) everywhere.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-08 14:08:47 +02:00
Yuriy Vynnychek
99479ecbda drivers: adc: introduce new Telink B91 ADC driver
ADC driver basic support for Telink B91 SoC.

Signed-off-by: Yuriy Vynnychek <yura.vynnychek@telink-semi.com>
2022-07-08 11:07:18 +02:00
Kumar Gala
a4ae3afd1f samples: ps2: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-08 11:03:23 +02:00
Kumar Gala
209a4c3c18 samples: updatehub: Remove use of DT_BUS_LABEL
The use of DT_BUS_LABEL in a logging call can easily be replaced
with uart_dev->name.  This moves us slowly forward to removing
use of devicetree `label` property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-08 10:52:47 +02:00
Kumar Gala
b77aeb0c21 samples: counter: maxim_ds3231: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-08 10:52:34 +02:00
Kumar Gala
43c4066e0e samples: spi_bitbang: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-08 10:52:21 +02:00
Emil Gydesen
d595b64252 sample: Bluetooth: Add BT_SETTINGS for connected ISO samples
Add BT_SETTINGS support for the samples as well as
enabling security.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-07-08 10:49:12 +02:00
Kumar Gala
4415a3bd3c samples: drivers: spi_flash: Exclude hifive_unmatched
hifive_unmatched has a jedec,spi-nor flash node, however we have no
SPI driver for the controller so exclude the platform from this sample.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-08 09:36:43 +02:00
Kumar Gala
3cfc8d5875 samples: spi_flash: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-08 09:36:43 +02:00
Kumar Gala
c4cdba3833 samples: lwm2m_client: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 08:27:52 -05:00
Kumar Gala
9ceeb3a0ae samples: lwm2m_client: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 08:27:52 -05:00
Joep Buruma
91f659d70a samples: led_pwm: add overlay for rpi_pico board
Add an overlay for rpi_pico board to the led_pwm sample.
This board only supports fairly high pwm frequencies so
the blinking of the LED is not supported. Turning it on/off
and fading is.

Signed-off-by: Joep Buruma <burumaj50@gmail.com>
2022-07-07 15:17:26 +02:00
Kumar Gala
798c2ef0ee samples: boards: nrf: nrfx_prs: Remove DT_LABEL usage
As we work to phase out `label` property usage, remove DT_LABEL
from BUILD_ASSERT macro.  Just use SPIM_NODE and UARTE_NODE in
the assert message.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 08:12:11 -05:00
Kumar Gala
7c39210324 samples: boards: nrf: system_off: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 08:12:11 -05:00
Kumar Gala
4cb17cca08 samples: boards: nrf: clock_skew: Convert to use DEVICE_DT_GET{_ONE}
Move to use DEVICE_DT_GET{_ONE} instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 08:12:11 -05:00
Kumar Gala
0efbba947a samples: boards: nrf: battery: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 08:12:11 -05:00
Kumar Gala
465cc93bf0 samples: drivers: i2s: echo: Remove DT_LABEL usage
As we phase out usage of 'label' devicetree property, remove uses
of DT_LABEL.  Replace DT_LABEL with swN_spec.port->name.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:27:36 +00:00
Kumar Gala
0e00cccb7a samples: reel_board: mesh_badge: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access for SW0.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:27:16 +00:00
Maciej Perkowski
d224d7fcd5 sample: usb: Change integration_platforms to platform_allow
The sample proviades required overlays only for 3 platforms.
Therefore, flash scenarios can only work on those 3 platforms.
To reflect this, platform_allow has to be used instead of
integration_platforms, so boards without overlays are not picked up
into a scope.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2022-07-07 10:11:44 +02:00
Kumar Gala
6a177e0a31 samples: usb: hid-cdc: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:11:29 +02:00
Kumar Gala
5e5a2cc3ca samples: sensor: fxos8700-hid: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:11:16 +02:00
Kumar Gala
1424912d56 samples: sensor: fxos8700-hid: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:11:16 +02:00
Kumar Gala
b17bc71889 samples: led_sx1509b_intensity: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:09:48 +02:00
Kumar Gala
52b4cab493 samples: sensor: bme680: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:02:47 +02:00
Kumar Gala
bd25909ced samples: sensor: grove_light: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:02:47 +02:00
Kumar Gala
471eb98032 samples: sensor: grove_temperature: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:02:47 +02:00
Kumar Gala
b8b9bcc8f7 samples: sensor: icm42605: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:02:47 +02:00
Kumar Gala
bdaa339881 samples: sensor: max17262: Remove dead code
MAX17262 and MAX17262_LABEL defines aren't used anymore so remove them

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:02:47 +02:00
Kumar Gala
e12a44f536 samples: sensor: max6675: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:02:47 +02:00
Kumar Gala
e0854d9e31 samples: sensor: vl53l0x: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:02:47 +02:00
Kumar Gala
7e286bfc5e samples: basic: threads: Remove dts label prop usage
Replace access to dts 'label' property (which we are phasing out)
with simple int as the serve the purpose for error report.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:02:47 +02:00
Kumar Gala
95ee61529a samples: cc13x2_cc26x2: system_off: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:02:32 +02:00
Kumar Gala
c2f3f32ec8 samples: cc13x2_cc26x2: system_off: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:02:32 +02:00
Kumar Gala
0f25daa8fe samples: bbc_microbit: line_follower_robot: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

The I2C & GPIO devices are not represnted in devicetree and thus we
aren't converting this sample over to i2c_dt_spec or gpio_dt_spec.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:02:12 +02:00
Kumar Gala
13bff2b253 samples: bbc_microbit: pong: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:02:12 +02:00
Kumar Gala
85094fb9f8 samples: bbc_microbit: pong: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:02:12 +02:00
Kumar Gala
400069b106 samples: bbc_microbit: sound: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:02:12 +02:00
Kumar Gala
7b6b7cf37c samples: bbc_microbit: sound: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:02:12 +02:00
Kumar Gala
b3bbaa5400 samples: edac: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:01:45 +02:00
Kumar Gala
d9c5022d3b samples: tflite-micro: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:01:20 +02:00
Kumar Gala
64819c3ac2 samples: spi_flash_at45: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:01:15 +02:00
Pieter De Gendt
e381170282 uart_pipe: Remove obsolete UART_PIPE_ON_DEV_NAME Kconfig
The UART pipe device is selected with devicetree chosen zephyr,uart-pipe

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-07-07 09:59:49 +02:00
Andrey Borisovich
aa253d9ab1 soc: intel_adsp: reading HP SRAM banks count for ACE1X from Devicetree
Replaced hardcoded for intel_adsp_ace15_mtpm board
HP_MEMORY_BANKS value used in SOF code with generic approach -
using PLATFORM_HPSRAM_EBB_COUNT read from Devicetree.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2022-07-06 15:11:07 -04:00
Flavio Ceolin
e4a3e2d8b6 intel_adsp: Unify cavs and ace timers
These two timers were sharing pretty much the same code. Actually
mtl timer was a "superset" of cavs timer. Just merge them into a
single one called intel audio dsp timer (intel_adsp_timer).

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-07-06 15:11:07 -04:00
Arsen Eloglian
293c55a3ee dts: align CONFIG's with ace hardware
Align CONFIG_HEAP_MEM_POOL_SIZE & CONFIG_DAI with ace hardware.

Signed-off-by: Arsen Eloglian <ArsenX.Eloglian@intel.com>
2022-07-06 15:11:07 -04:00
Anas Nashif
e3c9eb2495 intel_adsp: add the board definition for the Meteorlake
Board definition for the meteorlake platform.
Enable intel_adsp_ace15_mtpm in the sof sample.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Co-authored-by: Michal Wasko <michal.wasko@intel.com>
Co-authored-by: Konrad Leszczynski <konrad.leszczynski@intel.com>
2022-07-06 15:11:07 -04:00
Kumar Gala
19636b5087 sapmles: watchdog: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 12:42:29 -05:00
Kumar Gala
046cb83996 samples: esp32: flash_encryption: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 12:42:11 -05:00
Kumar Gala
057f1555c3 samples: lorawan: class_a: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 12:41:54 -05:00
Kumar Gala
ceeaef5100 samples: gsm_modem: Remove use of DT_BUS_LABEL
The use of DT_BUS_LABEL in a logging call can easily be replaced
with uart_dev->name.  This moves us slowly forward to removing
use of devicetree `label` property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 12:41:35 -05:00
Kumar Gala
c96f8f9c29 samples: lsm6dso: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Also, Removed 'lsm6dso' from board & sample yaml's and move to just
filtering based on devicetree compat.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 12:26:42 -05:00
Kumar Gala
544140dfe4 samples: boards: h7_dual_core: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 11:22:43 -05:00
Anas Nashif
8fe4ca699c samples: add mising braces to single line if statements
Following zephyr's style guideline, all if statements, including single
line statements shall have braces.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-06 11:00:45 -04:00
Kumar Gala
36a507d271 samples: 96b_argonkey: sensors: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 09:54:50 -05:00
Kumar Gala
a4514f2771 samples: 96b_argonkey: sensors: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 09:54:50 -05:00
Kumar Gala
55a7c6dc20 samples: sensortile_box: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 09:53:48 -05:00
Kumar Gala
322b23a2c9 samples: sensortile_box: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 09:53:48 -05:00
Kumar Gala
e9c83b3e9b samples: reel_board: mesh_badge: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 11:13:02 +00:00
Kumar Gala
4aaa9cea01 samples: reel_board: mesh_badge: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 11:13:02 +00:00
Kumar Gala
7761b5c4e2 samples: bluetooth: iso_receive: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 11:22:04 +02:00
Alexandre Bourdiol
2b54f0fcf4 samples: drivers: led_ws2812: add fixture to sample.yaml
This sample should be executed only when connecting external
hardware (Led strip). Thus it is necessary to add fixture to avoid
execution when no hardware is connected.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2022-07-06 11:19:13 +02:00
Maciej Perkowski
a83cec9f8b samples: drivers: flash: Add missing fixture requirement
This sample can only be tested if the DUT has external memory
connected. This commit aligns the yaml description, so the test
is not picked up on setups without required fixture.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2022-07-06 11:12:04 +02:00
Kumar Gala
1ee23437ee samples: nrf: mesh: onoff-app: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 11:11:31 +02:00
Kumar Gala
18ede6e681 samples: alarm: Convert sample to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as we
work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 11:11:00 +02:00
Emil Gydesen
504feb77c4 Bluetooth: Audio: Updated samples and shell to use seq_num
Update the samples and the shell to use the sequence number
and timestamp when sending.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-07-06 11:03:27 +02:00
Jamie McCrae
db469784ae samples: drivers: watchdog: Add support for Raspberry Pi Pico
This adds support for running the watchdog driver sample on a Raspberry
Pi Pico board.

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2022-07-06 10:52:29 +02:00
Kumar Gala
b2ad545887 samples: x_nucleo_iks02a1: microphone: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 10:48:09 +02:00