correct channels (#4190)

This commit is contained in:
Matthew Kennedy 2022-05-19 16:09:41 -07:00 committed by GitHub
parent 367f58675e
commit 885693d5a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -246,8 +246,8 @@ static expected<stm32_pwm_config> getConfigForPin(brain_pin_e pin) {
case Gpio::B4: return stm32_pwm_config{&PWMD3, 0, 2};
case Gpio::B5: return stm32_pwm_config{&PWMD3, 1, 2};
case Gpio::C6: return stm32_pwm_config{&PWMD3, 2, 2};
case Gpio::C7: return stm32_pwm_config{&PWMD3, 3, 2};
case Gpio::C6: return stm32_pwm_config{&PWMD3, 0, 2};
case Gpio::C7: return stm32_pwm_config{&PWMD3, 1, 2};
#endif
#if STM32_PWM_USE_TIM4
case Gpio::B6: return stm32_pwm_config{&PWMD4, 0, 2};
@ -287,12 +287,12 @@ static expected<stm32_pwm_config> getConfigForPin(brain_pin_e pin) {
}
};
stm32_hardware_pwm pwms[5];
static stm32_hardware_pwm hardPwms[5];
stm32_hardware_pwm* getNextPwmDevice() {
for (size_t i = 0; i < efi::size(pwms); i++) {
if (!pwms[i].hasInit()) {
return &pwms[i];
for (size_t i = 0; i < efi::size(hardPwms); i++) {
if (!hardPwms[i].hasInit()) {
return &hardPwms[i];
}
}