Commit graph

8725 commits

Author SHA1 Message Date
Ricardo Rivera-Matos 5868c701ef samples: charger: Demos new output limit properties
Adds use of CHARGER_PROP_DISCHARGE_CURRENT_NOTIFICATION and
CHARGER_PROP_SYSTEM_VOLTAGE_NOTIFICATION_UV to the charger
sample application.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-02-26 11:33:24 +00:00
Ricardo Rivera-Matos c85c12da40 samples: charger: Documents charger sample app
Creates basic documentation for the chagrer sample application.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-02-26 11:33:24 +00:00
Ricardo Rivera-Matos 587b3c9001 samples: charger: Moves sample charger app under samples/drivers/
Moves the charger API sample app from samples/charger/ to
samples/drivers/chargers/ as mentioned in issue #65032.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-02-26 11:33:24 +00:00
Lars Knudsen da62258add samples: Bluetooth: Fix UUID compare
Check for BASS and PACS, while scanning for
Broadcast Audio Sinks was wrong in the
Broadcast Audio Assistant sample.

Signed-off-by: Lars Knudsen <LAKD@demant.com>
2024-02-26 12:01:15 +01:00
Marcin Niestroj 7c56ad67d4 samples: http_get: increase mbedTLS heap size
40k heap size is not enough and results in handshake errors:

  <err> net_sock_tls: TLS handshake error: -0x2700

Increasing it to 55k already works (when used with native_sim_64 and
offloaded sockets), but use 60k to get a bit more room for future.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-02-25 20:51:17 -05:00
Sylvio Alves 5b4c927c50 samples: esp32: do not search for all regions
Current SPIRAM sample code tries to search for any available
heap, causing this test to fail. Make sure the sample code
only malloc data from external ram.

Fixes #65997

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-02-19 11:05:09 +01:00
Daniel DeGrasse 39ea8ac87a samples: drivers: mbox: remove mimxrt595_evk_cm33
Remove mimxrt595_evk_cm33 from the MBOX sample. Although this SOC has
support for both cores, there is no support in tree for booting the
secondary core from the primary one, so this sample cannot run on
hardware.

Fixes #69092

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-02-17 14:19:06 +01:00
Alberto Escolar Piedras 2f8c58120e samples/modules/lvgl/demos: Increase heap for native 64 targets
For this targets, the widgets demo run out of heap and crashes.
Let's just increase the heap size.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-02-16 19:26:03 +01:00
Emil Gydesen b374a423c4 Samples: Bluetooth: Fix PAST support for broadcast sink
Fix missing support for PAST in the broadcast audio sink
sample, where it previously failed to request PAST from
the broadcast assistant by not setting the PA state to
BT_BAP_PA_STATE_INFO_REQ.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-02-16 19:15:39 +01:00
Sylvio Alves 8c5b39a772 samples: esp32: docs: add proper header description
Add Sphinx model header content so that it can be
mapped into release notes.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-02-15 22:15:43 +01:00
Emil Gydesen 2fbc5b1ae2 samples: Bluetooth: Minor improvements for broadcast audio sink
Increases some of the timeouts so that when using this sample
against other interactive devices (such as a phone or the
Zephyr audio shell), then it's easier to do it in time.

Also updates a few of the printks and ensures that we are not
doing name filtering when we have been requested to sync to
a specific broadcast source by a broadcast assistant.

The test for the sample has also been modified to have a longer
timeout to accomodate for the new semaphore timeout values.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-02-14 22:27:26 +01:00
Christopher Friedt 2155a9e5f7 logging: rename log2_generic to log_generic
The log2 prefix was deprecated and changed to log some time ago,
but log2_generic() seems to have been inadvertantly left with
the old prefix.

Rename log2_generic() to log_generic() to follow suit.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-02-14 19:07:30 +01:00
Ping Wang 5ccd75b49b Bluetooth: Audio: define bt_bap_bass_subgroup struct.
The Broadcast Assistant API should be fully independent of the scan
delegator. Therefore the new struct bt_bap_bass_subgroup has been
defined to avoid a dependency.

Fixes: #68338

Signed-off-by: Ping Wang <pinw@demant.com>
2024-02-14 19:04:01 +01:00
Sean Farrelly 9e28e9e564 samples: Bluetooth: Broadcast Audio Source: Fix potential memory leak
In error cases, where send_data() returns early, the allocated net_buf
is not free'd, causing a memory leak affecting the net_buf pool.
Fix this by freeing the allocated net_buf before returning early
from send_data().

