Commit graph

7231 commits

Author SHA1 Message Date
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