Commit Graph

7441 Commits

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