Commit Graph

194 Commits

Author SHA1 Message Date
Guillaume Gautier
ed673d5e88 tests: drivers: adc: adc_api: src: change data size for stm32n6
STM32N6 needs to have a buffer of 32-bit data instead of 16-bit.
Adds a Kconfig to select whether the test shall use a 32-bit buffer.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-02-14 10:48:35 +01:00
Yong Cong Sin
52a202309b zephyr: bulk update to DT_NODE_HAS_STATUS_OKAY
Change instances of:

DT_NODE_HAS_STATUS(<node_id>, okay)

to

DT_NODE_HAS_STATUS_OKAY(<node_id>)

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-03 17:06:52 +01:00
Mathieu Choplain
1fd9dc85b2 tests: drivers: adc_api: use proper printf format
This commit changes the adc_api test to use the proper printf
format specifier when printing the ADC samplings. This ensures
that all values are printed on 16-bit. Without this specifier,
negative values are sign-extended and printed on full integer
size (e.g., 0x8000 -> "0xFFFF8000").

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-07-09 17:23:30 -04:00
Guillaume Gautier
5eb045dc83 tests: drivers: adc: adc_api: add dma test
Move ADC DMA tests directly into adc_api test for Kinetis and STM32 boards.
Needs to disable CONFIG_TEST_USERSPACE for this subtest because of caching
issue for STM32H7 (as it was done dor adc_dma test).

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-03-20 09:02:04 +01:00
Nick Ward
ead0c4f865 drivers: adc: use adc_read_dt api
Where struct adc_dt_spec is in use use adc_read_dt().

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-09-25 09:52:16 +02:00
Daniel DeGrasse
77998b2171 tests: drivers: adc: support sampling more than 2 channels with test
Support sampling more than 2 channels using the ADC API test. This
requires updates to the repeated samplings test, which samples using 2
channels even when more channels are defined by the ADC test overlay.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-09-12 17:22:35 +01:00
Eric Holmberg
5cc2691189 tests: drivers: adc: adc_api: add skip for ENOTSUP
If the driver does not implement an optional feature, then skip the test
if -ENOTSUP is returned.

Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
2023-08-17 10:36:20 +02:00
Daniel Leung
121b4d2d62 tests: drivers: rename shadow variables
Renames shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-10 08:14:12 +00: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
Benjamin Björnsson
9e105d2037 tests: drivers: adc: adc_api: Remove mikroe adc click sheild
Remove shield, using this shild will require an overlay for
the particular board being used.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-14 09:57:51 +02:00
Benjamin Björnsson
7938f86f50 tests: drivers: adc: adc_api: Move compat atmel,sam-afec to DT
Move channel description to devicetree for atmel,sam-afec
compatible to make the test more readable.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-14 09:57:51 +02:00
Benjamin Björnsson
89ed720f06 tests: drivers: adc: adc_api: Move compat atmel,sam0-adc to DT
Move channel description to devicetree for atmel,sam0-adc
compatible to make the test more readable.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-14 09:57:51 +02:00
Benjamin Björnsson
9024ffa0c7 tests: drivers: adc: adc_api: Move compat atmel,sam-adc to DT
Move channel description to devicetree for atmel,sam-adc
compatible to make the test more readable.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-14 09:57:51 +02:00
Benjamin Björnsson
b09423fce8 tests: drivers: adc: adc_api: Move compat gd,gd32-adc to DT
Move channel description to devicetree for gd,gd32-adc
compatible to make the test more readable.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-14 09:57:51 +02:00
Benjamin Björnsson
70b6a17a96 tests: drivers: adc: adc_api: Move compat telink,b91-adc to DT
Move channel description to devicetree for telink,b91-adc
compatible to make the test more readable.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-14 09:57:51 +02:00
Benjamin Björnsson
c3c9ce5e01 tests: drivers: adc: adc_api: Move compat nxp,kinetis-adc16 to DT
Move channel description to devicetree for nxp,kinetis-adc16
compatible to make the test more readable.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-14 09:57:51 +02:00
Benjamin Björnsson
34dad8c55b tests: drivers: adc: adc_api: Move compat nordic,nrf-saadc to DT
Move channel description to devicetree for nordic,nrf-saadc
compatible to make the test more readable.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-14 09:57:51 +02:00
Benjamin Björnsson
64c2cd3230 tests: drivers: adc: adc_api: Move compat nordic,nrf-adc to DT
Move channel description to devicetree for nordic,nrf-adc
compatible to make the test more readable.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-14 09:57:51 +02:00
Benjamin Björnsson
9d397c2173 tests: drivers: adc: adc_api: Move compat st,stm32-adc to DT
Move channel description to devicetree for st,stm32-adc
compatible to make the test more readable.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-14 09:57:51 +02:00
Benjamin Björnsson
3219e1618f tests: drivers: adc: adc_api: Move compat nxp,kinetis-adc12 to DT
Move channel description to devicetree for nxp,kinetis-adc12
compatible to make the test more readable.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-14 09:57:51 +02:00
Benjamin Björnsson
25ca362907 tests: drivers: adc: adc_api: Move compat microchip,xec-adc to DT
Move channel description to devicetree for microchip,xec-adc
compatible to make the test more readable.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-14 09:57:51 +02:00
Benjamin Björnsson
b2349d817c tests: drivers: adc: adc_api: Move compat nxp,lpc-lpadc to DT
Move channel description to devicetree for nxp,lpc-lpadc
compatible to make the test more readable.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-14 09:57:51 +02:00
Benjamin Björnsson
ad4e732a77 tests: drivers: adc: adc_api: Move compat nuvoton,npcx-adc to DT
Move channel description to devicetree for nuvoton,npcx-adc
compatible to make the test more readable.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-14 09:57:51 +02:00
Benjamin Björnsson
6e0ce6e81b tests: drivers: adc: adc_api: Move compat ti,cc32xx-adc to DT
Move channel description to devicetree for ti,cc32xx-adc
compatible to make the test more readable.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-14 09:57:51 +02:00
Benjamin Björnsson
0e1fb2fc23 tests: drivers: adc: adc_api: Move compat ti,cc13xx-cc26xx-adc to DT
Move channel description to devicetree for ti,cc13xx-cc26xx-adc
compatible to make the test more readable.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-14 09:57:51 +02:00
Benjamin Björnsson
a1b58c7217 tests: drivers: adc: adc_api: Move compat ite,it8xxx2-adc to DT
Move channel description to devicetree for ite,it8xxx2-adc
compatible to make the test more readable.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-14 09:57:51 +02:00
Benjamin Björnsson
4e93ede856 tests: drivers: adc: adc_api: Move compat nxp_mcux,12b1msps-sar to DT
Move channel description to devicetree for nxp_mcux,12b1msps-sar
compatible to make the test more readable.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-14 09:57:51 +02:00
Benjamin Björnsson
3d93116b1c tests: drivers: adc: adc_api: Move compat raspberrypi,pico-adc to DT
Move channel description to devicetree for raspberrypi,pico-adc
compatible to make the test more readable.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-14 09:57:51 +02:00
Benjamin Björnsson
ef91d2f87c tests: drivers: adc: adc_api: Move compat espressif,esp32-adc to DT
Move channel description to devicetree for espressif,esp32-adc
compatible to make the test more readable.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-14 09:57:51 +02:00
Benjamin Björnsson
8382d119f9 tests: drivers: adc: adc_api: Move compat infineon,xmc4xxx-adc to DT
Move channel description to devicetree for infineon,xmc4xxx-adc
compatible to make the test more readable.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-14 09:57:51 +02:00
Benjamin Björnsson
5848200dc8 tests: drivers: adc: adc_api: Move test to devicetree
Move test to use adc_dt_spec for native posix board.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-14 09:57:51 +02:00
Thomas Stranger
d312ce97c9 tests: drivers: adc: adc_api: add definitions for nucleo_h563zi
Adds the necessary definitions for the nucleo_h563zi to be able to run
the adc_api test on the ADC1 channel 15 (on pa3).

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2023-04-07 13:14:21 +00:00
Francois Ramu
0b422ed02e tests: drivers: adc for the stm32h573 board
Conifgures the new h573i disco kit board for testing the adc_api driver
on the ADC1 channel0 (on pa0).

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-04-03 09:50:43 +02:00
scott worley
6b8bc83f54 tests: adc: Microchip XEC fix ADC API test and ADC shell
Microchip XEC ADC and ADC V2 driver were merged into one
That PR did not change the ADC API test and ADC shell resulting
in twister build failures. Fixed both ADC API test and ADC shell.

