1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:32:45 +01:00

boards/samd21-xpro: enable DAC

samd21-xpro exposes PA02 on the EXT3 pin header, so we can enable
the DAC
This commit is contained in:
Benjamin Valentin 2020-04-28 01:48:30 +02:00
parent 777931bcdc
commit f4e5f016ac
2 changed files with 10 additions and 0 deletions

View File

@ -3,6 +3,7 @@ CPU_MODEL = samd21j18a
# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_adc
FEATURES_PROVIDED += periph_dac
FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_pwm
FEATURES_PROVIDED += periph_rtc

View File

@ -347,6 +347,15 @@ static const adc_conf_chan_t adc_channels[] = {
#define ADC_NUMOF ARRAY_SIZE(adc_channels)
/** @} */
/**
* @name DAC configuration
* @{
*/
#define DAC_CLOCK SAM0_GCLK_1MHZ
/* use Vcc as reference voltage */
#define DAC_VREF DAC_CTRLB_REFSEL_AVCC
/** @} */
#ifdef __cplusplus
}
#endif