From 14f3a341f9a52382f4c2fd2f69b3ac28a739093e Mon Sep 17 00:00:00 2001 From: rusefillc <48498823+rusefillc@users.noreply.github.com> Date: Sat, 22 Jul 2023 15:34:22 -0700 Subject: [PATCH] explicit struct fields (#272) Co-authored-by: rusefillc --- firmware/heater_control.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/firmware/heater_control.cpp b/firmware/heater_control.cpp index 6cf94c8..504934d 100644 --- a/firmware/heater_control.cpp +++ b/firmware/heater_control.cpp @@ -46,20 +46,20 @@ using namespace wbo; // 400khz / 1024 = 390hz PWM static Pwm heaterPwm(HEATER_PWM_DEVICE); static const PWMConfig heaterPwmConfig = { - 400'000, - 1024, - nullptr, - { + .frequency = 400'000, + .period = 1024, + .callback = nullptr, + .channels = { {PWM_OUTPUT_ACTIVE_HIGH, nullptr}, {PWM_OUTPUT_ACTIVE_HIGH, nullptr}, {PWM_OUTPUT_ACTIVE_HIGH, nullptr}, {PWM_OUTPUT_ACTIVE_HIGH, nullptr} }, - 0, - 0, + .cr2 = 0, #if STM32_PWM_USE_ADVANCED - 0 + .bdtr = 0, #endif + .dier = 0 }; static constexpr int preheatTimeCounter = HEATER_PREHEAT_TIME / HEATER_CONTROL_PERIOD;