Signed-off-by: scott worley <scott.worley@microchip.com>
2023-03-24 11:28:20 -04:00
Daniel DeGrasse
6240fb5f66 tests: drivers: adc: update for LPADC API change
Update test/drivers/adc/adc_api to support the new channel configuration
method used by the LPADC driver.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-03-23 08:58:44 +00:00
Pieter De Gendt
3cbac96134 tests: drivers: adc: adc_api: Add sam4s_xplained board
Define ADC channel configuration for the SAM4S Xplained internal
temperature sensor.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-03-23 09:41:00 +01:00
Stanley Huang
5cac2aa377 boards: arm: add raytac_mdbt50q_db_40_nrf52840
Adds new raytac_mdbt50q_db_40_nrf52840 board.

Signed-off-by: Stanley Huang <stanley@raytac.com>
2023-02-28 13:56:24 +01:00
Stanley Huang
ca552eaf20 boards: arm: add raytac_mdbt50q_db_33_nrf52833
Adds new raytac_mdbt50q_db_33_nrf52833 board.

Signed-off-by: Stanley Huang <stanley@raytac.com>
2023-02-28 13:56:24 +01: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
Marin Jurjević
12ce5beacd tests: drivers: adc: add support for nucleo_g070rb
Add support for nucleo_g070rb board to adc_api test.

