samd/machine_dac: Add the machine.DAC class.

It suuports 1 channel @ 10 bit for SAMD21, 2 channels @ 12 bit for SAMD51.

Instantiation by:

    dac = machine.DAC(ch) # 0 or 1

Method write:

    dac.write(value)

The output voltage range is 0..Vdd.
This commit is contained in:
robert-hh
2022-06-07 20:37:44 +02:00
committed by Damien George
parent aa2d746ef4
commit f5da77b5ce
5 changed files with 167 additions and 0 deletions

View File

@@ -91,6 +91,7 @@ SRC_C = \
clock_config.c \
help.c \
machine_adc.c \
machine_dac.c \
machine_i2c.c \
machine_led.c \
machine_pin.c \
@@ -149,6 +150,7 @@ endif
# List of sources for qstr extraction
SRC_QSTR += \
machine_adc.c \
machine_dac.c \
machine_i2c.c \
machine_led.c \
machine_pin.c \