Signed-off-by: Sean Farrelly <sean.farrelly@outlook.com>
2024-02-14 14:28:28 +01:00
Cui Wei cdb8f3cc47 samples: posix: gettimeofday: Fix fatal error caused by small stack
Fix #68727.

Signed-off-by: Cui Wei <chris.wei.cui@foxmail.com>
2024-02-14 10:58:42 +01:00
Doug Foster 7f83db489e samples: doc: Add README for Grove sensor samples
Added a README.rst for grove_light and grove_temperature sensor
sample applications.

Signed-off-by: Doug Foster <dougwfost@gmail.com>
2024-02-14 00:44:29 +01:00
Christopher Friedt 218f787e26 thrift: null-terminate certificates in samples and tests
The thrift methods loadCertificateFromBuffer(),
loadPrivateKeyFromBuffer(), and
loadTrustedCertificatesFromBuffer() expect a null-terminated
string.

Append '\0' to each array used to hold a certificate in
thrift samples and tests.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-02-13 19:36:58 +01:00
Emil Gydesen 302974bdcb samples: Bluetooth: Add missing svc data for broadcast audio sink
Add missing service data for BASS for the broadcast audio sink
sample.

This also required the controller to increase its maximum data
length. Increased more than minimum required so that the name
can be changed without needing to increase this again.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-02-13 16:47:01 +01:00
Jamie McCrae 7567e7a627 samples: mgmt: mcumgr: smp_svr: Fix shell mgmt overlay
Fixes a wrong Kconfig selection in the overlay file

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-02-12 13:20:32 +01:00
Emil Gydesen 3e634268d6 Bluetooth: ISO: Introduce bt_iso_chan_send_ts
The bt_iso_chan_send function could take an optional
timestamp by using 0 as an indicator. The issue with
this approach was that a timestamp value of 0 is valid,
and could cause potential issue with syncing streams
in a group.

To fully support transmitting with and without timestamp,
bt_iso_chan_send_ts has been introduced, which is the only
function of the two (bt_iso_chan_send being the other) that
supports timestamps.

A new function, rather than adding a boolean to the existing,
was chosen as it simplifies the individual functions as well
as making it more explicit what the function does.

Since the bt_iso_chan_send function is used by LE audio, both
the BAP and CAP send functions have similarly been updated.
Likewise, all tests and samples have been updated to use the
updated function(s), and BT_ISO_TIMESTAMP_NONE has been
removed.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-02-12 13:13:10 +01:00
Tomasz Moń 7ed4c39b1e samples: usb: set UAC2 explicit feedback sample harness to TBD
UAC2 explicit feedback sample currently fails twister device testing
with timeout. It is not really clear what twister expects to see on the
serial output when running the sample. Because there is no meaningful
way of testing USB <-> I2S communication, mark the sample with TBD
harness to silence the timeout.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-02-07 15:26:01 +00:00
Wajdi ELMuhtadi e5351b0d10 samples: sensor: wsen_hids: remove example for wsen_hids
Remove example for wsen_hids to switch to
generic sensor driver examples.

Signed-off-by: Wajdi ELMuhtadi <wajdi.elmuhtadi@we-online.com>
2024-02-06 18:57:45 +01:00
Wajdi ELMuhtadi 56b70bddcc samples: sensor: wsen_itds: remove example for wsen_itds
Remove example for wsen_itds to switch to
generic sensor driver examples.

Signed-off-by: Wajdi ELMuhtadi <wajdi.elmuhtadi@we-online.com>
2024-02-06 18:57:45 +01:00
Karthikeyan Krishnasamy 730e08405c samples: cellular_modem: add device specific config
enable uart async api for rak5010_nrf52840

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-02-06 18:55:19 +01:00
Armando Visconti 80676825e1 samples/sensor: lsm6dsl: fix -Wdouble-promotion warning
Fix -Wdouble-promotion warning just using sensor_value_to_double()
routine.

Fixes #68284

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-02-05 18:51:38 +01:00
Emil Gydesen cbc81b2a0f Bluetooth: Audio: Remove LC3 from the assigned numbers defines
The defines from the Bluetooth Audio assigned numbers are not
specific for LC3. This commit removes the LC3 infix and
the reference to LC3 in the documentation for them.

