diff --git a/include/libopencm3/stm32/dac.h b/include/libopencm3/stm32/dac.h index a3efb12e..dacb7dfa 100644 --- a/include/libopencm3/stm32/dac.h +++ b/include/libopencm3/stm32/dac.h @@ -36,6 +36,8 @@ # include #elif defined(STM32L4) # include +#elif defined(STM32G0) +# include #elif defined(STM32G4) # include #elif defined(STM32H7) diff --git a/include/libopencm3/stm32/g0/dac.h b/include/libopencm3/stm32/g0/dac.h new file mode 100644 index 00000000..1726d4ad --- /dev/null +++ b/include/libopencm3/stm32/g0/dac.h @@ -0,0 +1,41 @@ +/** @defgroup dac_defines DAC Defines + * + * @brief Defined Constants and Types for the STM32G0xx Digital-to-Analog Converter + * + * @ingroup STM32G0xx_defines + * + * 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 . + */ + +#ifndef LIBOPENCM3_DAC_H +#define LIBOPENCM3_DAC_H + +#include + +/**@{*/ + +/** @defgroup dac_reg_base DAC register base addresses +@{*/ +#define DAC1 DAC_BASE +/**@}*/ + +/**@}*/ + +#endif + diff --git a/lib/stm32/g0/Makefile b/lib/stm32/g0/Makefile index b302aeea..710f379c 100644 --- a/lib/stm32/g0/Makefile +++ b/lib/stm32/g0/Makefile @@ -35,6 +35,7 @@ TGT_CFLAGS += $(STANDARD_FLAGS) ARFLAGS = rcs OBJS += adc.o adc_common_v2.o OBJS += crc_common_all.o +OBJS += dac_common_all.o dac_common_v1.o OBJS += desig_common_all.o desig_common_v1.o OBJS += dma_common_l1f013.o OBJS += dmamux.o