//--------------------------------------------------------------------------------------------------
// 用户调用函数
// 函数名称: P8563_settime
// 函数功能: 写时间修改值
//--------------------------------------------------------------------------------------------------
void P8563_settime(u16 nian,u8 yue,u8 libai,u8 ri,u8 shi,u8 fen,u8 miao)
{
write_CFGbyte(0x02, hex_to_bcd(miao));
write_CFGbyte(0x03, hex_to_bcd(fen));
write_CFGbyte(0x04, hex_to_bcd(shi));
write_CFGbyte(0x05, hex_to_bcd(ri));
write_CFGbyte(0x06, hex_to_bcd(libai));
write_CFGbyte(0x07, hex_to_bcd(yue));
write_CFGbyte(0x08, hex_to_bcd(nian));
// write_CFGbyte(0x00, 0x00); //Enable RTC sorce clock
}
|