基于FL2440的RTC驱动移植
来源:互联网 发布:淘宝客大神的采集群 编辑:程序博客网 时间:2024/06/09 19:52
基于FL2440的RTC驱动移植
一、RTC
RTC(Real-Time Clock):实时时钟。实时时钟(RTC)单元可以在断电的情况下使用纽扣电池继续计时工作。RTC使用STRB/LDRB ARM操作传输二进制码十进制数的8位数据给CPU。其中的数据包括秒、分、时、日期、天、月、年的时间信息。
二、RTC驱动移植
1、 RTC驱动在linux内核当中已经有了device部分和driver部分,由于linux内核对RTC的驱动支持已经非常完善了,我们只需要把RTC添加到设备初始化列表即可。
linux-3.0]$ vim arch/arm/mach-s3c2440/mach-smdk2440.c
2、内核配置中选择RTC驱动
make menuconfig
Device Drivers --->
[*] Real Time Clock --->
--- Real Time Clock │ │
│ │ [*] Set system time from RTC on startup and resume │ │
│ │ (rtc0) RTC used to set the system time │ │
│ │ [ ] RTC debug support │ │
│ │ *** RTC interfaces *** │ │
│ │ [*] /sys/class/rtc/rtcN (sysfs) │ │
│ │ [*] /proc/driver/rtc (procfs for rtc0) │ │
│ │ [*] /dev/rtcN (character devices) │ │
│ │ [ ] RTC UIE emulation on dev interface │ │
│ │ < > Test driver/device
│ │ [*] Set system time from RTC on startup and resume │ │
│ │ (rtc0) RTC used to set the system time │ │
│ │ [ ] RTC debug support │ │
│ │ *** RTC interfaces *** │ │
│ │ [*] /sys/class/rtc/rtcN (sysfs) │ │
│ │ [*] /proc/driver/rtc (procfs for rtc0) │ │
│ │ [*] /dev/rtcN (character devices) │ │
│ │ [ ] RTC UIE emulation on dev interface │ │
│ │ < > Test driver/device
3、make,烧录到开发板
三、移植效果
1、烧录启动项中:
2、date测试:时间有变化
3、改变时间且重启后能保存原设置时间
S1:date “TIME”修改时间
S2:hwcloclk 保存时间到芯片
S3:reboot
时间的格式
hh:mm[:ss]
[YYYY.]MM.DD-hh:mm[:ss]
YYYY-MM-DD hh:mm[:ss]
[[[[[YY]YY]MM]DD]hh]mm[.ss]
[YYYY.]MM.DD-hh:mm[:ss]
YYYY-MM-DD hh:mm[:ss]
[[[[[YY]YY]MM]DD]hh]mm[.ss]
0 0
- 基于FL2440的RTC驱动移植
- fl2440移植RTC驱动及hwclock命令使用
- fl2440 触摸屏驱动的移植
- 触摸屏和ADC驱动的移植 (fl2440)
- 飞凌Fl2440 led驱动的移植
- fl2440 usb驱动移植
- 基于FL2440的QT5.6.0移植记录
- Arm9+linux fl2440 驱动移植之RTC(实时时钟)和USB host
- 基于fl2440内核linux-3.0移植----添加按键驱动
- 基于fl2440内核linux-3.0移植----添加adc驱动
- RTC驱动移植
- RTC驱动移植
- linux RTC驱动移植
- fl2440内核移植(二)——RTC移植
- 基于FL2440的Linux-2.6.35内核移植--触摸屏
- 基于FL2440开发板的U-boot移植记录
- 基于FL2440的3.6.6内核移植记录
- mini2440移植之RTC驱动
- 关于127.0.0.1和本机IP之间的一些认识
- padding与margin区别
- [BZOJ 1499][NOI 2005]瑰丽华尔兹(DP+单调队列优化)
- MySQL 启用和关闭mysql
- ListView分割线
- 基于FL2440的RTC驱动移植
- Oracle中instr函数
- centos 7 安装 google chrome浏览器
- Linux中设置服务自启动的三种方式
- 约瑟夫问题
- 支付宝sdk
- 单一继承下基类private虚函数
- 有create view和DBA权限还报创建视图权限不足
- Oracle中的instr函数