update menu function
This commit is contained in:
parent
8054529380
commit
8792c83418
@ -14,4 +14,5 @@
|
||||
|
||||
void Staring_Menu();
|
||||
void user_Menu();
|
||||
|
||||
#endif //APPS_CORE_APPS_INC_MENU_H_
|
||||
|
@ -7,8 +7,10 @@
|
||||
* @日 期 : 24-4-28
|
||||
******************************************************************************
|
||||
*/
|
||||
#include <stdbool.h>
|
||||
#include "menu.h"
|
||||
#include "sdio.h"
|
||||
#include "rtc.h"
|
||||
|
||||
void Staring_Menu(){
|
||||
WS_TFT_Clear(WHITE);
|
||||
@ -24,8 +26,27 @@ void Staring_Menu(){
|
||||
WS_TFT_Dis_12X24_String(0,0,"SD card mount fail!",WHITE,RED);
|
||||
WS_TFT_Dis_12X24_String(0,0,"Please Check sdCard",WHITE,RED);
|
||||
}
|
||||
HAL_Delay(20);
|
||||
WS_TFT_Clear(WHITE);
|
||||
}
|
||||
|
||||
void showTime(){
|
||||
RTC_TimeTypeDef sTime;
|
||||
RTC_DateTypeDef sDate;
|
||||
HAL_RTC_GetTime(&hrtc,&sTime,RTC_FORMAT_BIN);
|
||||
HAL_RTC_GetDate(&hrtc,&sDate,RTC_FORMAT_BIN);
|
||||
uint8_t buffer[32];
|
||||
sprintf(buffer,"20%02d-%02d-%02d week %d",sDate.Year,sDate.Month,sDate
|
||||
.Date,sDate.WeekDay);
|
||||
WS_TFT_Dis_12X24_String(16,0,buffer,WHITE,BLUE);
|
||||
sprintf(buffer,"%02d:%02d:%02d",sTime.Hours,sTime.Minutes,sTime.Seconds);
|
||||
WS_TFT_Dis_12X24_String(72,25,buffer,WHITE,BLUE);
|
||||
|
||||
}
|
||||
|
||||
void user_Menu(){
|
||||
HAL_Delay(20);
|
||||
|
||||
showTime();
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user