diff options
author | Karl Palsson <karlp@tweak.net.au> | 2019-05-09 14:49:25 +0300 |
---|---|---|
committer | Karl Palsson <karlp@tweak.net.au> | 2019-05-09 14:49:25 +0300 |
commit | ca43a73ea357fa505423ec229d4ff1091157718f (patch) | |
tree | ba8559f5c31f601e75f86cd7d02a892a4dad8eeb /include/libopencm3/stm32/common | |
parent | 486446e1db1f4f369848af9ca281ebebbb3886ad (diff) |
stm32: dac: move DAC_SR to common.
It's available on f0, f2, f3, f4, f7, l0, l1 and l4.
Just note that it's not available on f1.
Diffstat (limited to 'include/libopencm3/stm32/common')
-rw-r--r-- | include/libopencm3/stm32/common/dac_common_all.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/libopencm3/stm32/common/dac_common_all.h b/include/libopencm3/stm32/common/dac_common_all.h index 7a241ab8..258af88b 100644 --- a/include/libopencm3/stm32/common/dac_common_all.h +++ b/include/libopencm3/stm32/common/dac_common_all.h @@ -77,6 +77,10 @@ specific memorymap.h header before including this header file.*/ /* DAC channel2 data output register (DAC_DOR2) */ #define DAC_DOR2 MMIO32(DAC_BASE + 0x30) +/** DAC status register. + * @note not available on F1 + */ +#define DAC_SR MMIO32(DAC_BASE + 0x34) /* --- DAC_CR values ------------------------------------------------------- */ @@ -377,6 +381,15 @@ Unmask bits [(n-1)..0] of LFSR/Triangle Amplitude equal to (2**(n+1)-1 #define DAC_DOR2_DACC2DOR_LSB (1 << 0) #define DAC_DOR2_DACC2DOR_MSK (0x0FFF << 0) +/** @defgroup dac_sr_values DAC_SR Values +@{*/ +/** DAC channel 1 DMA underrun flag */ +#define DAC_SR_DMAUDR1 (1 << 13) + +/** DAC channel 2 DMA underrun flag */ +#define DAC_SR_DMAUDR2 (1 << 29) +/*@}*/ + /** DAC channel identifier */ typedef enum { CHANNEL_1, CHANNEL_2, CHANNEL_D |