Zanduino / DS3231M

Access the DS3231M I2C Realtime Clock
GNU General Public License v3.0
15 stars 7 forks source link

logic on pinAlarm and pinSquareWave are inverted #9

Closed lagg070988 closed 5 years ago

lagg070988 commented 5 years ago

void DS3231M_Class::pinAlarm() { writeByte(DS3231M_CONTROL,readByte(DS3231M_CONTROL)&~0x4); // Set bit 3 to on } // of method pinAlarm() this logical operator (&~) should be an or |

void DS3231M_Class::pinSquareWave() { writeByte(DS3231M_CONTROL,readByte(DS3231M_CONTROL)|0x4); } // of method pinSquareWave() this logical operator (|) should be an and &~

SV-Zanshin commented 5 years ago

Sorry for the delay - I am currently travelling. I'll update the library in the coming week.

SV-Zanshin commented 5 years ago

Sorry it took so long. I'm back home now and have updated the library code.