@@ -79,7 +79,7 @@ bool PCF8563TClass::begin()
7979 * Save an unsigned byte with the Year's value
8080 * @param years Year's unsigned byte
8181 */
82- void PCF8563TClass::setYears (uint8_t years) {
82+ void PCF8563TClass::setYear (uint8_t years) {
8383 uint8_t dec = years / 10 ;
8484 uint8_t unit = years - (dec * 10 );
8585 writeByte (PCF8563T_YEARS_REG, ((dec << 4 ) + unit));
@@ -90,7 +90,7 @@ void PCF8563TClass::setYears(uint8_t years) {
9090 * Save an unsigned byte with the Month's value
9191 * @param months Month's unsigned byte (0 to 12)
9292 */
93- void PCF8563TClass::setMonths (uint8_t months) {
93+ void PCF8563TClass::setMonth (uint8_t months) {
9494 uint8_t offset = 0 ;
9595 if (months > 9 ) {
9696 offset = 6 ;
@@ -103,7 +103,7 @@ void PCF8563TClass::setMonths(uint8_t months) {
103103 * Save an unsigned byte with the Day's value
104104 * @param days day's unsigned byte
105105 */
106- void PCF8563TClass::setDays (uint8_t days) {
106+ void PCF8563TClass::setDay (uint8_t days) {
107107 uint8_t dec = days / 10 ;
108108 uint8_t unit = days - (dec * 10 );
109109 writeByte (PCF8563T_DAYS_REG, ((dec << 4 ) + unit));
@@ -147,7 +147,7 @@ void PCF8563TClass::setSeconds(uint8_t seconds) {
147147 * Get unsigned byte with the Year(s) value
148148 * @return byte with Year(s) value
149149 */
150- uint8_t PCF8563TClass::getYears () {
150+ uint8_t PCF8563TClass::getYear () {
151151 uint8_t years = readByte (PCF8563T_YEARS_REG);
152152 return (years & 0x0F ) + ((years >> 4 )*10 );
153153}
@@ -157,7 +157,7 @@ uint8_t PCF8563TClass::getYears() {
157157 * Get unsigned byte with the month(s) value
158158 * @return byte with Month(s) value
159159 */
160- uint8_t PCF8563TClass::getMonths () {
160+ uint8_t PCF8563TClass::getMonth () {
161161 uint8_t months = readByte (PCF8563T_MONTHS_REG) & 0x1F ;
162162 if (months > 9 ) {
163163 return months - 6 ;
@@ -171,7 +171,7 @@ uint8_t PCF8563TClass::getMonths() {
171171 * Get unsigned byte with the Day(s) value
172172 * @return byte with Day(s) value
173173 */
174- uint8_t PCF8563TClass::getDays () {
174+ uint8_t PCF8563TClass::getDay () {
175175 uint8_t days = readByte (PCF8563T_DAYS_REG) & 0x3F ;
176176 return (days & 0x0F ) + ((days >> 4 )*10 );
177177}
@@ -215,9 +215,9 @@ void PCF8563TClass::setEpoch() {
215215 time.tm_sec = getSeconds ();
216216 time.tm_min = getMinutes ();
217217 time.tm_hour = getHours ();
218- time.tm_mday = getDays ();
219- time.tm_mon = getMonths () - 1 ;
220- time.tm_year = getYears () + 100 ;
218+ time.tm_mday = getDay ();
219+ time.tm_mon = getMonth () - 1 ;
220+ time.tm_year = getYear () + 100 ;
221221 time_t seconds;
222222 _rtc_maketime (&time, &seconds, RTC_FULL_LEAP_YEAR_SUPPORT);
223223 set_time (seconds);
@@ -236,9 +236,9 @@ void PCF8563TClass::setEpoch(time_t seconds) {
236236 setSeconds (time.tm_sec );
237237 setMinutes (time.tm_min );
238238 setHours ( time.tm_hour );
239- setDays (time.tm_mday );
240- setMonths (time.tm_mon + 1 );
241- setYears ((time.tm_year - 100 ));
239+ setDay (time.tm_mday );
240+ setMonth (time.tm_mon + 1 );
241+ setYear ((time.tm_year - 100 ));
242242 set_time (seconds);
243243}
244244
@@ -286,9 +286,9 @@ time_t PCF8563TClass::getEpoch() {
286286 time.tm_sec = getSeconds ();
287287 time.tm_min = getMinutes ();
288288 time.tm_hour = getHours ();
289- time.tm_mday = getDays ();
290- time.tm_mon = getMonths () - 1 ;
291- time.tm_year = getYears () + 100 ; // year since 1900
289+ time.tm_mday = getDay ();
290+ time.tm_mon = getMonth () - 1 ;
291+ time.tm_year = getYear () + 100 ; // year since 1900
292292
293293 _rtc_maketime (&time, &seconds, RTC_FULL_LEAP_YEAR_SUPPORT);
294294 return seconds;
0 commit comments