It also cleans up some of the documentation and
names of the enums.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-02-05 09:14:44 -06:00
Emil Gydesen f35e9871d5 Bluetooth: CAP: Remove unicast group param from unicast_audio_start
Since we can always lookup the group from the streams, the
group parameter had no purpose.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-02-04 19:54:18 -06:00
Gerson Fernando Budke 78ee5b1d05 samples: net: echo_client: Decrease SRAM for atsamr21_xpro
This update the echo_client configurations for the atsamr21_xpro board
to match same configs defined at echo_server.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2024-02-02 09:35:51 -06:00
Gerson Fernando Budke de56f0cce2 samples: net: echo_server: Decrease SRAM for atsamr21_xpro
In the Zephyr v3.5 to build the net samples pair echo-server/client the
SRAM requirements increased for the atsamr21_xpro board when passing
-DEXTRA_CONF_FILE=overlay-802154.conf argument. This adjusts example
features to free necessary SRAM to build and run the example.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2024-02-02 09:35:51 -06:00
Tomas Galbicka 73d6c336ca samples: tests: mbox: Add lpcpresso55s69 support
This commit adds support for NXP board LPCXpresso55S69 for mbox.
 - samples/drivers/mbox/ - mbox signaling mode
 - samples/drivers/mbox_data/ - mbox data transfer mode
 - tests/drivers/mbox/mbox_data/ - mbox test to verify functionality.

Signed-off-by: Tomas Galbicka <tomas.galbicka@nxp.com>
2024-02-02 09:31:33 -06:00
Francois Ramu 9e13290f8b boards: arm: stm32 boards has qspi nor flash node
Define the reg and size property for the stm32 boards with qspi inside
Refer to the dts/bindings/flash_controller/st,stm32-ospi-nor.yaml.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-02-02 13:48:18 +01:00
Jukka Rissanen 508a261286 log: net: Convert syslog network transmitter to use sockets
Convert the network log backend to use socket API instead of
net_context API. This allows the backend to be used also
with socket offloading network drivers.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-02-01 10:22:47 -06:00
Luis Ubieda 2745f6a885 samples: bluetooth: Added sample for Extended Advertisements
Both advertiser and scanner demonstrate the use of extended advertising
and scanning, and how to gracefully restart the extended advertisements
through the use of recycle() callback. In the sample, the advertiser
initiates a connectable advertisement set, which prompts the scanner to
connect. After the connection is established, the advertiser waits for
5 seconds to disconnect. After the connection is dropped, the advertiser
immediately restarts broadcasting, while the scanner cools-down for
5 seconds to restart its process.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-02-01 14:31:27 +00:00
Tomasz Moń f00f846fe3 samples: usb: add UAC2 explicit feedback sample
The sample illustrates how to calculate feedback value based on I2S
sample clock measurement or indirect I2S FRAMESTART and USBD SOF.
The sample is currently only supported on nrf5340dk_nrf5340_cpuapp
target because the feedback measurement uses target specific
peripherals.

While it should be possible to perform feedback value calculation
entirely in software (possibly with some additional filtering due
to software scheduling jitter), the I2S API does not provide necessary
timestamps.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-02-01 15:07:37 +01:00
Tomasz Moń c83ad53442 usb: device_next: new USB Audio 2 implementation
Introduce new USB Audio 2 implementation written from scratch. Main goal
behind new implementation was to perform entity configuration with
devicetree bindings, hiding the descriptor complexity from application.

Initial implementation is working at Full-Speed only. High-Speed support
will come later, but even at Full-Speed only this is viable replacement
for old stack USB Audio 1 class (USB Audio 1 is limited to Full-Speed by
specification, i.e. it is explicitly forbidden for USB Audio 1 device to
work at High-Speed).

Implemented is only absolute minimum set of features required for basic
implicit and explicit feedback samples. Only one sample frequency is
currently supported. Optional interrupt notifications are not supported.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-02-01 15:07:37 +01:00
Eve Redero 8aea0e75d2 fix: samples: lvgl: modules: add missing test case
Add missing test case for LVGL demo app "widgets".

Signed-off-by: Eve Redero <eve.redero@gmail.com>
2024-02-01 13:29:30 +01:00
Christopher Friedt dd33a8152a samples: philosophers: remove redundant items in prj.conf
The normal and posix philosophers samples seemed to have
a number of redundant choices in prj.conf.

Let's reduce to the minimum required for the sample. The
CONFIG_DEBUG_THREAD_INFO option is part of the
documentation, so leave it as-is.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-02-01 05:26:24 -05:00
Christopher Friedt 842fdbdea6 samples: posix: philosophers: fix off-by-one error
The number of forks should match the number of philophers, and
that is encoded via NUM_PHIL.

