From a7bcf6446bac48fe41655d0a163902b3fc3ca764 Mon Sep 17 00:00:00 2001 From: Federico Ruiz Ugalde Date: Wed, 26 Jun 2013 01:29:30 -0600 Subject: [PATCH] stm32f3 dac support added. --- include/libopencm3/stm32/dac.h | 2 ++ include/libopencm3/stm32/f3/dac.h | 38 +++++++++++++++++++++++++++++++ lib/stm32/f3/Makefile | 3 ++- lib/stm32/f3/dac.c | 33 +++++++++++++++++++++++++++ 4 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 include/libopencm3/stm32/f3/dac.h create mode 100644 lib/stm32/f3/dac.c diff --git a/include/libopencm3/stm32/dac.h b/include/libopencm3/stm32/dac.h index 242ef89f..fe2249bc 100644 --- a/include/libopencm3/stm32/dac.h +++ b/include/libopencm3/stm32/dac.h @@ -21,6 +21,8 @@ # include #elif defined(STM32F2) # include +#elif defined(STM32F3) +# include #elif defined(STM32F4) # include #elif defined(STM32L1) diff --git a/include/libopencm3/stm32/f3/dac.h b/include/libopencm3/stm32/f3/dac.h new file mode 100644 index 00000000..8fe241ee --- /dev/null +++ b/include/libopencm3/stm32/f3/dac.h @@ -0,0 +1,38 @@ +/** @defgroup dac_defines DAC Defines + +@brief Defined Constants and Types for the STM32F3xx DAC + +@ingroup STM32F3xx_defines + +@version 1.0.0 + +@date 5 December 2012 + +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 +#include + +#endif + diff --git a/lib/stm32/f3/Makefile b/lib/stm32/f3/Makefile index 0eb56937..b116f90e 100644 --- a/lib/stm32/f3/Makefile +++ b/lib/stm32/f3/Makefile @@ -36,7 +36,8 @@ ARFLAGS = rcs OBJS = rcc.o gpio.o flash.o adc.o -OBJS += gpio_common_all.o gpio_common_f234.o i2c_common_all.o +OBJS += gpio_common_all.o gpio_common_f234.o i2c_common_all.o\ + dac_common_all.o VPATH += ../../usb:../:../../cm3:../common diff --git a/lib/stm32/f3/dac.c b/lib/stm32/f3/dac.c new file mode 100644 index 00000000..4f681174 --- /dev/null +++ b/lib/stm32/f3/dac.c @@ -0,0 +1,33 @@ +/** @defgroup dac_file DAC + +@ingroup STM32F3xx + +@brief libopencm3 STM32F3xx DAC + +@version 1.0.0 + +@date 18 August 2012 + +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 . + */ + +#include +#include +