Chinaunix首页 | 论坛 | 博客
  • 博客访问: 194481
  • 博文数量: 44
  • 博客积分: 1515
  • 博客等级: 上尉
  • 技术积分: 480
  • 用 户 组: 普通用户
  • 注册时间: 2007-11-06 16:39
文章分类

全部博文(44)

文章存档

2013年(3)

2012年(2)

2011年(2)

2009年(20)

2008年(17)

我的朋友

分类: C/C++

2008-09-17 16:07:05

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) |
给主人留下些什么吧!~~