Fork of Ds3231 library that replaces inheritance of I2C class with a private member var of type I2C *
Dependents: ard2pmod DS3231_Alarm_Demo MAXREFDES130_131_Demo MAXREFDES130_Demo
Fork of ds3231 by
Diff: ds3231.cpp
- Revision:
- 16:e1c0f63595d9
- Parent:
- 15:16ca4c747252
diff -r 16ca4c747252 -r e1c0f63595d9 ds3231.cpp --- a/ds3231.cpp Mon Mar 28 19:17:34 2016 +0000 +++ b/ds3231.cpp Sun Aug 21 01:39:50 2016 +0000 @@ -417,11 +417,11 @@ if(alarm->mode) { - alarm->hours = bcd_2_uchar((data[2]&0x1F)); + alarm->hours = bcd_2_uchar((data[1]&0x1F)); } else { - alarm->hours = bcd_2_uchar((data[2]&0x3F)); + alarm->hours = bcd_2_uchar((data[1]&0x3F)); } if(data[2] & DY_DT)