samples: drivers: dac: Add Nucleo-L152RE board
Enable DAC samples for Nucleo-L152RE board. Signed-off-by: Ilya Tagunov <tagunil@gmail.com>
This commit is contained in:
parent
02d673c564
commit
30e15de442
3 changed files with 14 additions and 2 deletions
|
@ -24,6 +24,17 @@ The sample can be built and executed for the
|
||||||
:goals: build flash
|
:goals: build flash
|
||||||
:compact:
|
: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
|
Building and Running for NXP TWR-KE18F
|
||||||
======================================
|
======================================
|
||||||
The sample can be built and executed for the :ref:`twr_ke18f` as
|
The sample can be built and executed for the :ref:`twr_ke18f` as
|
||||||
|
|
|
@ -3,7 +3,7 @@ sample:
|
||||||
tests:
|
tests:
|
||||||
sample.drivers.dac:
|
sample.drivers.dac:
|
||||||
tags: DAC
|
tags: DAC
|
||||||
platform_whitelist: frdm_k64f nucleo_l073rz twr_ke18f
|
platform_whitelist: frdm_k64f nucleo_l073rz nucleo_l152re twr_ke18f
|
||||||
depends_on: dac
|
depends_on: dac
|
||||||
harness: console
|
harness: console
|
||||||
harness_config:
|
harness_config:
|
||||||
|
|
|
@ -8,7 +8,8 @@
|
||||||
#include <sys/printk.h>
|
#include <sys/printk.h>
|
||||||
#include <drivers/dac.h>
|
#include <drivers/dac.h>
|
||||||
|
|
||||||
#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_DEVICE_NAME DT_LABEL(DT_ALIAS(dac1))
|
||||||
#define DAC_CHANNEL_ID 1
|
#define DAC_CHANNEL_ID 1
|
||||||
#define DAC_RESOLUTION 12
|
#define DAC_RESOLUTION 12
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue