Skip to content

Commit

Permalink
Formatting corrections
Browse files Browse the repository at this point in the history
Corrections for doxygen and clang-format
  • Loading branch information
Arnd Zanduino authored and Arnd Zanduino committed Dec 12, 2021
1 parent 6e643b1 commit ccdae1e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/DS3231M.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ void DS3231M_Class::pinAlarm() {
void DS3231M_Class::pinSquareWave() {
/*!
@brief Sets the control register flag to make the INT/SQW Pin produce a 1Hz signal
@detail The DS3231 allows the frequency to be set, so ensure compatibility by setting
@details The DS3231 allows the frequency to be set, so ensure compatibility by setting
the RS1 and RS2 bits to "0" so that the default is 1Hz for the DS3231. These
bits are ignored by the DS3231M
*/
Expand All @@ -530,12 +530,12 @@ void DS3231M_Class::pinSquareWave() {
void DS3231M_Class::pinSquareWave(const uint8_t rate) {
/*!
@brief Sets the control register flag to make the INT/SQW Pin produce a square signal
@detail This call produces a 1Hz signal on the DS3231M, but on the DS3231 the rate parameter
@details This call produces a 1Hz signal on the DS3231M, but on the DS3231 the rate parameter
is used to set bits RS1 and RS2 to the appropriate frequency. allows the frequency to
be set, so ensure compatibility by setting the RS1 and RS2 bits to "0" so that the
default is 1Hz for the DS3231. B00 = 1Hz, B01 = 1.024kHz, B10 = 4.096kHz,
and B11 = 8.192kHz
@param[in] rate Code for Hz rate
*/
writeByte(DS3231M_CONTROL, (readByte(DS3231M_CONTROL) & ~B00111000) | (rate | B00000011)<< 3);
writeByte(DS3231M_CONTROL, (readByte(DS3231M_CONTROL) & ~B00111000) | (rate | B00000011) << 3);
} // of method pinSquareWave()
2 changes: 1 addition & 1 deletion src/DS3231M.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ class DS3231M_Class {
uint8_t weekdayWrite(const uint8_t dow); // Write weekday to RTC
void pinAlarm(); // Make INTSQW go up on alarm
void pinSquareWave(); // Make INTSQW be a 1Hz signal
void pinSquareWave(const uint8_t rate); // Make INTSQW be a specific Hz signal on 3231
void pinSquareWave(const uint8_t rate); // Make INTSQW be a specific Hz on DS3231
private:
uint8_t readByte(const uint8_t addr); // Read 1 byte from I2C address
void writeByte(const uint8_t addr, const uint8_t data); // Write 1 byte at I2Caddress
Expand Down

0 comments on commit ccdae1e

Please sign in to comment.