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