main: added systen heartbeat function (reading the odd second from RTC)
This commit is contained in:
parent
28be522219
commit
9c94b39c14
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue