aboutsummaryrefslogtreecommitdiffstats
path: root/src/stm32/hard_pwm.c
diff options
context:
space:
mode:
authorAlex Voinea <voinea.dragos.alexandru@gmail.com>2023-01-03 19:43:46 +0200
committerGitHub <noreply@github.com>2023-01-03 12:43:46 -0500
commit9c2ccceb9f4890abe9d2c8a0953ae59fd529b8ef (patch)
tree706002d244b96368930ad777d434fcbcdf014815 /src/stm32/hard_pwm.c
parentb337cc3ee87c6620d2211a08e5568d59ad92b681 (diff)
downloadkutter-9c2ccceb9f4890abe9d2c8a0953ae59fd529b8ef.tar.gz
kutter-9c2ccceb9f4890abe9d2c8a0953ae59fd529b8ef.tar.xz
kutter-9c2ccceb9f4890abe9d2c8a0953ae59fd529b8ef.zip
stm32: Expand stm32g0 family (#5838)
Add stm32g07x family support. Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
Diffstat (limited to 'src/stm32/hard_pwm.c')
-rw-r--r--src/stm32/hard_pwm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/stm32/hard_pwm.c b/src/stm32/hard_pwm.c
index 449de8b9..0aafe7d4 100644
--- a/src/stm32/hard_pwm.c
+++ b/src/stm32/hard_pwm.c
@@ -117,10 +117,12 @@ static const struct gpio_pwm_info pwm_regs[] = {
{TIM1, GPIO('B', 3), 2, GPIO_FUNCTION(1)},
{TIM3, GPIO('B', 4), 1, GPIO_FUNCTION(1)},
{TIM3, GPIO('B', 5), 2, GPIO_FUNCTION(1)},
+#if CONFIG_MACH_STM32G0Bx
{TIM4, GPIO('B', 6), 1, GPIO_FUNCTION(9)},
{TIM4, GPIO('B', 7), 2, GPIO_FUNCTION(9)},
{TIM4, GPIO('B', 8), 3, GPIO_FUNCTION(9)},
{TIM4, GPIO('B', 9), 4, GPIO_FUNCTION(9)},
+#endif
{TIM15, GPIO('B', 14), 1, GPIO_FUNCTION(5)},
{TIM15, GPIO('B', 15), 2, GPIO_FUNCTION(5)},
{TIM15, GPIO('C', 1), 1, GPIO_FUNCTION(2)},
@@ -134,10 +136,12 @@ static const struct gpio_pwm_info pwm_regs[] = {
{TIM14, GPIO('C', 12), 1, GPIO_FUNCTION(2)},
{TIM16, GPIO('D', 0), 1, GPIO_FUNCTION(2)},
{TIM17, GPIO('D', 1), 1, GPIO_FUNCTION(2)},
+#if CONFIG_MACH_STM32G0Bx
{TIM4, GPIO('D', 12), 1, GPIO_FUNCTION(2)},
{TIM4, GPIO('D', 13), 2, GPIO_FUNCTION(2)},
{TIM4, GPIO('D', 14), 3, GPIO_FUNCTION(2)},
{TIM4, GPIO('D', 15), 4, GPIO_FUNCTION(2)},
+#endif
{TIM3, GPIO('E', 3), 1, GPIO_FUNCTION(1)},
{TIM3, GPIO('E', 4), 2, GPIO_FUNCTION(1)},
{TIM3, GPIO('E', 5), 3, GPIO_FUNCTION(1)},