In Pcf8563,the month is from 1 to 12 ,but in kernel month is from 0 to 11.
So in pcf8563 driver,when read time ,the month will be sub 1,while set time month will be add 1.Otherwise,the application should stand by this rule.If get month for driver,add 1,add set time,sub 1.
hwclock -w rtc time will be set as system,System Call puts time to rtc driver,the month value is from 0~11,so in driver,month value will be added 1;
hwclock -s system time will be set as rtc time,System call gets time from rtc driver,in dirver ,month will be sub 1 ,then give it to System call.
阅读(1193) | 评论(0) | 转发(0) |