From 7b391d7f76a2d56242420c560d65f00a60f78682 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Sat, 7 Aug 2010 20:29:37 -0400 Subject: basic working dac implementation --- libmaple/rcc.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libmaple/rcc.h') diff --git a/libmaple/rcc.h b/libmaple/rcc.h index 8ad70e5..2dca151 100644 --- a/libmaple/rcc.h +++ b/libmaple/rcc.h @@ -139,6 +139,7 @@ struct rcc_device { #define RCC_APB1ENR_USART3EN BIT(18) #define RCC_APB1ENR_SPI2EN BIT(14) #define RCC_APB1ENR_USB BIT(23) +#define RCC_APB1ENR_DACEN BIT(29) /* AHB peripheral clock enable bits */ #define RCC_AHBENR_DMA1EN BIT(0) @@ -174,6 +175,8 @@ struct rcc_device { #define rcc_enable_clk_adc1() __set_bits(RCC_APB2ENR, RCC_APB2ENR_ADC1EN) +#define rcc_enable_clk_dac() __set_bits(RCC_APB1ENR, RCC_APB1ENR_DACEN) + #define rcc_reset_adc1() { __set_bits(RCC_APB2RSTR, RCC_APB2RSTR_ADC1RST); \ __clear_bits(RCC_APB2RSTR, RCC_APB2RSTR_ADC1RST); \ } -- cgit v1.2.3