RTC fixed, display hours

This commit is contained in:
Yohan Boujon 2023-04-11 19:18:27 +02:00
parent 30e02a0cbf
commit 41f7830086

View file

@ -25,7 +25,7 @@ void MyRTC_GetTime(MyRTC_Struct_TypeDef * rtc)
MyI2C_GetString(I2C2, 0x01, &data);
rtc->minutes = ((regCopy >> 4) & 0x07) * 10 + (regCopy & 0x0F);
MyI2C_GetString(I2C2, 0x02, &data);
rtc->hours = 0;
rtc->hours = ((regCopy>>4)&0x01)*10 + (regCopy & 0x0F);
MyI2C_GetString(I2C2, 0x03, &data);
rtc->day = (regCopy & 0x07);
MyI2C_GetString(I2C2, 0x04, &data);