Skip to content

Commit 6b03c8d

Browse files
committed
Change rtc function names to adhere to camelCase
1 parent e6286d6 commit 6b03c8d

106 files changed

Lines changed: 1101 additions & 1101 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples/Inkplate10/Advanced/DeepSleep/Inkplate10_RTC_Alarm_With_Deep_Sleep/Inkplate10_RTC_Alarm_With_Deep_Sleep.ino

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -61,22 +61,22 @@ void setup()
6161
{
6262
display.begin(); // Init Inkplate library (you should call this function ONLY ONCE)
6363

64-
display.rtc.ClearAlarmFlag(); // Clear alarm flag from any previous alarm
64+
display.rtc.clearAlarmFlag(); // Clear alarm flag from any previous alarm
6565

66-
if (!display.rtc.IsSet()) // Check if RTC is already is set. If ts not, set time and date
66+
if (!display.rtc.isSet()) // Check if RTC is already is set. If ts not, set time and date
6767
{
6868
// display.setTime(hour, minute, sec);
69-
display.rtc.SetTime(13, 30, 00); // 24H mode, ex. 13:30:00
69+
display.rtc.setTime(13, 30, 00); // 24H mode, ex. 13:30:00
7070
// display.setDate(weekday, day, month, yr);
71-
display.rtc.SetDate(1, 5, 12, 2022); // 0 for Monday, ex. Saturday, 5.12.2022.
71+
display.rtc.setDate(1, 5, 12, 2022); // 0 for Monday, ex. Saturday, 5.12.2022.
7272

73-
// display.rtc.SetEpoch(1589610300); // Or use epoch for setting the time and date
73+
// display.rtc.setEpoch(1589610300); // Or use epoch for setting the time and date
7474
}
7575

7676
printCurrentTime(); // Display current time and date
7777
display.display();
7878

79-
display.rtc.SetAlarmEpoch(display.rtc.GetEpoch() + 10, RTC_ALARM_MATCH_DHHMMSS); // Set RTC alarm 10 seconds from now
79+
display.rtc.setAlarmEpoch(display.rtc.getEpoch() + 10, RTC_ALARM_MATCH_DHHMMSS); // Set RTC alarm 10 seconds from now
8080

8181
// Enable wakup from deep sleep on gpio 39 where RTC interrupt is connected
8282
esp_sleep_enable_ext0_wakeup(GPIO_NUM_39, 0);
@@ -96,9 +96,9 @@ void printCurrentTime()
9696
display.setCursor(100, 300);
9797
display.setTextSize(3);
9898

99-
display.rtc.GetRtcData();
99+
display.rtc.getRtcData();
100100

101-
switch (display.rtc.GetWeekday())
101+
switch (display.rtc.getWeekday())
102102
{
103103
case 0:
104104
display.print("Sunday , ");
@@ -123,17 +123,17 @@ void printCurrentTime()
123123
break;
124124
}
125125

126-
display.print(display.rtc.GetDay());
126+
display.print(display.rtc.getDay());
127127
display.print(".");
128-
display.print(display.rtc.GetMonth());
128+
display.print(display.rtc.getMonth());
129129
display.print(".");
130-
display.print(display.rtc.GetYear());
130+
display.print(display.rtc.getYear());
131131
display.print(". ");
132-
print2Digits(display.rtc.GetHour());
132+
print2Digits(display.rtc.getHour());
133133
display.print(':');
134-
print2Digits(display.rtc.GetMinute());
134+
print2Digits(display.rtc.getMinute());
135135
display.print(':');
136-
print2Digits(display.rtc.GetSecond());
136+
print2Digits(display.rtc.getSecond());
137137
}
138138

139139
void print2Digits(uint8_t _d)

examples/Inkplate10/Advanced/RTC/Inkplate10_RTC_Alarm/Inkplate10_RTC_Alarm.ino

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ void setup()
8181
display.display(); // Put clear image on display
8282
display.setTextSize(5); // Set text to be 5 times bigger than classic 5x7 px text
8383

84-
display.rtc.SetTime(hour, minutes, seconds); // Send time to RTC
85-
display.rtc.SetDate(weekday, day, month, year); // Send date to RTC
86-
display.rtc.SetAlarm(alarmSeconds, alarmMinutes, alarmHour, alarmDay, alarmWeekday); // Set alarm
84+
display.rtc.setTime(hour, minutes, seconds); // Send time to RTC
85+
display.rtc.setDate(weekday, day, month, year); // Send date to RTC
86+
display.rtc.setAlarm(alarmSeconds, alarmMinutes, alarmHour, alarmDay, alarmWeekday); // Set alarm
8787
}
8888

