WIP: synchronization

This commit is contained in:
Jan Käberich 2022-08-08 18:08:40 +02:00
parent 7b3aa6e158
commit 73e26a25c4
41 changed files with 439 additions and 163 deletions

View file

@ -87,8 +87,8 @@ void LED::Init() {
#if HW_REVISION == 'B'
led_ncnt = 0;
mode = Mode::Off;
HAL_TIM_Base_Start(&htim2);
HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_1);
// HAL_TIM_Base_Start(&htim2);
// HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_1);
LedStatusHandle = xTaskCreateStatic(LedStatus, "LedStatusTask", LED_STATUS_TASK_STACK_SIZE_WORDS,
NULL, 6, LedStatusStack, &LedStatusCB);
@ -132,3 +132,11 @@ void LED::Error(uint8_t code) {
vTaskResume(LedStatusHandle);
#endif
}
void LED::On() {
GPIOA->BSRR = GPIO_PIN_15;
}
void LED::Toggle() {
GPIOA->ODR ^= GPIO_PIN_15;
}