Signed-off-by: Marin Jurjević <marin.jurjevic@hotmail.com>
2023-01-26 10:08:33 +00:00
Hein Wessels
0b3338472a tests: drivers: adc: adc_api: add second channel to nucleo_h743zi
Adds a second channel to the nucleo_h743zi test
because it's now supported by the driver

Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
2023-01-23 09:59:46 +00:00
YuLong Yao
2017ed50bf test: adc: add unit test for gd32a503v_eval
add unit test for gd32a503v_eval

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-01-12 21:45:38 +01:00
Daniel DeGrasse
a3f2d2bbde tests: drivers: adc: add support for RT595 to ADC API test
Enable support for RT595 in ADC API testcase

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-01-08 19:48:54 +01:00
Peter Johanson
8a29ed9092 drivers: adc: Fix ADC tests for new RP2040 board.
Fix ADC tests with new SparkFun Pro Micro RP2040 board.

Signed-off-by: Peter Johanson <peter@peterjohanson.com>
2023-01-08 19:32:59 +01:00
Marek Matej
025c73908b tests: adc: esp32 api test
Update adc test to support ESP32 targets

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2022-12-23 23:45:05 +00:00
Andriy Gelman
83da95931a tests: adc_api: Add xmc45_relax_kit config
Adds xmc45_relax_kit configuration.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2022-12-20 14:17:23 +01:00
Embla Flatlandsmo
fb51823228 boards: arm: Add adafruit_itsybitsy_nrf52840 board
Adds support for the Adafruit ItsyBitsy nRF52840 Express.

This board ships with the UF2 bootloader, so the device has
been set up so that Zephyr applications are flashed the
same way that other (Adafruit) firmware is flashed with the
UF2 bootloader.

This has been tested locally, and the button, blinky and
led_apa102 samples run without problems.

Signed-off-by: Embla Flatlandsmo <embla.flatlandsmo@gmail.com>
2022-12-07 10:06:11 +00:00
Stancu Florin
33b86d6945 tests: ADC API: add support for cc1352r* boards
Add ADC API tests for the TI CC1352R1 LaunchXL, CC2652R1 LaunchXL and
TI CC1352R SensorTag boards.

Signed-off-by: Stancu Florin <niflostancu@gmail.com>
2022-11-04 17:31:59 -04:00
Peter Johanson
29047f11ed drivers: adc: Fix ADC tests for new RP2040 board.
Fix ADC tests now that we have more than one RP2040 board.

Signed-off-by: Peter Johanson <peter@peterjohanson.com>
2022-11-03 18:15:38 +01:00
Ryan Erickson
46045e6df0 tests: ADC API: Add support for MG100 board
MG100 board added to ADC API tests.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-10-03 10:11:28 +02:00