Add LED toggle function

This commit is contained in:
carsten committed 2024-06-09 17:57:48 +02:00
1 parent ef56025baa
commit 37e3672072
2 files changed
+7 -1

No files matched your search

+6 -1
View File
@@ -37,10 +37,15 @@ namespace ElektronischeLast
{
if((systick - this->last_toggle) > this->interval)
{
LL_GPIO_TogglePin(GPIOC, LL_GPIO_PIN_6);
this->toggle();
this->last_toggle = systick;
}
}
void LED::toggle(void)
{
LL_GPIO_TogglePin(GPIOC, LL_GPIO_PIN_6);
}
}
+1
View File
@@ -18,6 +18,7 @@ namespace ElektronischeLast
LED(std::uint32_t interval);
~LED();
void blink(void);
void toggle(void);
private:
std::uint32_t last_toggle;
std::uint32_t interval;