From 30e15de442d7b3944cfbe014790f20bd8a74b357 Mon Sep 17 00:00:00 2001 From: Ilya Tagunov Date: Fri, 8 May 2020 01:57:41 +0300 Subject: [PATCH] samples: drivers: dac: Add Nucleo-L152RE board Enable DAC samples for Nucleo-L152RE board. Signed-off-by: Ilya Tagunov --- samples/drivers/dac/README.rst | 11 +++++++++++ samples/drivers/dac/sample.yaml | 2 +- samples/drivers/dac/src/main.c | 3 ++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/samples/drivers/dac/README.rst b/samples/drivers/dac/README.rst index 45e5af1ed60..f5732e5d6b7 100644 --- a/samples/drivers/dac/README.rst +++ b/samples/drivers/dac/README.rst @@ -24,6 +24,17 @@ The sample can be built and executed for the :goals: build flash :compact: +Building and Running for ST Nucleo L152RE +========================================= +The sample can be built and executed for the +:ref:`nucleo_l152re_board` as follows: + +.. zephyr-app-commands:: + :zephyr-app: samples/drivers/dac + :board: nucleo_l152re + :goals: build flash + :compact: + Building and Running for NXP TWR-KE18F ====================================== The sample can be built and executed for the :ref:`twr_ke18f` as diff --git a/samples/drivers/dac/sample.yaml b/samples/drivers/dac/sample.yaml index f9fc1e61eba..5be269775bb 100644 --- a/samples/drivers/dac/sample.yaml +++ b/samples/drivers/dac/sample.yaml @@ -3,7 +3,7 @@ sample: tests: sample.drivers.dac: tags: DAC - platform_whitelist: frdm_k64f nucleo_l073rz twr_ke18f + platform_whitelist: frdm_k64f nucleo_l073rz nucleo_l152re twr_ke18f depends_on: dac harness: console harness_config: diff --git a/samples/drivers/dac/src/main.c b/samples/drivers/dac/src/main.c index 71674cfadd7..7d9031de1ac 100644 --- a/samples/drivers/dac/src/main.c +++ b/samples/drivers/dac/src/main.c @@ -8,7 +8,8 @@ #include #include -#if defined(CONFIG_BOARD_NUCLEO_L073RZ) +#if defined(CONFIG_BOARD_NUCLEO_L073RZ) || \ + defined(CONFIG_BOARD_NUCLEO_L152RE) #define DAC_DEVICE_NAME DT_LABEL(DT_ALIAS(dac1)) #define DAC_CHANNEL_ID 1 #define DAC_RESOLUTION 12