добавлено моргание диода каждую секунду

This commit is contained in:
2026-04-12 10:56:43 +03:00
parent 76bbd4a539
commit f0f5f625e9
93 changed files with 417 additions and 7068 deletions

View File

@@ -26,10 +26,15 @@ void ClockManager_Init(void) {
}
}
time_t ClockManager_GetTime(void) {
time_t ClockManager_GetTime(int blink) {
HAL_RTC_GetTime(&hrtc, &rtc_time, RTC_FORMAT_BIN);
currentTime.hour = rtc_time.Hours;
currentTime.min = rtc_time.Minutes;
if(blink)
{
if(currentTime.sec != rtc_time.Seconds)
HAL_GPIO_TogglePin(LED_GPIO_Port, LED_Pin);
}
currentTime.sec = rtc_time.Seconds;
return currentTime;
}