firmware/src/avr/lib/RTC/src/PCF8563.cpp
/*-----------------------------------------------------------
setDate (Should be Optimised)
-----------------------------------------------------------*/
setDate (Should be Optimised)
setDate ( Should be Optimised )
void PCF8563::setDate(uint8_t day, uint8_t month, uint16_t year)
{
    year = year % 100; 
    Wire.beginTransmission(PCF8563_ADDR);
    Wire.write(0x05);
    Wire.write(bin2bcd(day));
    Wire.write(0);      
    Wire.write(bin2bcd(month));
    Wire.write(bin2bcd(year));
    Wire.endTransmission();
}
void PCF8563 :: setDate ( uint8_t day , uint8_t month , uint16_t year ) { year = year % 100 ; Wire . beginTransmission ( PCF8563_ADDR ) ; Wire . write ( 0x05 ) ; Wire . write ( bin2bcd ( day ) ) ; Wire . write ( 0 ) ; Wire . write ( bin2bcd ( month ) ) ; Wire . write ( bin2bcd ( year ) ) ; Wire . endTransmission ( ) ; }
setDate (Should be Optimised)
setDate ( Should be Optimised )
//Converting to 2 Digit //Weekday Resets to Zero!