1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-21 21:33:54 +00:00

Attempt but fail to indicate PM.

This commit is contained in:
Thomas Harte 2023-12-06 23:28:16 -05:00
parent e3119a4904
commit ef0c3549d2

View File

@ -46,7 +46,9 @@ class RTC {
if(statusB_ & 2) {
return bcd(time_date->tm_hour);
}
return bcd(1 + (time_date->tm_hour + 11)%12);
return
// ((time_date->tm_hour > 12) ? 0x80 : 0x00) |
bcd(1 + (time_date->tm_hour + 11)%12);
break;
case 0x05: return 0; // Hours alarm
case 0x06: return bcd(time_date->tm_wday + 1); // Day of the week [Sunday = 1]