Skip to content

Commit 9d31b32

Browse files
author
Clang Robot
committed
Committing clang-format changes
1 parent e70edd3 commit 9d31b32

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

src/include/System.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ void System::rtcSetTime(uint8_t rtcHour, uint8_t rtcMinute, uint8_t rtcSecond)
207207
{
208208
Wire.beginTransmission(I2C_ADDR);
209209
Wire.write(RTC_RAM_by);
210-
Wire.write(170); // Write in RAM 170 to know that RTC is set
210+
Wire.write(170); // Write in RAM 170 to know that RTC is set
211211
Wire.write(rtcDecToBcd(rtcSecond));
212212
Wire.write(rtcDecToBcd(rtcMinute));
213213
Wire.write(rtcDecToBcd(rtcHour));
@@ -228,7 +228,7 @@ void System::rtcSetDate(uint8_t rtcWeekday, uint8_t rtcDay, uint8_t rtcMonth, ui
228228

229229
Wire.beginTransmission(I2C_ADDR);
230230
Wire.write(RTC_RAM_by);
231-
Wire.write(170); // Write in RAM 170 to know that RTC is set
231+
Wire.write(170); // Write in RAM 170 to know that RTC is set
232232
Wire.endTransmission();
233233

234234
Wire.beginTransmission(I2C_ADDR);
@@ -249,8 +249,8 @@ void System::rtcSetEpoch(uint32_t _epoch)
249249
{
250250
struct tm _t;
251251
time_t _e = _epoch;
252-
memcpy(&_t, localtime((const time_t*)&_e), sizeof(_t));
253-
252+
memcpy(&_t, localtime((const time_t *)&_e), sizeof(_t));
253+
254254
Wire.beginTransmission(I2C_ADDR);
255255
Wire.write(RTC_RAM_by);
256256
Wire.write(170);
@@ -272,12 +272,12 @@ void System::rtcSetEpoch(uint32_t _epoch)
272272
uint32_t System::rtcGetEpoch()
273273
{
274274
struct tm _t;
275-
275+
276276
Wire.beginTransmission(I2C_ADDR);
277277
Wire.write(RTC_SECOND_ADDR);
278278
Wire.endTransmission();
279279

280-
Wire.requestFrom(I2C_ADDR, 7); // ignore bit 7
280+
Wire.requestFrom(I2C_ADDR, 7); // ignore bit 7
281281
_t.tm_sec = rtcBcdToDec(Wire.read() & 0x7F);
282282
_t.tm_min = rtcBcdToDec(Wire.read() & 0x7F);
283283
_t.tm_hour = rtcBcdToDec(Wire.read() & 0x3F);
@@ -491,7 +491,7 @@ void System::rtcSetAlarm(uint8_t rtcAlarmSecond, uint8_t rtcAlarmMinute, uint8_t
491491

492492
/**
493493
* @brief Set alarm using epoch
494-
*
494+
*
495495
* @param uint32_t _epoch RTC Epoch alarm
496496
* @param uint8_t _match RTC Match
497497
*/
@@ -500,7 +500,7 @@ void System::rtcSetAlarmEpoch(uint32_t _epoch, uint8_t _match)
500500
struct tm _t;
501501
time_t _e = _epoch;
502502

503-
memcpy(&_t, localtime((const time_t*)&_e), sizeof(_t));
503+
memcpy(&_t, localtime((const time_t *)&_e), sizeof(_t));
504504

505505
Wire.beginTransmission(I2C_ADDR);
506506
Wire.write(RTC_SECOND_ALARM);
@@ -720,7 +720,7 @@ void System::rtcClearAlarmFlag()
720720
Wire.write(RTC_CTRL_2);
721721
Wire.endTransmission();
722722
Wire.requestFrom(I2C_ADDR, 1);
723-
723+
724724
_crtl_2 = Wire.read() & ~(RTC_ALARM_AF);
725725

726726
Wire.beginTransmission(I2C_ADDR);
@@ -740,7 +740,7 @@ void System::rtcClearTimerFlag()
740740
Wire.write(RTC_CTRL_2);
741741
Wire.endTransmission();
742742
Wire.requestFrom(I2C_ADDR, 1);
743-
743+
744744
_crtl_2 = Wire.read() & ~(RTC_TIMER_FLAG);
745745

746746
Wire.beginTransmission(I2C_ADDR);
@@ -760,7 +760,7 @@ void System::rtcDisableTimer()
760760
Wire.write(RTC_TIMER_MODE);
761761
Wire.endTransmission();
762762
Wire.requestFrom(I2C_ADDR, 1);
763-
763+
764764
_timerMode = Wire.read() & ~(RTC_TIMER_TE);
765765

766766
Wire.beginTransmission(I2C_ADDR);
@@ -771,7 +771,7 @@ void System::rtcDisableTimer()
771771

772772
/**
773773
* @brief Check if the RTC is already set
774-
*
774+
*
775775
* @returns bool Returns true if RTC is set, false if it's not
776776
*/
777777
bool System::rtcIsSet()
@@ -783,7 +783,7 @@ bool System::rtcIsSet()
783783

784784
Wire.requestFrom(I2C_ADDR, 1);
785785
_ramByte = Wire.read();
786-
return ((_ramByte == 170)?true:false);
786+
return ((_ramByte == 170) ? true : false);
787787
}
788788

789789
/**

src/include/System.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@
6767
#define RTC_CTRL_2_DEFAULT 0x00
6868
#define RTC_TIMER_FLAG 0x08
6969

70-
#define RTC_ALARM_MATCH_SS 0b00000001
71-
#define RTC_ALARM_MATCH_MMSS 0b00000011
72-
#define RTC_ALARM_MATCH_HHMMSS 0b00000111
73-
#define RTC_ALARM_MATCH_DHHMMSS 0b00001111
74-
#define RTC_ALARM_MATCH_WHHMSS 0b00011111
70+
#define RTC_ALARM_MATCH_SS 0b00000001
71+
#define RTC_ALARM_MATCH_MMSS 0b00000011
72+
#define RTC_ALARM_MATCH_HHMMSS 0b00000111
73+
#define RTC_ALARM_MATCH_DHHMMSS 0b00001111
74+
#define RTC_ALARM_MATCH_WHHMSS 0b00011111
7575

7676
#ifdef ARDUINO_INKPLATE6PLUS
7777
#include "Frontlight.h"

0 commit comments

Comments
 (0)