@@ -224,7 +224,7 @@ void System::rtcSetTime(uint8_t rtcHour, uint8_t rtcMinute, uint8_t rtcSecond)
224
224
*/
225
225
void System::rtcSetDate (uint8_t rtcWeekday, uint8_t rtcDay, uint8_t rtcMonth, uint16_t yr)
226
226
{
227
- rtc_time. rtcYear = yr - 1970 ; // convert to RTC rtcYear format 0-99
227
+ rtcYear = yr - 1970 ; // convert to RTC rtcYear format 0-99
228
228
229
229
Wire.beginTransmission (I2C_ADDR);
230
230
Wire.write (RTC_RAM_by);
@@ -236,7 +236,7 @@ void System::rtcSetDate(uint8_t rtcWeekday, uint8_t rtcDay, uint8_t rtcMonth, ui
236
236
Wire.write (rtcDecToBcd (rtcDay));
237
237
Wire.write (rtcDecToBcd (rtcWeekday));
238
238
Wire.write (rtcDecToBcd (rtcMonth));
239
- Wire.write (rtcDecToBcd (rtc_time. rtcYear ));
239
+ Wire.write (rtcDecToBcd (rtcYear));
240
240
Wire.endTransmission ();
241
241
}
242
242
@@ -303,13 +303,13 @@ void System::rtcGetRtcData()
303
303
304
304
while (Wire.available ())
305
305
{
306
- rtc_time. rtcSecond = rtcBcdToDec (Wire.read () & 0x7F ); // ignore bit 7
307
- rtc_time. rtcMinute = rtcBcdToDec (Wire.read () & 0x7F );
308
- rtc_time. rtcHour = rtcBcdToDec (Wire.read () & 0x3F ); // ignore bits 7 & 6
309
- rtc_time. rtcDay = rtcBcdToDec (Wire.read () & 0x3F );
310
- rtc_time. rtcWeekday = rtcBcdToDec (Wire.read () & 0x07 ); // ignore bits 7,6,5,4 & 3
311
- rtc_time. rtcMonth = rtcBcdToDec (Wire.read () & 0x1F ); // ignore bits 7,6 & 5
312
- rtc_time. rtcYear = rtcBcdToDec (Wire.read ()) + 1970 ;
306
+ rtcSecond = rtcBcdToDec (Wire.read () & 0x7F ); // ignore bit 7
307
+ rtcMinute = rtcBcdToDec (Wire.read () & 0x7F );
308
+ rtcHour = rtcBcdToDec (Wire.read () & 0x3F ); // ignore bits 7 & 6
309
+ rtcDay = rtcBcdToDec (Wire.read () & 0x3F );
310
+ rtcWeekday = rtcBcdToDec (Wire.read () & 0x07 ); // ignore bits 7,6,5,4 & 3
311
+ rtcMonth = rtcBcdToDec (Wire.read () & 0x1F ); // ignore bits 7,6 & 5
312
+ rtcYear = rtcBcdToDec (Wire.read ()) + 1970 ;
313
313
}
314
314
}
315
315
@@ -320,7 +320,7 @@ void System::rtcGetRtcData()
320
320
*/
321
321
uint8_t System::rtcGetSecond ()
322
322
{
323
- return rtc_time. rtcSecond ;
323
+ return rtcSecond;
324
324
}
325
325
326
326
/* *
@@ -330,7 +330,7 @@ uint8_t System::rtcGetSecond()
330
330
*/
331
331
uint8_t System::rtcGetMinute ()
332
332
{
333
- return rtc_time. rtcMinute ;
333
+ return rtcMinute;
334
334
}
335
335
336
336
/* *
@@ -340,7 +340,7 @@ uint8_t System::rtcGetMinute()
340
340
*/
341
341
uint8_t System::rtcGetHour ()
342
342
{
343
- return rtc_time. rtcHour ;
343
+ return rtcHour;
344
344
}
345
345
346
346
/* *
@@ -350,7 +350,7 @@ uint8_t System::rtcGetHour()
350
350
*/
351
351
uint8_t System::rtcGetDay ()
352
352
{
353
- return rtc_time. rtcDay ;
353
+ return rtcDay;
354
354
}
355
355
356
356
/* *
@@ -360,7 +360,7 @@ uint8_t System::rtcGetDay()
360
360
*/
361
361
uint8_t System::rtcGetWeekday ()
362
362
{
363
- return rtc_time. rtcWeekday ;
363
+ return rtcWeekday;
364
364
}
365
365
366
366
/* *
@@ -370,7 +370,7 @@ uint8_t System::rtcGetWeekday()
370
370
*/
371
371
uint8_t System::rtcGetMonth ()
372
372
{
373
- return rtc_time. rtcMonth ;
373
+ return rtcMonth;
374
374
}
375
375
376
376
/* *
@@ -380,7 +380,7 @@ uint8_t System::rtcGetMonth()
380
380
*/
381
381
uint16_t System::rtcGetYear ()
382
382
{
383
- return rtc_time. rtcYear ;
383
+ return rtcYear;
384
384
}
385
385
386
386
/* *
0 commit comments