diff --git a/include/libopencm3/stm32/f3/timer.h b/include/libopencm3/stm32/f3/timer.h new file mode 100644 index 00000000..9e44e2ee --- /dev/null +++ b/include/libopencm3/stm32/f3/timer.h @@ -0,0 +1,39 @@ +/** @defgroup timer_defines Timer Defines + +@brief libopencm3 Defined Constants and Types for the STM32F3xx Timers + +@ingroup STM32F3xx_defines + +@version 1.0.0 + +@date 8 March 2013 + +@author @htmlonly © @endhtmlonly 2011 Fergus Noble + +LGPL License Terms @ref lgpl_license + */ +/* + * This file is part of the libopencm3 project. + * + * Copyright (C) 2011 Fergus Noble + * + * 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_TIMER_H +#define LIBOPENCM3_TIMER_H + +#include + +#endif diff --git a/include/libopencm3/stm32/timer.h b/include/libopencm3/stm32/timer.h index f2c5ef1b..37e9ca57 100644 --- a/include/libopencm3/stm32/timer.h +++ b/include/libopencm3/stm32/timer.h @@ -23,6 +23,8 @@ # include #elif defined(STM32F2) # include +#elif defined(STM32F3) +# include #elif defined(STM32F4) # include #elif defined(STM32L1) diff --git a/lib/stm32/common/timer_common_f24.c b/lib/stm32/common/timer_common_f24.c index dbb034eb..7eb5abf9 100644 --- a/lib/stm32/common/timer_common_f24.c +++ b/lib/stm32/common/timer_common_f24.c @@ -37,6 +37,7 @@ and similarly for TIM5 for oscillator calibration purposes. @ref tim5_opt_trigger_remap. */ +#if !defined(STM32F3) void timer_set_option(uint32_t timer_peripheral, uint32_t option) { if (timer_peripheral == TIM2) { @@ -47,6 +48,7 @@ void timer_set_option(uint32_t timer_peripheral, uint32_t option) TIM_OR(timer_peripheral) |= option; } } +#endif /*---------------------------------------------------------------------------*/ /** @brief Set Input Polarity diff --git a/lib/stm32/f3/Makefile b/lib/stm32/f3/Makefile index cc2475cc..5147f98a 100644 --- a/lib/stm32/f3/Makefile +++ b/lib/stm32/f3/Makefile @@ -38,7 +38,8 @@ OBJS = rcc.o gpio.o flash.o adc.o exti2.o OBJS += gpio_common_all.o gpio_common_f234.o i2c_common_all.o\ dac_common_all.o usart_common_all.o crc_common_all.o\ - iwdg_common_all.o spi_common_all.o dma_common_f13.o + iwdg_common_all.o spi_common_all.o dma_common_f13.o\ + timer_common_all.o timer_common_f24.o VPATH += ../../usb:../:../../cm3:../common