Change the build assert to match.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-02-01 05:26:24 -05:00
Christopher Friedt 9122e8530f samples: posix: philosophers: minor spacing corrections
Fix spacing and wrapping in the README.rst file.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-02-01 05:26:24 -05:00
Christopher Friedt 52b619cd2b samples: philosophers correct misspelled introduction tag
The tag 'introduction' was misspelled 'inroduction'.

Correct it both the samples/philosophers and the
samples/posix/philosophers directories.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-02-01 05:26:24 -05:00
Christopher Friedt 855b8bc6ca posix: separate shell utilities and posix api implementation
Previously, the POSIX shell utilities were intermixed with the
POSIX API implementation.

The POSIX shell utilities only depend on the public POSIX API,
so it makes sense to keep them in a separate subdirectory.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-02-01 05:26:24 -05:00
Daniel DeGrasse b83d8b0707 samples: drivers: jesd216: support NXP FlexSPI NOR driver
Support NXP FlexSPI nor driver with jesd216 sample.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-02-01 10:57:35 +01:00
Fredrik Danebjer c948f831e0 Bluetooth samples: Add USB Audio to Broadcast Sink sample
Added USB Audio output for the Broadcast Sink sample. In addition
offloading of the LC3 codec was also made. The sample supports only
mono, and a KConfig option was added to configure which audio
location to sync to.

Signed-off-by: Fredrik Danebjer <frdn@demant.com>
2024-02-01 10:55:24 +01:00
Lars Knudsen b77df76e98 samples: Add Broadcast Assistant sample
First version of Broadcast Assistant sample
with hard coded selection of sink and source.

Signed-off-by: Lars Knudsen <LAKD@demant.com>
2024-02-01 10:54:56 +01:00
Emil Gydesen 01d0f1a566 Bluetooth: PBP: Fix parsing and return issue with bt_pbp_parse_announcement
bt_pbp_parse_announcement was defined as uint8_t return value function,
but returned errno values, so it was modified to return an int instead.
The return values are also now more granular and documented.

The function also triggered a coverity issue with the way that it
parsed the data->data, as it would be marked as tainted. This should
be fixed by using the net_buf_simple API, which also improves on
some other parts of the code.

Finally the meta argument for the function was changed from an
unknown sized buffer, where the caller somehow had to know the
size of the metadata before calling the parsing function, to
an output pointer. This also omits the requirement for the
caller to always copy the metadata, where now it just
gets a pointer to the metadata in the bt_data struct. The application
can now always decide whether to continue to parse the metadata or
to copy it, using the pointer and the return value of the function.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-01-31 21:33:56 -05:00
Armando Visconti e26cd0ba91 sample/shield: x-nucleo-iks01a3: add support to lis2de12 on DIL24
The x-nucleo-iks01a3 shield is equipped with a DIL24 socket where
different compatible sensors may fit. This commit add support to
lis2de12 on DIL24 in such a way that, if sensor is not present, test
would just skip it and proceed. Other sensors may be added in future.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-01-31 15:39:45 +01:00
Magdalena Pastula 361a5a11aa samples: add overlay files for nRF54L15
Add nRF54L15 overlays to samples that needed them.

Signed-off-by: Magdalena Pastula <magdalena.pastula@nordicsemi.no>
2024-01-30 21:00:44 +00:00
Andriy Gelman c7dab3df08 drivers: can: Add xmc4xxx CAN support
Adds CAN drivers for XMC4xxx SoCs.

XMC4xxx has multiple CAN nodes. The nodes share a common clock and
a message object pool.

The CAN nodes do not have a loopback mode. Instead there is an
internal bus which can be used to exchange messages between
nodes on the SoC. For this reason tests/samples which rely on the
loopback feature have been disabled.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2024-01-30 19:06:06 +01:00
Navinkumar Balabakthan 6a8d011c65 samples: drivers: Added Nand Test Application
Nand Test Application has added in sample/drivers folder.

Signed-off-by: Navinkumar Balabakthan <navinkumar.balabakthan@intel.com>
2024-01-30 18:01:31 +01:00
Guillaume Gautier 05712250ea samples: boards: stm32: pm: suspend_to_ram: add wba standby sample
Add a sample for STM32WBA standby power management.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-01-30 18:01:00 +01:00