diff options
author | Eric Van Albert <eric@van.al> | 2019-06-11 06:06:33 +0300 |
---|---|---|
committer | Karl Palsson <karlp@tweak.net.au> | 2019-06-13 02:25:22 +0300 |
commit | 3d422a930fde20bf1de177d663d93eb532c9a117 (patch) | |
tree | 87e47617e5e08fc76a579a7ffd9272cc404e7033 /include | |
parent | 209dea96e7b45a1266b070bf1157a4e4a7a49800 (diff) |
stm32l4: add common DAC support
Replace the DAC1_BASE style, only used on l4 with the standard DAC_BASE
used on all other targets.
Reviewed-by: Karl Palsson <karlp@tweak.net.au>
Diffstat (limited to 'include')
-rw-r--r-- | include/libopencm3/stm32/dac.h | 2 | ||||
-rw-r--r-- | include/libopencm3/stm32/l4/dac.h | 37 | ||||
-rw-r--r-- | include/libopencm3/stm32/l4/memorymap.h | 2 |
3 files changed, 40 insertions, 1 deletions
diff --git a/include/libopencm3/stm32/dac.h b/include/libopencm3/stm32/dac.h index 962210f3..6a17a738 100644 --- a/include/libopencm3/stm32/dac.h +++ b/include/libopencm3/stm32/dac.h @@ -34,6 +34,8 @@ # include <libopencm3/stm32/f7/dac.h> #elif defined(STM32L1) # include <libopencm3/stm32/l1/dac.h> +#elif defined(STM32L4) +# include <libopencm3/stm32/l4/dac.h> #else # error "stm32 family not defined." #endif diff --git a/include/libopencm3/stm32/l4/dac.h b/include/libopencm3/stm32/l4/dac.h new file mode 100644 index 00000000..10b275a7 --- /dev/null +++ b/include/libopencm3/stm32/l4/dac.h @@ -0,0 +1,37 @@ +/** @defgroup dac_defines DAC Defines + +@brief <b>Defined Constants and Types for the STM32L4xx DAC</b> + +@ingroup STM32L4xx_defines + +@version 1.0.0 + +@date 8 June 2019 + +LGPL License Terms @ref lgpl_license + */ + +/* + * This file is part of the libopencm3 project. + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef LIBOPENCM3_DAC_H +#define LIBOPENCM3_DAC_H + +#include <libopencm3/stm32/common/dac_common_all.h> + +#endif + diff --git a/include/libopencm3/stm32/l4/memorymap.h b/include/libopencm3/stm32/l4/memorymap.h index 40567a34..baaa32f5 100644 --- a/include/libopencm3/stm32/l4/memorymap.h +++ b/include/libopencm3/stm32/l4/memorymap.h @@ -61,7 +61,7 @@ #define USB_DEV_FS_BASE (PERIPH_BASE_APB1 + 0x6800) #define USB_PMA_BASE (PERIPH_BASE_APB1 + 0x6c00) #define POWER_CONTROL_BASE (PERIPH_BASE_APB1 + 0x7000) -#define DAC1_BASE (PERIPH_BASE_APB1 + 0x7400) +#define DAC_BASE (PERIPH_BASE_APB1 + 0x7400) #define OPAMP_BASE (PERIPH_BASE_APB1 + 0x7800) #define LPTIM1_BASE (PERIPH_BASE_APB1 + 0x7c00) #define LPUART1_BASE (PERIPH_BASE_APB1 + 0x8000) |