Skip to content

Commit

Permalink
boards/sltb009a: enable DAC support
Browse files Browse the repository at this point in the history
  • Loading branch information
gschorcht committed Aug 15, 2023
1 parent 3a17525 commit 3283f34
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions boards/sltb009a/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ config BOARD_SLTB009A
select BOARD_COMMON_SILABS
select CPU_MODEL_EFM32GG12B810F1024GM64
select HAS_PERIPH_ADC
select HAS_PERIPH_DAC
select HAS_PERIPH_I2C
select HAS_PERIPH_RTC
select HAS_PERIPH_RTT
Expand Down
1 change: 1 addition & 0 deletions boards/sltb009a/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CPU_MODEL = efm32gg12b810f1024gm64

# 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
Expand Down
23 changes: 23 additions & 0 deletions boards/sltb009a/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,29 @@ static const adc_chan_conf_t adc_channel_config[] = {
#define ADC_NUMOF ARRAY_SIZE(adc_channel_config)
/** @} */

/**
* @name DAC configuration
* @{
*/
static const dac_conf_t dac_config[] = {
{
.dev = VDAC0,
.ref = vdacRefAvdd,
.cmu = cmuClock_VDAC0,
},
};

static const dac_chan_conf_t dac_channel_config[] = {
{
.dev = 0,
.index = 0,
},
};

#define DAC_DEV_NUMOF ARRAY_SIZE(dac_config)
#define DAC_NUMOF ARRAY_SIZE(dac_channel_config)
/** @} */

/**
* @name I2C configuration
* @{
Expand Down

0 comments on commit 3283f34

Please sign in to comment.