main: added systen heartbeat function (reading the odd second from RTC)

This commit is contained in:
Charlez Kwan 2020-01-16 15:34:41 +01:00
parent 28be522219
commit 9c94b39c14

View file

@ -102,6 +102,7 @@ static void MX_USART1_UART_Init(void);
static void MX_RTC_Init(void); static void MX_RTC_Init(void);
/* USER CODE BEGIN PFP */ /* USER CODE BEGIN PFP */
void Paint_DrawTimeArray(void); void Paint_DrawTimeArray(void);
bool System_SecondHeartbeat(void);
/* USER CODE END PFP */ /* USER CODE END PFP */
/* Private user code ---------------------------------------------------------*/ /* 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 * @brief System Clock Configuration
* @retval None * @retval None