mirror of
https://git.etud.insa-toulouse.fr/boujon/voilier-team-1.git
synced 2025-06-08 07:50:49 +02:00
RTC fixed, display hours
This commit is contained in:
parent
30e02a0cbf
commit
41f7830086
1 changed files with 1 additions and 1 deletions
|
@ -25,7 +25,7 @@ void MyRTC_GetTime(MyRTC_Struct_TypeDef * rtc)
|
||||||
MyI2C_GetString(I2C2, 0x01, &data);
|
MyI2C_GetString(I2C2, 0x01, &data);
|
||||||
rtc->minutes = ((regCopy >> 4) & 0x07) * 10 + (regCopy & 0x0F);
|
rtc->minutes = ((regCopy >> 4) & 0x07) * 10 + (regCopy & 0x0F);
|
||||||
MyI2C_GetString(I2C2, 0x02, &data);
|
MyI2C_GetString(I2C2, 0x02, &data);
|
||||||
rtc->hours = 0;
|
rtc->hours = ((regCopy>>4)&0x01)*10 + (regCopy & 0x0F);
|
||||||
MyI2C_GetString(I2C2, 0x03, &data);
|
MyI2C_GetString(I2C2, 0x03, &data);
|
||||||
rtc->day = (regCopy & 0x07);
|
rtc->day = (regCopy & 0x07);
|
||||||
MyI2C_GetString(I2C2, 0x04, &data);
|
MyI2C_GetString(I2C2, 0x04, &data);
|
||||||
|
|
Loading…
Add table
Reference in a new issue