2 * This file is part of Cleanflight.
4 * Cleanflight is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * Cleanflight is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
21 #include "drivers/io.h"
22 #include "drivers/dma.h"
23 #include "drivers/timer.h"
25 const timerHardware_t timerHardware
[USABLE_TIMER_CHANNEL_COUNT
] = {
27 { TIM8
, IO_TAG(PC9
), TIM_Channel_4
, TIM8_CC_IRQn
, 0, IOCFG_AF_PP
, GPIO_AF_TIM8
, NULL
, 0, 0 }, // PPM_IN
29 { TIM2
, IO_TAG(PA3
), TIM_Channel_4
, TIM2_IRQn
, 1, IOCFG_AF_PP
, GPIO_AF_TIM2
, DMA1_Stream6
, DMA_Channel_3
, DMA1_ST6_HANDLER
}, // S1_OUT
30 { TIM3
, IO_TAG(PB0
), TIM_Channel_3
, TIM3_IRQn
, 1, IOCFG_AF_PP
, GPIO_AF_TIM3
, DMA1_Stream7
, DMA_Channel_5
, DMA1_ST7_HANDLER
}, // S2_OUT
31 { TIM3
, IO_TAG(PB1
), TIM_Channel_4
, TIM3_IRQn
, 1, IOCFG_AF_PP
, GPIO_AF_TIM3
, DMA1_Stream2
, DMA_Channel_5
, DMA1_ST2_HANDLER
}, // S3_OUT
32 { TIM2
, IO_TAG(PA2
), TIM_Channel_3
, TIM2_IRQn
, 1, IOCFG_AF_PP
, GPIO_AF_TIM2
, DMA1_Stream1
, DMA_Channel_3
, DMA1_ST1_HANDLER
}, // S4_OUT
34 // { TIM5, GPIOA, Pin_0, TIM_Channel_1, TIM5_IRQn, 1, GPIO_Mode_AF, GPIO_PinSource0, GPIO_AF_TIM5 }, // LED Strip