Skip to content

Commit

Permalink
Update DS3231M.cppIssue #24 clang-formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
SV-Zanshin committed May 14, 2023
1 parent 27580a2 commit 9a9235e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/DS3231M.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ static uint16_t date2days(uint16_t y, uint8_t m, uint8_t d) {
for (uint8_t i = 1; i < m; ++i) {
days += pgm_read_byte(daysInMonth + i - 1); // Add number of days for each month
} // for-next each month
if (m > 2 && (((y % 4 == 0) && (y % 100 != 0)) || (y % 400 == 0))) {
if (m > 2 && (((y % 4 == 0) && (y % 100 != 0)) || (y % 400 == 0))) {
++days; // Deal with leap years
} // if-then leap year
return days + 365 * y + (y + 3) / 4 - 1; // Return computed value
Expand Down Expand Up @@ -459,7 +459,8 @@ bool DS3231M_Class::isAlarm() {
uint8_t controlByte = readByte(DS3231M_CONTROL);
unit8_t statusByte = readByte(DS3231M_STATUS);
return ((controlByte & 0xFE) && (statusByte & 0xFE)) |
((controlByte & 0xFD) && (statusByte & 0xFD))} // of method isAlarm()
((controlByte & 0xFD) && (statusByte & 0xFD));
} // of method isAlarm()
void DS3231M_Class::clearAlarm() {
/*!
@brief Clear a set alarm by re-writing the same contents back to the register
Expand Down

0 comments on commit 9a9235e

Please sign in to comment.