diff --git a/boards/msbiot/include/periph_conf.h b/boards/msbiot/include/periph_conf.h index 5c998abf61dc1e6622a205ac52fd3bbb1d37b98c..c7d23ebf081d44e62174de4ebcafe5c31e2c9365 100644 --- a/boards/msbiot/include/periph_conf.h +++ b/boards/msbiot/include/periph_conf.h @@ -83,9 +83,11 @@ static const pwm_conf_t pwm_config[] = { { .dev = TIM11, .rcc_mask = RCC_APB2ENR_TIM11EN, - .pins = { GPIO_PIN(PORT_B, 9), GPIO_UNDEF, GPIO_UNDEF, GPIO_UNDEF }, + .chan = { { .pin = GPIO_PIN(PORT_B, 9), .cc_chan = 0 }, + { .pin = GPIO_UNDEF, .cc_chan = 0 }, + { .pin = GPIO_UNDEF, .cc_chan = 0 }, + { .pin = GPIO_UNDEF, .cc_chan = 0 } }, .af = GPIO_AF3, - .chan = 1, .bus = APB2 } }; diff --git a/boards/nucleo-f207/Makefile.features b/boards/nucleo-f207/Makefile.features index b53a6d772ec5452622ef0561309111b4ae0fb819..0458cbfedff69b355ec9b8414d556138184c9675 100644 --- a/boards/nucleo-f207/Makefile.features +++ b/boards/nucleo-f207/Makefile.features @@ -2,6 +2,7 @@ FEATURES_PROVIDED += periph_cpuid FEATURES_PROVIDED += periph_gpio FEATURES_PROVIDED += periph_i2c +FEATURES_PROVIDED += periph_pwm FEATURES_PROVIDED += periph_rtc FEATURES_PROVIDED += periph_spi FEATURES_PROVIDED += periph_timer diff --git a/boards/nucleo-f207/include/periph_conf.h b/boards/nucleo-f207/include/periph_conf.h index 056872f9a573d6e7a640a5a3db75ec127c200b8b..cfe40c322368952da2a2df1022dc0d0605466da4 100644 --- a/boards/nucleo-f207/include/periph_conf.h +++ b/boards/nucleo-f207/include/periph_conf.h @@ -58,10 +58,11 @@ static const pwm_conf_t pwm_config[] = { { .dev = TIM3, .rcc_mask = RCC_APB1ENR_TIM3EN, - .pins = { GPIO_PIN(PORT_C, 6), GPIO_PIN(PORT_C, 7), - GPIO_PIN(PORT_C, 8), GPIO_PIN(PORT_C, 9) }, + .chan = { { .pin = GPIO_PIN(PORT_C, 6), .cc_chan = 0 }, + { .pin = GPIO_PIN(PORT_C, 7), .cc_chan = 1 }, + { .pin = GPIO_PIN(PORT_C, 8), .cc_chan = 2 }, + { .pin = GPIO_PIN(PORT_C, 9), .cc_chan = 3 } }, .af = GPIO_AF2, - .chan = 4, .bus = APB1 } }; diff --git a/boards/nucleo-f303/include/periph_conf.h b/boards/nucleo-f303/include/periph_conf.h index 72cf1cacb144688b9fe2575bbd8adcee7bc3d4ec..be66076729d3ad55553b94efbf87c0420295f8c3 100755 --- a/boards/nucleo-f303/include/periph_conf.h +++ b/boards/nucleo-f303/include/periph_conf.h @@ -125,10 +125,11 @@ static const pwm_conf_t pwm_config[] = { { .dev = TIM3, .rcc_mask = RCC_APB1ENR_TIM3EN, - .pins = { GPIO_PIN(PORT_C, 6), GPIO_PIN(PORT_C, 7), - GPIO_PIN(PORT_C, 8), GPIO_PIN(PORT_C, 9) }, + .chan = { { .pin = GPIO_PIN(PORT_C, 6), .cc_chan = 0 }, + { .pin = GPIO_PIN(PORT_C, 7), .cc_chan = 1 }, + { .pin = GPIO_PIN(PORT_C, 8), .cc_chan = 2 }, + { .pin = GPIO_PIN(PORT_C, 9), .cc_chan = 3 } }, .af = GPIO_AF2, - .chan = 4, .bus = APB1 } }; diff --git a/boards/nucleo-f334/include/periph_conf.h b/boards/nucleo-f334/include/periph_conf.h index 99bf7e87aa2169d8ef06e7e9166bf51eaf054cc4..e2cf5a933555ae69fa361149460a367897c6eabd 100644 --- a/boards/nucleo-f334/include/periph_conf.h +++ b/boards/nucleo-f334/include/periph_conf.h @@ -109,10 +109,11 @@ static const pwm_conf_t pwm_config[] = { { .dev = TIM3, .rcc_mask = RCC_APB1ENR_TIM3EN, - .pins = { GPIO_PIN(PORT_C, 6), GPIO_PIN(PORT_C, 7), - GPIO_PIN(PORT_C, 8), GPIO_PIN(PORT_C, 9) }, + .chan = { { .pin = GPIO_PIN(PORT_C, 6), .cc_chan = 0 }, + { .pin = GPIO_PIN(PORT_C, 7), .cc_chan = 1 }, + { .pin = GPIO_PIN(PORT_C, 8), .cc_chan = 2 }, + { .pin = GPIO_PIN(PORT_C, 9), .cc_chan = 3 } }, .af = GPIO_AF2, - .chan = 4, .bus = APB1 } }; diff --git a/boards/nucleo-f446/include/periph_conf.h b/boards/nucleo-f446/include/periph_conf.h index 55f6418dd01c28f3872969d453f6d811f49a257b..31208df865e416f729defbdcb633bc37d913b217 100644 --- a/boards/nucleo-f446/include/periph_conf.h +++ b/boards/nucleo-f446/include/periph_conf.h @@ -134,28 +134,31 @@ static const pwm_conf_t pwm_config[] = { { .dev = TIM2, .rcc_mask = RCC_APB1ENR_TIM2EN, - .pins = { GPIO_PIN(PORT_A, 15), GPIO_PIN(PORT_B, 3), - GPIO_PIN(PORT_B, 10), GPIO_PIN(PORT_B, 2) }, + .chan = { { .pin = GPIO_PIN(PORT_A, 15), .cc_chan = 0}, + { .pin = GPIO_PIN(PORT_B, 3), .cc_chan = 1}, + { .pin = GPIO_PIN(PORT_B, 10), .cc_chan = 2}, + { .pin = GPIO_PIN(PORT_B, 2), .cc_chan = 3} }, .af = GPIO_AF1, - .chan = 4, .bus = APB1 }, { .dev = TIM3, .rcc_mask = RCC_APB1ENR_TIM3EN, - .pins = { GPIO_PIN(PORT_B, 4), GPIO_UNDEF, - GPIO_UNDEF, GPIO_UNDEF }, + .chan = { { .pin = GPIO_PIN(PORT_B, 4), .cc_chan = 0 }, + { .pin = GPIO_UNDEF, .cc_chan = 0 }, + { .pin = GPIO_UNDEF, .cc_chan = 0 }, + { .pin = GPIO_UNDEF, .cc_chan = 0 } }, .af = GPIO_AF2, - .chan = 1, .bus = APB1 }, { .dev = TIM8, .rcc_mask = RCC_APB2ENR_TIM8EN, - .pins = { GPIO_PIN(PORT_C, 6), GPIO_PIN(PORT_C, 7), - GPIO_PIN(PORT_C, 8), GPIO_PIN(PORT_C, 9) }, + .chan = { { .pin = GPIO_PIN(PORT_C, 6), .cc_chan = 0}, + { .pin = GPIO_PIN(PORT_C, 7), .cc_chan = 1}, + { .pin = GPIO_PIN(PORT_C, 8), .cc_chan = 2}, + { .pin = GPIO_PIN(PORT_C, 9), .cc_chan = 3} }, .af = GPIO_AF3, - .chan = 4, .bus = APB2 }, }; diff --git a/boards/stm32f3discovery/include/periph_conf.h b/boards/stm32f3discovery/include/periph_conf.h index 391ff7f3af3b8fc83ab68b159626cd409482c831..28c703c1b6c326a751676f4fe790e8770d0392af 100644 --- a/boards/stm32f3discovery/include/periph_conf.h +++ b/boards/stm32f3discovery/include/periph_conf.h @@ -127,19 +127,21 @@ static const pwm_conf_t pwm_config[] = { { .dev = TIM3, .rcc_mask = RCC_APB1ENR_TIM3EN, - .pins = { GPIO_PIN(PORT_C, 6), GPIO_PIN(PORT_C, 7), - GPIO_PIN(PORT_C, 8), GPIO_PIN(PORT_C, 9) }, + .chan = { { .pin = GPIO_PIN(PORT_C, 6), .cc_chan = 0 }, + { .pin = GPIO_PIN(PORT_C, 7), .cc_chan = 1 }, + { .pin = GPIO_PIN(PORT_C, 8), .cc_chan = 2 }, + { .pin = GPIO_PIN(PORT_C, 9), .cc_chan = 3 } }, .af = GPIO_AF2, - .chan = 4, .bus = APB1 }, { .dev = TIM4, .rcc_mask = RCC_APB1ENR_TIM4EN, - .pins = { GPIO_PIN(PORT_D, 12), GPIO_PIN(PORT_D, 13), - GPIO_PIN(PORT_D, 14), GPIO_PIN(PORT_D, 15) }, + .chan = { { .pin = GPIO_PIN(PORT_D, 12), .cc_chan = 0}, + { .pin = GPIO_PIN(PORT_D, 13), .cc_chan = 1}, + { .pin = GPIO_PIN(PORT_D, 14), .cc_chan = 2}, + { .pin = GPIO_PIN(PORT_D, 15), .cc_chan = 3} }, .af = GPIO_AF2, - .chan = 4, .bus = APB1 } }; diff --git a/boards/stm32f4discovery/include/periph_conf.h b/boards/stm32f4discovery/include/periph_conf.h index e3476f8c83de435cfa394deaf46e4930e6c5fc8e..19f90b2159a989ea577c26dff8701d9abbbf28c4 100644 --- a/boards/stm32f4discovery/include/periph_conf.h +++ b/boards/stm32f4discovery/include/periph_conf.h @@ -159,21 +159,21 @@ static const pwm_conf_t pwm_config[] = { { .dev = TIM1, .rcc_mask = RCC_APB2ENR_TIM1EN, - .pins = { GPIO_PIN(PORT_E, 9), GPIO_PIN(PORT_E, 11), - GPIO_PIN(PORT_E, 11), GPIO_PIN(PORT_E, 14) }, + .chan = { { .pin = GPIO_PIN(PORT_E, 9), .cc_chan = 0 }, + { .pin = GPIO_PIN(PORT_E, 11), .cc_chan = 1 }, + { .pin = GPIO_PIN(PORT_E, 11), .cc_chan = 2 }, + { .pin = GPIO_PIN(PORT_E, 14), .cc_chan = 3 } }, .af = GPIO_AF1, - .chan = 4, .bus = APB2 }, - { - .dev = TIM3, - .rcc_mask = RCC_APB1ENR_TIM3EN, - .pins = { GPIO_PIN(PORT_B, 4), GPIO_PIN(PORT_B, 5), - GPIO_PIN(PORT_B, 0), GPIO_PIN(PORT_B, 1) }, - .af = GPIO_AF2, - .chan = 4, - .bus = APB1 - } + // { + // .dev = TIM3, + // .rcc_mask = RCC_APB1ENR_TIM3EN, + // .chan = { GPIO_PIN(PORT_B, 4), GPIO_PIN(PORT_B, 5), + // GPIO_PIN(PORT_B, 0), GPIO_PIN(PORT_B, 1) }, + // .af = GPIO_AF2, + // .bus = APB1 + // } }; #define PWM_NUMOF (sizeof(pwm_config) / sizeof(pwm_config[0]))