1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards/msbiot: Add DAC feature

This commit is contained in:
Fabian Nack 2015-03-11 13:52:22 +01:00
parent faf6a1d3da
commit 54d98a4c68
2 changed files with 21 additions and 1 deletions

View File

@ -1,5 +1,5 @@
FEATURES_PROVIDED += cpp
FEATURES_PROVIDED += periph_uart periph_gpio periph_spi periph_i2c periph_pwm periph_random \
periph_adc
periph_adc periph_dac
FEATURES_PROVIDED += transceiver
FEATURES_MCU_GROUP = cortex_m4

View File

@ -114,6 +114,26 @@ extern "C" {
#define ADC_0_CH1_PIN 1
/** @} */
/**
* @name DAC configuration
* @{
*/
#define DAC_NUMOF (1U)
#define DAC_0_EN 1
#define DAC_MAX_CHANNELS 2
/* DAC 0 configuration */
#define DAC_0_DEV DAC
#define DAC_0_CHANNELS 2
#define DAC_0_CLKEN() (RCC->APB1ENR |= (RCC_APB1ENR_DACEN))
#define DAC_0_CLKDIS() (RCC->APB1ENR &= ~(RCC_APB1ENR_DACEN))
#define DAC_0_PORT GPIOA
#define DAC_0_PORT_CLKEN() (RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN)
/* DAC 0 channel config */
#define DAC_0_CH0_PIN 4
#define DAC_0_CH1_PIN 5
/** @} */
/**
* @name Random Number Generator configuration
* @{