You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
407 B
26 lines
407 B
2 years ago
|
/**
|
||
|
* 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);
|
||
|
}
|