8989
// Variable that keeps count on how much screen has been partially updated
@@ -92,22 +92,22 @@ void loop()
9292
{
9393
if ((unsigned long)(millis() - time1) > REFRESH_DELAY)
9494
{
95-
display.rtc.GetRtcData(); // Get the time and date from RTC
96-
seconds = display.rtc.GetSecond(); // Store senconds in a variable
97-
minutes = display.rtc.GetMinute(); // Store minutes in a variable
98-
hour = display.rtc.GetHour(); // Store hours in a variable
99-
day = display.rtc.GetDay(); // Store day of month in a variable
100-
weekday = display.rtc.GetWeekday(); // Store day of week in a variable
101-
month = display.rtc.GetMonth(); // Store month in a variable
102-
year = display.rtc.GetYear(); // Store year in a variable
95+
display.rtc.getRtcData(); // Get the time and date from RTC
96+
seconds = display.rtc.getSecond(); // Store senconds in a variable
97+
minutes = display.rtc.getMinute(); // Store minutes in a variable
98+
hour = display.rtc.getHour(); // Store hours in a variable
99+
day = display.rtc.getDay(); // Store day of month in a variable
100+
weekday = display.rtc.getWeekday(); // Store day of week in a variable
101+
month = display.rtc.getMonth(); // Store month in a variable
102+
year = display.rtc.getYear(); // Store year in a variable
103103

104104
display.clearDisplay(); // Clear content in frame buffer
105105
display.setCursor(100, 300); // Set position of the text
106106
printTime(hour, minutes, seconds, day, weekday, month, year); // Print the time on screen
107107

108-
if (display.rtc.CheckAlarmFlag()) // Check if alarm has occurred
108+
if (display.rtc.checkAlarmFlag()) // Check if alarm has occurred
109109
{
110-
display.rtc.ClearAlarmFlag(); // It's recommended to clear alarm flag after alarm has occurred
110+
display.rtc.clearAlarmFlag(); // It's recommended to clear alarm flag after alarm has occurred
111111
display.setCursor(400, 400); // Set new position for cursor
112112
display.print("ALARM!");
113113
}

examples/Inkplate10/Advanced/RTC/Inkplate10_RTC_Interrupt_Alarm/Inkplate10_RTC_Interrupt_Alarm.ino

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ void setup()
7070
display.display(); // Put clear image on display
7171
display.setTextSize(5); // Set text to be 5 times bigger than classic 5x7 px text
7272

73-
display.rtc.SetEpoch(1589610300);
74-
display.rtc.SetAlarmEpoch(display.rtc.GetEpoch() + 10, RTC_ALARM_MATCH_DHHMMSS);
73+
display.rtc.setEpoch(1589610300);
74+
display.rtc.setAlarmEpoch(display.rtc.getEpoch() + 10, RTC_ALARM_MATCH_DHHMMSS);
7575

7676
// display.rtcSetTime(6, 25, 0); // Or you can use other way to set the time and date
7777
// display.rtcSetDate(6, 16, 5, 2020);
@@ -86,15 +86,15 @@ void loop()
8686
{
8787
display.clearDisplay(); // Clear frame buffer of display
8888
display.setCursor(100, 100); // Set position of the text
89-
display.rtc.GetRtcData(); // Get the time and date from RTC
89+
display.rtc.getRtcData(); // Get the time and date from RTC
9090

9191
// Print the time on screen
92-
printTime(display.rtc.GetHour(), display.rtc.GetMinute(), display.rtc.GetSecond(), display.rtc.GetDay(), display.rtc.GetWeekday(), display.rtc.GetMonth(), display.rtc.GetYear());
92+
printTime(display.rtc.getHour(), display.rtc.getMinute(), display.rtc.getSecond(), display.rtc.getDay(), display.rtc.getWeekday(), display.rtc.getMonth(), display.rtc.getYear());
9393

9494
if (_alarmFlag) // Check alarm flag
9595
{
9696
// _alarmFlag = 0; // Uncomment if you want to clear this flag
97-
display.rtc.ClearAlarmFlag(); // It's recommended to clear alarm flag after alarm has occurred
97+
display.rtc.clearAlarmFlag(); // It's recommended to clear alarm flag after alarm has occurred
9898
display.setCursor(200, 200); // Set position of the text
9999
display.print("ALARM"); // Print text
100100
}

examples/Inkplate10/Advanced/RTC/Inkplate10_RTC_Simple/Inkplate10_RTC_Simple.ino

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ void setup()
7272
display.display(); // Put clear image on display
7373
display.setTextSize(5); // Set text to be 5 times bigger than classic 5x7 px text
7474

75-
display.rtc.SetTime(hour, minutes, seconds); // Send time to RTC
76-
display.rtc.SetDate(weekday, day, month, year); // Send date to RTC
75+
display.rtc.setTime(hour, minutes, seconds); // Send time to RTC
76+
display.rtc.setDate(weekday, day, month, year); // Send date to RTC
7777
}
7878

7979
// Variable that keeps count on how much screen has been partially updated
@@ -82,14 +82,14 @@ void loop()
8282
{
8383
if ((unsigned long)(millis() - time1) > REFRESH_DELAY)
8484
{
85-
display.rtc.GetRtcData(); // Get the time and date from RTC
86-
seconds = display.rtc.GetSecond(); // Store senconds in a variable
87-
minutes = display.rtc.GetMinute(); // Store minutes in a variable
88-
hour = display.rtc.GetHour(); // Store hours in a variable
89-
day = display.rtc.GetDay(); // Store day of month in a variable
90-
weekday = display.rtc.GetWeekday(); // Store day of week in a variable
91-
month = display.rtc.GetMonth(); // Store month in a variable
92-
year = display.rtc.GetYear(); // Store year in a variable
85+
display.rtc.getRtcData(); // Get the time and date from RTC
86+
seconds = display.rtc.getSecond(); // Store senconds in a variable
87+
minutes = display.rtc.getMinute(); // Store minutes in a variable
88+
hour = display.rtc.getHour(); // Store hours in a variable
89+
day = display.rtc.getDay(); // Store day of month in a variable
90+
weekday = display.rtc.getWeekday(); // Store day of week in a variable
91+
month = display.rtc.getMonth(); // Store month in a variable
92+
year = display.rtc.getYear(); // Store year in a variable
9393

9494
display.clearDisplay(); // Clear content in frame buffer
9595
display.setCursor(100, 300); // Set position of the text

examples/Inkplate10/Advanced/RTC/Inkplate10_RTC_Timer/Inkplate10_RTC_Timer.ino

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ void setup()
7676

7777
pinMode(39, INPUT_PULLUP); // Set RTC INT pin on ESP32 GPIO39 as input with pullup resistor enabled
7878

79-
display.rtc.SetTime(hour, minutes, seconds); // Send time to RTC
80-
display.rtc.SetDate(weekday, day, month, year); // Send date to RTC
79+
display.rtc.setTime(hour, minutes, seconds); // Send time to RTC
80+
display.rtc.setDate(weekday, day, month, year); // Send date to RTC
8181

8282
// Set up a timer
8383
/* source_clock
@@ -92,21 +92,21 @@ void setup()
9292
* int_pulse
9393
* true = interrupt generate a pulse; false = interrupt follows timer flag
9494
*/
95-
display.rtc.TimerSet(RTC::TIMER_CLOCK_1HZ, countdown_time, true, false);
95+
display.rtc.timerSet(RTC::TIMER_CLOCK_1HZ, countdown_time, true, false);
9696
}
9797

9898
// Variable that keeps count on how much screen has been partially updated
9999
int n = 0;
100100
void loop()
101101
{
102-
display.rtc.GetRtcData(); // Get the time and date from RTC
103-
seconds = display.rtc.GetSecond(); // Store senconds in a variable
104-
minutes = display.rtc.GetMinute(); // Store minutes in a variable
105-
hour = display.rtc.GetHour(); // Store hours in a variable
106-
day = display.rtc.GetDay(); // Store day of month in a variable
107-
weekday = display.rtc.GetWeekday(); // Store day of week in a variable
108-
month = display.rtc.GetMonth(); // Store month in a variable
109-
year = display.rtc.GetYear(); // Store year in a variable
102+
display.rtc.getRtcData(); // Get the time and date from RTC
103+
seconds = display.rtc.getSecond(); // Store senconds in a variable
104+
minutes = display.rtc.getMinute(); // Store minutes in a variable
105+
hour = display.rtc.getHour(); // Store hours in a variable
106+
day = display.rtc.getDay(); // Store day of month in a variable
107+
weekday = display.rtc.getWeekday(); // Store day of week in a variable
108+
month = display.rtc.getMonth(); // Store month in a variable
109+
year = display.rtc.getYear(); // Store year in a variable
110110

111111
display.clearDisplay(); // Clear content in frame buffer
112112
display.setCursor(100, 300); // Set position of the text
@@ -148,10 +148,10 @@ void printTime(uint8_t _hour, uint8_t _minutes, uint8_t _seconds, uint8_t _day,
148148
display.print('/');
149149
display.print(_year, DEC);
150150

151-
if (display.rtc.CheckTimerFlag()) // Check if timer event has occurred
151+
if (display.rtc.checkTimerFlag()) // Check if timer event has occurred
152152
{
153-
display.rtc.ClearTimerFlag(); // It's recommended to clear timer flag after timer has occurred
154-
display.rtc.DisableTimer(); // Disable timer if you want to make it one time only. Is you want to be repeatable, comment this line
153+
display.rtc.clearTimerFlag(); // It's recommended to clear timer flag after timer has occurred
154+
display.rtc.disableTimer(); // Disable timer if you want to make it one time only. Is you want to be repeatable, comment this line
155155
display.setCursor(400, 400); // Set new position for cursor
156156
display.print("Timer!");
157157
}

examples/Inkplate10/Diagnostics/Inkplate10_Factory_Programming_VCOM/test.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,18 +306,18 @@ int rtcCheck()
306306
if (_res != 0)
307307
return 0;
308308

309-
// Reset and re-init RTC.
310-
display.rtc.Reset();
309+
// reset and re-init RTC.
310+
display.rtc.reset();
311311

312312
// Set some time in epoch in RTC.
313313
uint32_t _epoch = 1640995200ULL;
314-
display.rtc.SetEpoch(_epoch);
314+
display.rtc.setEpoch(_epoch);
315315

316316
// Wait at least one and a half second
317317
delay(1500);
318318

319319
// Read the epoch (if everything is ok, epoch from RTC should not be the same)
320-
if (display.rtc.GetEpoch() != _epoch)
320+
if (display.rtc.getEpoch() != _epoch)
321321
{
322322
return 1;
323323
}

examples/Inkplate10/Diagnostics/Inkplate10_Peripheral_Mode/InkplatePeripheralMode.cpp

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ bool PeripheralMode::getDataFromSerial(unsigned long _timeout)
8080
// If is a valid command, try to parse it.
8181
parseCommand(_command, _repeatable, _payloadSize, _payload);
8282

83-
// Reset the counter.
83+
// reset the counter.
8484
_serialBufferIndex = 0;
8585

8686
// Go to the next command by advancing to the next index.
@@ -95,7 +95,7 @@ bool PeripheralMode::getDataFromSerial(unsigned long _timeout)
9595
// Clear the buffer.
9696
memset(_serialBuffer, 0, _bufferSize);
9797

98-
// Reset the index variable.
98+
// reset the index variable.
9999
_serialBufferIndex = 0;
100100

101101
Serial.println("Cleaned");
@@ -1127,7 +1127,7 @@ void PeripheralMode::parseCommand(int _command, int _repeat, int _payloadSize, c
11271127

11281128

11291129

1130-
_display->rtc.SetTime(atoi(_arg1), atoi(_arg2), atoi(_arg3));
1130+
_display->rtc.setTime(atoi(_arg1), atoi(_arg2), atoi(_arg3));
11311131

11321132
break;
11331133
}
@@ -1152,7 +1152,7 @@ void PeripheralMode::parseCommand(int _command, int _repeat, int _payloadSize, c
11521152
if (_arg1 == NULL || _arg2 == NULL || _arg3 == NULL || _arg4== NULL) return;
11531153

11541154

1155-
_display->rtc.SetDate(atoi(_arg1), atoi(_arg2), atoi(_arg3), atoi(_arg4));
1155+
_display->rtc.setDate(atoi(_arg1), atoi(_arg2), atoi(_arg3), atoi(_arg4));
11561156
break;
11571157
}
11581158
case CMD_RTC_SET_EPOCH:
@@ -1169,19 +1169,19 @@ void PeripheralMode::parseCommand(int _command, int _repeat, int _payloadSize, c
11691169
// Check if they are valid.
11701170
if (_arg1 == NULL) return;
11711171

1172-
_display->rtc.SetEpoch(atoll(_arg1));
1172+
_display->rtc.setEpoch(atoll(_arg1));
11731173
break;
11741174
}
11751175
case CMD_RTC_UPDATE:
11761176
{
1177-
_display->rtc.GetRtcData();
1177+
_display->rtc.getRtcData();
11781178
break;
11791179
}
11801180
case CMD_RTC_GET_DATA_ALL:
11811181
{
11821182
char response[100];
1183-
sprintf(response,"%d:%d:%d %d %d/%d/%d", _display->rtc.GetHour(),_display->rtc.GetMinute(), _display->rtc.GetSecond(),
1184-
_display->rtc.GetWeekday(), _display->rtc.GetDay(), _display->rtc.GetMonth(), _display->rtc.GetYear());
1183+
sprintf(response,"%d:%d:%d %d %d/%d/%d", _display->rtc.getHour(),_display->rtc.getMinute(), _display->rtc.getSecond(),
1184+
_display->rtc.getWeekday(), _display->rtc.getDay(), _display->rtc.getMonth(), _display->rtc.getYear());
11851185
sendResponse(CMD_RTC_GET_ALARM_ALL, strlen(response), response);
11861186
break;
11871187
}
@@ -1208,9 +1208,9 @@ void PeripheralMode::parseCommand(int _command, int _repeat, int _payloadSize, c
12081208
// Check if they are valid.
12091209
if (_arg1 == NULL || _arg2 == NULL || _arg3 == NULL || _arg4== NULL || _arg5== NULL) return;
12101210

1211-
_display->rtc.EnableAlarm();
1211+
_display->rtc.enableAlarm();
12121212

1213-
_display->rtc.SetAlarm(atoi(_arg1),atoi(_arg2),atoi(_arg3),atoi(_arg4),atoi(_arg5));
1213+
_display->rtc.setAlarm(atoi(_arg1),atoi(_arg2),atoi(_arg3),atoi(_arg4),atoi(_arg5));
12141214

12151215
break;
12161216
}
@@ -1229,19 +1229,19 @@ void PeripheralMode::parseCommand(int _command, int _repeat, int _payloadSize, c
12291229
// Check if they are valid.
12301230
if (_arg1 == NULL || _arg2 == NULL) return;
12311231

1232-
_display->rtc.SetAlarmEpoch(atoll(_arg1),atoi(_arg2));
1232+
_display->rtc.setAlarmEpoch(atoll(_arg1),atoi(_arg2));
12331233

12341234
break;
12351235
}
12361236
case CMD_RTC_CLEAR_AL_FLAG:
12371237
{
1238-
_display->rtc.ClearAlarmFlag();
1238+
_display->rtc.clearAlarmFlag();
12391239
break;
12401240
}
12411241
case CMD_RTC_GET_ALARM_ALL:
12421242
{
12431243
char response[100];
1244-
sprintf(response,"%d:%d:%d %d-%d", _display->rtc.GetAlarmHour(),_display->rtc.GetAlarmMinute(), _display->rtc.GetAlarmSecond(), _display->rtc.GetAlarmDay(), _display->rtc.GetAlarmWeekday());
1244+
sprintf(response,"%d:%d:%d %d-%d", _display->rtc.getAlarmHour(),_display->rtc.getAlarmMinute(), _display->rtc.getAlarmSecond(), _display->rtc.getAlarmDay(), _display->rtc.getAlarmWeekday());
12451245
sendResponse(CMD_RTC_GET_ALARM_ALL, strlen(response), response);
12461246
break;
12471247
}
@@ -1286,38 +1286,38 @@ void PeripheralMode::parseCommand(int _command, int _repeat, int _payloadSize, c
12861286

12871287
}
12881288

1289-
_display->rtc.TimerSet(clock, atoi(_arg2), atoi(_arg3), atoi(_arg4));
1289+
_display->rtc.timerSet(clock, atoi(_arg2), atoi(_arg3), atoi(_arg4));
12901290

12911291
break;
12921292
}
12931293
case CMD_RTC_GET_TIMER_FLAG:
12941294
{
12951295
char response[1];
1296-
itoa(_display->rtc.CheckTimerFlag(), response, 10);
1296+
itoa(_display->rtc.checkTimerFlag(), response, 10);
12971297
sendResponse(CMD_RTC_GET_TIMER_FLAG, strlen(response), response);
12981298

12991299
break;
13001300
}
13011301
case CMD_RTC_CLEAR_TIMER_FLAG:
13021302
{
1303-
_display->rtc.ClearTimerFlag();
1303+
_display->rtc.clearTimerFlag();
13041304
break;
13051305
}
13061306
case CMD_RTC_DISABLE_TIMER:
13071307
{
1308-
_display->rtc.DisableTimer();
1308+
_display->rtc.disableTimer();
13091309
break;
13101310
}
13111311
case CMD_RTC_IS_SET:
13121312
{
13131313
char response[1];
1314-
itoa(_display->rtc.IsSet(), response, 10);
1314+
itoa(_display->rtc.isSet(), response, 10);
13151315
sendResponse(CMD_RTC_IS_SET, strlen(response), response);
13161316
break;
13171317
}
13181318
case CMD_RTC_RESET:
13191319
{
1320-
_display->rtc.Reset();
1320+
_display->rtc.reset();
13211321
break;
13221322
}
13231323
case CMD_ESP32_DEEPSLEEP:

0 commit comments

Comments
 (0)