/** * TODO file description */ #include "main.h" #include "app_heater.h" #include "tim.h" void app_heater_init() { HAL_TIM_Base_Start(&htim3); HAL_TIM_PWM_Start(&htim3, TIM_CHANNEL_1); } void app_heater_set(bool active) { if (active) { TIM3->CCR1 = TIM3->ARR / 2; // testing - 50% } else { TIM3->CCR1 = 0; } }