Skip to content

Commit

Permalink
ev11l78a: configure DAC peripheral
Browse files Browse the repository at this point in the history
This configures the DAC in the same way as it is configured for the
arduino_zero and other similar boards.

It also includes the board in the DAC tests.

Signed-off-by: Diego Elio Pettenò <[email protected]>
  • Loading branch information
Flameeyes committed Sep 10, 2023
1 parent 6153e50 commit 637e986
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 1 deletion.
2 changes: 2 additions & 0 deletions boards/arm/ev11l78a/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ features:
+-----------+------------+------------------------------------------+
| ADC | on-chip | Analog-to-Digital Converter |
+-----------+------------+------------------------------------------+
| DAC | on-chip | Digital-to-Analog Converter |
+-----------+------------+------------------------------------------+

Other hardware features are not currently supported by Zephyr.

Expand Down
6 changes: 6 additions & 0 deletions boards/arm/ev11l78a/ev11l78a-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,10 @@
<PA5B_ADC_AIN5>;
};
};

dac_default: dac_default {
group1 {
pinmux = <PA2B_DAC_VOUT>;
};
};
};
7 changes: 7 additions & 0 deletions boards/arm/ev11l78a/ev11l78a.dts
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,10 @@
pinctrl-0 = <&adc_default>;
pinctrl-names = "default";
};

&dac0 {
status = "okay";

pinctrl-0 = <&dac_default>;
pinctrl-names = "default";
};
1 change: 1 addition & 0 deletions boards/arm/ev11l78a/ev11l78a.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ toolchain:
- xtools
supported:
- adc
- dac
- gpio
- i2c
- spi
Expand Down
3 changes: 2 additions & 1 deletion tests/drivers/dac/dac_api/src/test_dac.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
defined(CONFIG_BOARD_FRDM_K22F) || \
defined(CONFIG_BOARD_SEEEDUINO_XIAO) || \
defined(CONFIG_BOARD_ARDUINO_MKRZERO) || \
defined(CONFIG_BOARD_ARDUINO_ZERO)
defined(CONFIG_BOARD_ARDUINO_ZERO) || \
defined(CONFIG_BOARD_EV11L78A)

#define DAC_DEVICE_NODE DT_NODELABEL(dac0)
#define DAC_RESOLUTION 12
Expand Down

0 comments on commit 637e986

Please sign in to comment.