From ccdae1eb24fdcf2a18bf0f77fe2f7520c4759e29 Mon Sep 17 00:00:00 2001 From: Arnd Zanduino Date: Sun, 12 Dec 2021 11:28:52 +0100 Subject: [PATCH] Formatting corrections Corrections for doxygen and clang-format --- src/DS3231M.cpp | 6 +++--- src/DS3231M.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/DS3231M.cpp b/src/DS3231M.cpp index dc47fca..763e5e0 100644 --- a/src/DS3231M.cpp +++ b/src/DS3231M.cpp @@ -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 */ @@ -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() diff --git a/src/DS3231M.h b/src/DS3231M.h index 3fe6511..cfcd65e 100644 --- a/src/DS3231M.h +++ b/src/DS3231M.h @@ -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