samples: drivers: dac: add support for frdm_k64f board

Add support for the NXP FRDM-K64F development board to the DAC driver
sample.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
This commit is contained in:
Henrik Brix Andersen 2020-04-21 10:24:30 +02:00 committed by Maureen Helm
commit ae2b3587e6
3 changed files with 18 additions and 1 deletions

View file

@ -38,6 +38,19 @@ follows:
DAC output is available on pin A32 of the primary TWR elevator DAC output is available on pin A32 of the primary TWR elevator
connector. connector.
Building and Running for NXP FRDM-K64F
======================================
The sample can be built and executed for the :ref:`frdm_k64f` as
follows:
.. zephyr-app-commands::
:zephyr-app: samples/drivers/dac
:board: frdm_k64f
:goals: build flash
:compact:
DAC output is available on connector J4 pin 11.
Sample output Sample output
============= =============

View file

@ -3,7 +3,7 @@ sample:
tests: tests:
sample.drivers.dac: sample.drivers.dac:
tags: DAC tags: DAC
platform_whitelist: nucleo_l073rz twr_ke18f platform_whitelist: frdm_k64f nucleo_l073rz twr_ke18f
depends_on: dac depends_on: dac
harness: console harness: console
harness_config: harness_config:

View file

@ -16,6 +16,10 @@
#define DAC_DEVICE_NAME DT_LABEL(DT_NODELABEL(dac0)) #define DAC_DEVICE_NAME DT_LABEL(DT_NODELABEL(dac0))
#define DAC_CHANNEL_ID 0 #define DAC_CHANNEL_ID 0
#define DAC_RESOLUTION 12 #define DAC_RESOLUTION 12
#elif defined(CONFIG_BOARD_FRDM_K64F)
#define DAC_DEVICE_NAME DT_LABEL(DT_NODELABEL(dac0))
#define DAC_CHANNEL_ID 0
#define DAC_RESOLUTION 12
#else #else
#error "Unsupported board." #error "Unsupported board."
#endif #endif