This commit is contained in:
小冯Sir 2024-05-03 14:01:03 +08:00
parent 49c136b725
commit c84bfcd86a

View File

@ -36,10 +36,10 @@ void showTime(){
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);
sprintf(buffer, "20%02u-%02u-%02u", sDate.Year, sDate.Month, sDate
.Date);
WS_TFT_Dis_12X24_String(60, 0, buffer, WHITE, BLUE);
sprintf(buffer, "%02u:%02u:%02u", sTime.Hours, sTime.Minutes, sTime.Seconds);
WS_TFT_Dis_12X24_String(72, 25, buffer, WHITE, BLUE);
}
@ -48,5 +48,7 @@ void user_Menu(){
showTime();
}