Describe and use one more constant
This commit is contained in:
parent
0ca35efa15
commit
fcbbdfa986
|
@ -124,7 +124,7 @@ static int _get_time_do(ukBus * bus, unsigned char * day, unsigned char * month,
|
|||
for(i = 0; i < tries; i++)
|
||||
if(bus->read8(bus, CMOS_REGISTER_STATUS0, &status) != 0)
|
||||
return -1;
|
||||
else if((status & 0x80) == 0x00)
|
||||
else if((status & CMOS_STATUS0_UPDATING) == 0x00)
|
||||
break;
|
||||
if(i == tries)
|
||||
return -1;
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
# define CMOS_HOUR_PM 0x80
|
||||
|
||||
# define CMOS_STATUS0_UPDATING 0x80
|
||||
|
||||
# define CMOS_STATUS1_24HOUR 0x02
|
||||
# define CMOS_STATUS1_BINARY_MODE 0x04
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user