stm32f3: timer support added.
This commit is contained in:
parent
6af6cec101
commit
74a313625f
39
include/libopencm3/stm32/f3/timer.h
Normal file
39
include/libopencm3/stm32/f3/timer.h
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
/** @defgroup timer_defines Timer Defines
|
||||||
|
|
||||||
|
@brief <b>libopencm3 Defined Constants and Types for the STM32F3xx Timers</b>
|
||||||
|
|
||||||
|
@ingroup STM32F3xx_defines
|
||||||
|
|
||||||
|
@version 1.0.0
|
||||||
|
|
||||||
|
@date 8 March 2013
|
||||||
|
|
||||||
|
@author @htmlonly © @endhtmlonly 2011 Fergus Noble <fergusnoble@gmail.com>
|
||||||
|
|
||||||
|
LGPL License Terms @ref lgpl_license
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* This file is part of the libopencm3 project.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2011 Fergus Noble <fergusnoble@gmail.com>
|
||||||
|
*
|
||||||
|
* 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_TIMER_H
|
||||||
|
#define LIBOPENCM3_TIMER_H
|
||||||
|
|
||||||
|
#include <libopencm3/stm32/common/timer_common_f24.h>
|
||||||
|
|
||||||
|
#endif
|
@ -23,6 +23,8 @@
|
|||||||
# include <libopencm3/stm32/f1/timer.h>
|
# include <libopencm3/stm32/f1/timer.h>
|
||||||
#elif defined(STM32F2)
|
#elif defined(STM32F2)
|
||||||
# include <libopencm3/stm32/f2/timer.h>
|
# include <libopencm3/stm32/f2/timer.h>
|
||||||
|
#elif defined(STM32F3)
|
||||||
|
# include <libopencm3/stm32/f3/timer.h>
|
||||||
#elif defined(STM32F4)
|
#elif defined(STM32F4)
|
||||||
# include <libopencm3/stm32/f4/timer.h>
|
# include <libopencm3/stm32/f4/timer.h>
|
||||||
#elif defined(STM32L1)
|
#elif defined(STM32L1)
|
||||||
|
@ -37,6 +37,7 @@ and similarly for TIM5 for oscillator calibration purposes.
|
|||||||
@ref tim5_opt_trigger_remap.
|
@ref tim5_opt_trigger_remap.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if !defined(STM32F3)
|
||||||
void timer_set_option(uint32_t timer_peripheral, uint32_t option)
|
void timer_set_option(uint32_t timer_peripheral, uint32_t option)
|
||||||
{
|
{
|
||||||
if (timer_peripheral == TIM2) {
|
if (timer_peripheral == TIM2) {
|
||||||
@ -47,6 +48,7 @@ void timer_set_option(uint32_t timer_peripheral, uint32_t option)
|
|||||||
TIM_OR(timer_peripheral) |= option;
|
TIM_OR(timer_peripheral) |= option;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/** @brief Set Input Polarity
|
/** @brief Set Input Polarity
|
||||||
|
@ -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\
|
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\
|
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
|
VPATH += ../../usb:../:../../cm3:../common
|
||||||
|
Loading…
x
Reference in New Issue
Block a user