|
在.h文件中定義的
typedef struct
{
uint8_t Hours;
uint8_t Minutes;
uint8_t Seconds;
uint8_t SubSeconds;
uint8_t TimeFormat;
uint8_t DayLightSaving;
uint8_t StoreOperation;
} RTC_Timetypedef;
在main.c中
RTC_Timetypedef stimestructure;
主函數(shù)中
while (1)
{
HAL_RTC_GetTime(&hrtc,&stimestructure, RTC_FORMAT_BCD);
printf("%02d:%02d:%02d\r\n",stimestructure.Hours, stimestructure.Minutes, stimestructure.Seconds);
printf("\r\n");
HAL_Delay(1000);
}
結(jié)果就一直報(bào)錯(cuò)啊
../Src/main.c(154): error: #167: argument of type "RTC_Timetypedef *" is incompatible with parameter of type "RTC_TimeTypeDef *"
HAL_RTC_GetTime(&hrtc,&stimestructure, RTC_FORMAT_BCD);
請(qǐng)問(wèn)各位大佬什么原因啊。
|
|