2626 * @param uint8_t rtcMinute Set the minutes
2727 * @param uint8_t rtcSecond Set the seconds
2828 */
29- void RTC::SetTime (uint8_t rtcHour, uint8_t rtcMinute, uint8_t rtcSecond)
29+ void RTC::setTime (uint8_t rtcHour, uint8_t rtcMinute, uint8_t rtcSecond)
3030{
3131 Wire.beginTransmission (I2C_ADDR);
3232 Wire.write (RTC_RAM_by);
@@ -45,7 +45,7 @@ void RTC::SetTime(uint8_t rtcHour, uint8_t rtcMinute, uint8_t rtcSecond)
4545 * @param uint8_t rtcMonth Set the rtcMonth
4646 * @param uint8_t yr Set the rtcYear
4747 */
48- void RTC::SetDate (uint8_t rtcWeekday, uint8_t rtcDay, uint8_t rtcMonth, uint16_t yr)
48+ void RTC::setDate (uint8_t rtcWeekday, uint8_t rtcDay, uint8_t rtcMonth, uint16_t yr)
4949{
5050 Year = yr - 2000 ; // convert to RTC rtcYear format 0-99
5151
@@ -68,7 +68,7 @@ void RTC::SetDate(uint8_t rtcWeekday, uint8_t rtcDay, uint8_t rtcMonth, uint16_t
6868 *
6969 * @param uint32_t _epoch Set RTC epoch
7070 */
71- void RTC::SetEpoch (uint32_t _epoch)
71+ void RTC::setEpoch (uint32_t _epoch)
7272{
7373 struct tm _t;
7474 time_t _e = _epoch;
@@ -92,7 +92,7 @@ void RTC::SetEpoch(uint32_t _epoch)
9292 *
9393 * @returns uint32_t Returns the current epoch
9494 */
95- uint32_t RTC::GetEpoch ()
95+ uint32_t RTC::getEpoch ()
9696{
9797 struct tm _t;
9898
@@ -116,7 +116,7 @@ uint32_t RTC::GetEpoch()
116116/* *
117117 * @brief Reads time and date from the RTC
118118 */
119- void RTC::GetRtcData ()
119+ void RTC::getRtcData ()
120120{
121121 Wire.beginTransmission (I2C_ADDR);
122122 Wire.write (RTC_SECOND_ADDR); // datasheet 8.4.
@@ -141,7 +141,7 @@ void RTC::GetRtcData()
141141 *
142142 * @returns uint8_t Returns the current seconds
143143 */
144- uint8_t RTC::GetSecond ()
144+ uint8_t RTC::getSecond ()
145145{
146146 return Second;
147147}
@@ -151,7 +151,7 @@ uint8_t RTC::GetSecond()
151151 *
152152 * @returns uint8_t Returns the current minutes
153153 */
154- uint8_t RTC::GetMinute ()
154+ uint8_t RTC::getMinute ()
155155{
156156 return Minute;
157157}
@@ -161,7 +161,7 @@ uint8_t RTC::GetMinute()
161161 *
162162 * @returns uint8_t Returns the current hours
163163 */
164- uint8_t RTC::GetHour ()
164+ uint8_t RTC::getHour ()
165165{
166166 return Hour;
167167}
@@ -171,7 +171,7 @@ uint8_t RTC::GetHour()
171171 *
172172 * @returns uint8_t Returns the current rtcDay
173173 */
174- uint8_t RTC::GetDay ()
174+ uint8_t RTC::getDay ()
175175{
176176 return Day;
177177}
@@ -181,7 +181,7 @@ uint8_t RTC::GetDay()
181181 *
182182 * @returns uint8_t Returns the current rtcWeekday
183183 */
184- uint8_t RTC::GetWeekday ()
184+ uint8_t RTC::getWeekday ()
185185{
186186 return Weekday;
187187}
@@ -191,7 +191,7 @@ uint8_t RTC::GetWeekday()
191191 *
192192 * @returns uint8_t Returns the current rtcMonth
193193 */
194- uint8_t RTC::GetMonth ()
194+ uint8_t RTC::getMonth ()
195195{
196196 return Month;
197197}
@@ -201,15 +201,15 @@ uint8_t RTC::GetMonth()
201201 *
202202 * @returns uint8_t Returns the current rtcYear
203203 */
204- uint16_t RTC::GetYear ()
204+ uint16_t RTC::getYear ()
205205{
206206 return Year;
207207}
208208
209209/* *
210210 * @brief Enables the alarm of the RTC
211211 */
212- void RTC::EnableAlarm () // datasheet 8.5.6.
212+ void RTC::enableAlarm () // datasheet 8.5.6.
213213{
214214 // check Table 2. Control_2
215215 Control2 = RTC_CTRL_2_DEFAULT | RTC_ALARM_AIE; // enable interrupt
@@ -230,7 +230,7 @@ void RTC::EnableAlarm() // datasheet 8.5.6.
230230 * @param uint8_t AlarmDay Set the alarm rtcDay
231231 * @param uint8_t AlarmWeekday Set the alarm rtcWeekday
232232 */
233- void RTC::SetAlarm (uint8_t AlarmSecond, uint8_t AlarmMinute, uint8_t AlarmHour, uint8_t AlarmDay, uint8_t AlarmWeekday)
233+ void RTC::setAlarm (uint8_t AlarmSecond, uint8_t AlarmMinute, uint8_t AlarmHour, uint8_t AlarmDay, uint8_t AlarmWeekday)
234234{
235235 if (AlarmSecond < 99 )
236236 { // rtcSecond
@@ -292,7 +292,7 @@ void RTC::SetAlarm(uint8_t AlarmSecond, uint8_t AlarmMinute, uint8_t AlarmHour,
292292 AlarmWeekday |= RTC_ALARM;
293293 }
294294
295- EnableAlarm ();
295+ enableAlarm ();
296296
297297 Wire.beginTransmission (I2C_ADDR);
298298 Wire.write (RTC_SECOND_ALARM);
@@ -310,7 +310,7 @@ void RTC::SetAlarm(uint8_t AlarmSecond, uint8_t AlarmMinute, uint8_t AlarmHour,
310310 * @param uint32_t _epoch RTC Epoch alarm
311311 * @param uint8_t _match RTC Match
312312 */
313- void RTC::SetAlarmEpoch (uint32_t _epoch, uint8_t _match)
313+ void RTC::setAlarmEpoch (uint32_t _epoch, uint8_t _match)
314314{
315315 struct tm _t;
316316 time_t _e = _epoch;
@@ -326,14 +326,14 @@ void RTC::SetAlarmEpoch(uint32_t _epoch, uint8_t _match)
326326 Wire.write (DecToBcd (_t.tm_wday ) & (~(((_match >> 4 ) & 1 ) << 7 )));
327327 Wire.endTransmission ();
328328
329- EnableAlarm ();
329+ enableAlarm ();
330330}
331331
332332
333333/* *
334334 * @brief Reads the alarm of the RTC
335335 */
336- void RTC::ReadAlarm ()
336+ void RTC::readAlarm ()
337337{
338338 Wire.beginTransmission (I2C_ADDR);
339339 Wire.write (RTC_SECOND_ALARM); // datasheet 8.4.
@@ -400,9 +400,9 @@ void RTC::ReadAlarm()
400400 *
401401 * @returns uint8_t Returns the current alarm seconds
402402 */
403- uint8_t RTC::GetAlarmSecond ()
403+ uint8_t RTC::getAlarmSecond ()
404404{
405- ReadAlarm ();
405+ readAlarm ();
406406 return AlarmSecond;
407407}
408408
@@ -411,9 +411,9 @@ uint8_t RTC::GetAlarmSecond()
411411 *
412412 * @returns uint8_t Returns the current alarm minutes
413413 */
414- uint8_t RTC::GetAlarmMinute ()
414+ uint8_t RTC::getAlarmMinute ()
415415{
416- ReadAlarm ();
416+ readAlarm ();
417417 return AlarmMinute;
418418}
419419
@@ -422,9 +422,9 @@ uint8_t RTC::GetAlarmMinute()
422422 *
423423 * @returns uint8_t Returns the current alarm hours
424424 */
425- uint8_t RTC::GetAlarmHour ()
425+ uint8_t RTC::getAlarmHour ()
426426{
427- ReadAlarm ();
427+ readAlarm ();
428428 return AlarmHour;
429429}
430430
@@ -433,9 +433,9 @@ uint8_t RTC::GetAlarmHour()
433433 *
434434 * @returns uint8_t Returns the current alarm rtcDay
435435 */
436- uint8_t RTC::GetAlarmDay ()
436+ uint8_t RTC::getAlarmDay ()
437437{
438- ReadAlarm ();
438+ readAlarm ();
439439 return AlarmDay;
440440}
441441
@@ -444,9 +444,9 @@ uint8_t RTC::GetAlarmDay()
444444 *
445445 * @returns uint8_t Returns the current alarm rtcWeekday
446446 */
447- uint8_t RTC::GetAlarmWeekday ()
447+ uint8_t RTC::getAlarmWeekday ()
448448{
449- ReadAlarm ();
449+ readAlarm ();
450450 return AlarmWeekday;
451451}
452452
@@ -467,7 +467,7 @@ uint8_t RTC::GetAlarmWeekday()
467467 * timer interrupt mode, 0 means interrupt follows timer flag
468468 * , 1 means interrupt generates a pulse
469469 */
470- void RTC::TimerSet (rtcCountdownSrcClock source_clock, uint8_t value, bool int_enable, bool int_pulse)
470+ void RTC::timerSet (rtcCountdownSrcClock source_clock, uint8_t value, bool int_enable, bool int_pulse)
471471{
472472 uint8_t timer_reg[2 ] = {0 };
473473
@@ -507,7 +507,7 @@ void RTC::TimerSet(rtcCountdownSrcClock source_clock, uint8_t value, bool int_en
507507 *
508508 * @returns bool Returns true if the timer flag is on
509509 */
510- bool RTC::CheckTimerFlag ()
510+ bool RTC::checkTimerFlag ()
511511{
512512 uint8_t _crtl_2 = RTC_TIMER_FLAG;
513513
@@ -525,7 +525,7 @@ bool RTC::CheckTimerFlag()
525525 *
526526 * @returns bool Returns true if the alarm flag is on
527527 */
528- bool RTC::CheckAlarmFlag ()
528+ bool RTC::checkAlarmFlag ()
529529{
530530 uint8_t _crtl_2 = RTC_ALARM_AF;
531531
@@ -541,7 +541,7 @@ bool RTC::CheckAlarmFlag()
541541/* *
542542 * @brief Clears alarm flag
543543 */
544- void RTC::ClearAlarmFlag ()
544+ void RTC::clearAlarmFlag ()
545545{
546546 uint8_t _crtl_2;
547547
@@ -561,7 +561,7 @@ void RTC::ClearAlarmFlag()
561561/* *
562562 * @brief Clears timer flag
563563 */
564- void RTC::ClearTimerFlag ()
564+ void RTC::clearTimerFlag ()
565565{
566566 uint8_t _crtl_2;
567567
@@ -581,7 +581,7 @@ void RTC::ClearTimerFlag()
581581/* *
582582 * @brief Disables the timer
583583 */
584- void RTC::DisableTimer ()
584+ void RTC::disableTimer ()
585585{
586586 uint8_t _timerMode;
587587
@@ -603,7 +603,7 @@ void RTC::DisableTimer()
603603 *
604604 * @returns bool Returns true if RTC is set, false if it's not
605605 */
606- bool RTC::IsSet ()
606+ bool RTC::isSet ()
607607{
608608 uint8_t _ramByte;
609609 Wire.beginTransmission (I2C_ADDR);
@@ -618,7 +618,7 @@ bool RTC::IsSet()
618618/* *
619619 * @brief Resets the timer
620620 */
621- void RTC::Reset () // datasheet 8.2.1.3.
621+ void RTC::reset () // datasheet 8.2.1.3.
622622{
623623 Wire.beginTransmission (I2C_ADDR);
624624 Wire.write (RTC_CTRL_1);
@@ -631,7 +631,7 @@ void RTC::Reset() // datasheet 8.2.1.3.
631631 *
632632 * @param bool val 0 or 1 which represents 7pF or 12.5 pF.
633633 */
634- void RTC::SetInternalCapacitor (bool val)
634+ void RTC::setInternalCapacitor (bool val)
635635{
636636 Wire.beginTransmission (I2C_ADDR);
637637 Wire.write (RTC_CTRL_1);
@@ -672,7 +672,7 @@ void RTC::SetInternalCapacitor(bool val)
672672 * @param byte offsetValue The offset value is coded in two’s complement giving a
673673 * range of +63 LSB to -64 LSB.
674674 */
675- void RTC::SetClockOffset (bool mode, int offsetValue)
675+ void RTC::setClockOffset (bool mode, int offsetValue)
676676{
677677 // Byte for writting in the register
678678 uint8_t regValue;
0 commit comments