1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 06:12:43 +01:00

boards/saml21-xpro: enable DAC

saml21-xpro exposes PA02 and PA05 on the EXT1 pin header,
so we can enable the DAC.
This commit is contained in:
Benjamin Valentin 2020-04-28 01:49:42 +02:00
parent f4e5f016ac
commit 3d458310f4
2 changed files with 11 additions and 0 deletions

View File

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

View File

@ -184,6 +184,16 @@ static const adc_conf_chan_t adc_channels[] = {
#define ADC_NUMOF ARRAY_SIZE(adc_channels)
/** @} */
/**
* @name DAC configuration
* @{
*/
/* Must not exceed 12 MHz */
#define DAC_CLOCK SAM0_GCLK_8MHZ
/* use Vcc as reference voltage */
#define DAC_VREF DAC_CTRLB_REFSEL_VDDANA
/** @} */
#ifdef __cplusplus
}
#endif