hard_pwm: Add pin defs for STM32F070 and STM32F072 (#6409)
Define hard_pwm pins for STM32F070 and STM32F072, and update KConfig accordingly. Signed-off-by: Will Puckett <willpuckett@gmail.com>
This commit is contained in:
parent
05d5451347
commit
fc102edc24
|
@ -10,7 +10,7 @@ config STM32_SELECT
|
|||
select HAVE_GPIO_I2C if !MACH_STM32F031
|
||||
select HAVE_GPIO_SPI if !MACH_STM32F031
|
||||
select HAVE_GPIO_SDIO if MACH_STM32F4
|
||||
select HAVE_GPIO_HARD_PWM if MACH_STM32F1 || MACH_STM32F4 || MACH_STM32F7 || MACH_STM32G0 || MACH_STM32H7
|
||||
select HAVE_GPIO_HARD_PWM if MACH_STM32F070 || MACH_STM32F072 || MACH_STM32F1 || MACH_STM32F4 || MACH_STM32F7 || MACH_STM32G0 || MACH_STM32H7
|
||||
select HAVE_STRICT_TIMING
|
||||
select HAVE_CHIPID
|
||||
select HAVE_STEPPER_BOTH_EDGE
|
||||
|
|
|
@ -20,7 +20,70 @@ struct gpio_pwm_info {
|
|||
};
|
||||
|
||||
static const struct gpio_pwm_info pwm_regs[] = {
|
||||
#if CONFIG_MACH_STM32F1
|
||||
#if CONFIG_MACH_STM32F0
|
||||
#if CONFIG_MACH_STM32F070
|
||||
{TIM15, GPIO('A', 2), 1, GPIO_FUNCTION(0)},
|
||||
{TIM15, GPIO('A', 3), 2, GPIO_FUNCTION(0)},
|
||||
{TIM14, GPIO('A', 4), 1, GPIO_FUNCTION(4)},
|
||||
{TIM3, GPIO('A', 6), 1, GPIO_FUNCTION(1)},
|
||||
{TIM3, GPIO('A', 7), 2, GPIO_FUNCTION(1)},
|
||||
{TIM1, GPIO('A', 8), 1, GPIO_FUNCTION(2)},
|
||||
{TIM1, GPIO('A', 9), 2, GPIO_FUNCTION(2)},
|
||||
{TIM1, GPIO('A', 10), 3, GPIO_FUNCTION(2)},
|
||||
{TIM1, GPIO('A', 11), 4, GPIO_FUNCTION(2)},
|
||||
{TIM3, GPIO('B', 0), 3, GPIO_FUNCTION(1)},
|
||||
{TIM3, GPIO('B', 1), 4, GPIO_FUNCTION(1)},
|
||||
{TIM3, GPIO('B', 4), 1, GPIO_FUNCTION(1)},
|
||||
{TIM3, GPIO('B', 5), 2, GPIO_FUNCTION(1)},
|
||||
{TIM16, GPIO('B', 8), 1, GPIO_FUNCTION(2)},
|
||||
{TIM17, GPIO('B', 9), 1, GPIO_FUNCTION(2)},
|
||||
{TIM15, GPIO('B', 14), 1, GPIO_FUNCTION(1)},
|
||||
{TIM15, GPIO('B', 15), 2, GPIO_FUNCTION(1)},
|
||||
{TIM3, GPIO('C', 6), 1, GPIO_FUNCTION(0)},
|
||||
{TIM3, GPIO('C', 7), 2, GPIO_FUNCTION(0)},
|
||||
{TIM3, GPIO('C', 8), 3, GPIO_FUNCTION(0)},
|
||||
{TIM3, GPIO('C', 9), 4, GPIO_FUNCTION(0)}
|
||||
#endif
|
||||
#if CONFIG_MACH_STM32F072
|
||||
{TIM2, GPIO('A', 1), 2, GPIO_FUNCTION(2)},
|
||||
{TIM2, GPIO('A', 2), 3, GPIO_FUNCTION(2)},
|
||||
{TIM2, GPIO('A', 3), 4, GPIO_FUNCTION(2)},
|
||||
{TIM14, GPIO('A', 4), 1, GPIO_FUNCTION(4)},
|
||||
{TIM3, GPIO('A', 6), 1, GPIO_FUNCTION(1)},
|
||||
{TIM3, GPIO('A', 7), 2, GPIO_FUNCTION(1)},
|
||||
{TIM1, GPIO('A', 8), 1, GPIO_FUNCTION(2)},
|
||||
{TIM1, GPIO('A', 9), 2, GPIO_FUNCTION(2)},
|
||||
{TIM1, GPIO('A', 10), 3, GPIO_FUNCTION(2)},
|
||||
{TIM1, GPIO('A', 11), 4, GPIO_FUNCTION(2)},
|
||||
{TIM3, GPIO('B', 0), 3, GPIO_FUNCTION(1)},
|
||||
{TIM3, GPIO('B', 1), 4, GPIO_FUNCTION(1)},
|
||||
{TIM2, GPIO('B', 3), 2, GPIO_FUNCTION(2)},
|
||||
{TIM3, GPIO('B', 4), 1, GPIO_FUNCTION(1)},
|
||||
{TIM3, GPIO('B', 5), 2, GPIO_FUNCTION(1)},
|
||||
{TIM16, GPIO('B', 8), 1, GPIO_FUNCTION(2)},
|
||||
{TIM17, GPIO('B', 9), 1, GPIO_FUNCTION(2)},
|
||||
{TIM2, GPIO('B', 10), 3, GPIO_FUNCTION(2)},
|
||||
{TIM2, GPIO('B', 11), 4, GPIO_FUNCTION(2)},
|
||||
{TIM15, GPIO('B', 14), 1, GPIO_FUNCTION(1)},
|
||||
{TIM15, GPIO('B', 15), 2, GPIO_FUNCTION(1)},
|
||||
{TIM3, GPIO('C', 6), 1, GPIO_FUNCTION(0)},
|
||||
{TIM3, GPIO('C', 7), 2, GPIO_FUNCTION(0)},
|
||||
{TIM3, GPIO('C', 8), 3, GPIO_FUNCTION(0)},
|
||||
{TIM3, GPIO('C', 9), 4, GPIO_FUNCTION(0)},
|
||||
{TIM16, GPIO('E', 0), 1, GPIO_FUNCTION(0)},
|
||||
{TIM17, GPIO('E', 1), 1, GPIO_FUNCTION(0)},
|
||||
{TIM3, GPIO('E', 3), 1, GPIO_FUNCTION(0)},
|
||||
{TIM3, GPIO('E', 4), 2, GPIO_FUNCTION(0)},
|
||||
{TIM3, GPIO('E', 5), 3, GPIO_FUNCTION(0)},
|
||||
{TIM3, GPIO('E', 6), 4, GPIO_FUNCTION(0)},
|
||||
{TIM1, GPIO('E', 9), 1, GPIO_FUNCTION(0)},
|
||||
{TIM1, GPIO('E', 11), 2, GPIO_FUNCTION(0)},
|
||||
{TIM1, GPIO('E', 13), 3, GPIO_FUNCTION(0)},
|
||||
{TIM1, GPIO('E', 14), 4, GPIO_FUNCTION(0)},
|
||||
{TIM15, GPIO('F', 9), 1, GPIO_FUNCTION(0)},
|
||||
{TIM15, GPIO('F', 10), 2, GPIO_FUNCTION(0)}
|
||||
#endif
|
||||
#elif CONFIG_MACH_STM32F1
|
||||
{TIM2, GPIO('A', 0), 1, GPIO_FUNCTION(2)},
|
||||
{TIM2, GPIO('A', 1), 2, GPIO_FUNCTION(2)},
|
||||
{TIM2, GPIO('A', 2), 3, GPIO_FUNCTION(2)},
|
||||
|
|
Loading…
Reference in New Issue