From 9c94b39c14799ba27b7ed0166b05393e3e4b95ab Mon Sep 17 00:00:00 2001 From: Charlez Kwan Date: Thu, 16 Jan 2020 15:34:41 +0100 Subject: [PATCH] main: added systen heartbeat function (reading the odd second from RTC) --- Src/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Src/main.c b/Src/main.c index 69f1e70..30e4888 100644 --- a/Src/main.c +++ b/Src/main.c @@ -102,6 +102,7 @@ static void MX_USART1_UART_Init(void); static void MX_RTC_Init(void); /* USER CODE BEGIN PFP */ void Paint_DrawTimeArray(void); +bool System_SecondHeartbeat(void); /* USER CODE END PFP */ /* Private user code ---------------------------------------------------------*/ @@ -208,6 +209,13 @@ void Paint_DrawTimeArray(){ } } +bool System_SecondHeartbeat(){ + if(sTime.Seconds%2 == 0){ + return true; + }else{ + return false; + } +} /** * @brief System Clock Configuration * @retval None