Skip to content

Commit

Permalink
samples: drivers: dac: add gd32f450i_eval board
Browse files Browse the repository at this point in the history
DAC sample support gd32f450i_eval board.

Signed-off-by: HaiLong Yang <cameledyang@pm.me>
  • Loading branch information
cameled authored and carlescufi committed Dec 16, 2021
1 parent b5dabf5 commit ff9d967
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
13 changes: 13 additions & 0 deletions samples/drivers/dac/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,19 @@ built and executed for the :ref:`bl5340_dvk` as follows:

DAC output is available on pin 1 of the MCP4725.

Building and Running for GD32450I-EVAL
======================================
The sample can be built and executed for the
:ref:`gd32f450i_eval` as follows:

.. zephyr-app-commands::
:zephyr-app: samples/drivers/dac
:board: gd32f450i_eval
:goals: build flash
:compact:

Bridge the JP23 to DAC with the jumper cap, then DAC output will available on JP7.

Sample output
=============

Expand Down
13 changes: 13 additions & 0 deletions samples/drivers/dac/boards/gd32f450i_eval.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright 2021 BrainCo Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/

/ {
zephyr,user {
dac = <&dac>;
dac-channel-id = <0>;
dac-resolution = <12>;
};
};
1 change: 1 addition & 0 deletions samples/drivers/dac/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ tests:
arduino_zero frdm_k22f frdm_k64f nucleo_f091rc nucleo_g071rb nucleo_g431rb
nucleo_l073rz nucleo_l152re twr_ke18f nucleo_f767zi nucleo_f429zi bl652_dvk
bl653_dvk bl654_dvk bl5340_dvk_cpuapp stm32f3_disco stm32l562e_dk nucleo_l552ze_q
gd32f450i_eval
depends_on: dac
harness: console
harness_config:
Expand Down

0 comments on commit ff9d967

Please sign in to comment.