社区
英特尔边缘计算技术
帖子详情
android x86和windows 8你更喜欢哪一个?
nutxzycftqg
2013-11-21 05:44:22
两者同为x86平台操作系统,在使用上你更喜欢哪一个?
...全文
101
1
打赏
收藏
android x86和windows 8你更喜欢哪一个?
两者同为x86平台操作系统,在使用上你更喜欢哪一个?
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用AI写文章
1 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
wlgjvjsaxnf
2013-11-21
打赏
举报
回复
目前还是windows 8好,就拿文件管理来说,win8很方便,android x86还得借助第三方软件来管理,不过从以后发展来看,更看好android x86
Android
程序设计基础
CruiseYoung提供的带有详细书签的电子书籍目录 http://blog.csdn.net/fksec/article/details/7888251 该资料是《
Android
基础教程》的源代码 对应的书籍资料见:
Android
基础教程(你的第一本
Android
书) 基本信息 原书名: Hello,
Android
: Introducing Google's Mobile Development Platform 原出版社: Pragmatic Bookshelf 作者: (美)Ed Burnette 译者: 张波 高朝勤 杨越 丛书名: 图灵程序设计丛书 出版社:人民邮电出版社 ISBN:9787115215369 上架时间:2009-11-6 出版日期:2009 年11月 开本:16开 页码:196 版次:1-1 编辑推荐 你的第一本
Android
书. Pragmatic系列图书品质保证.. 从这里,开始
一个
新的梦想... 内容简介
android
是谷歌公司开发的全新开源手机平台。本书是一部关于
android
开发的基础教程,采用由浅入深、循序渐进的方式讨论
android
。书中还结合数独游戏等实例
更
加形象生动地讲解了
android
开发的基本流程,且每章最后都有
一个
“快速阅读指南 ”,
更
加方便了读者的阅读。. 本书内容完整丰富,具有较强的通用性,读者都能通过本书快速学习
android
开发,提高相关技能。... 作译者 作者: Ed Burnette Ed Burnette 资深软件技术专家,拥有20多年软件开发经验。他是SAS高级计算机实验室的联合创始人和高级研究员,也是www.planet
android
.com网站的创办人和ZDNet的专栏作家。除本书外,他还出版了Google Web Toolkit:Taking the Pain out of Ajax和Eclipse IDE Pocket Guide等著作。 目录 封面 -13 封底 202 扉页 -10 版权 -9 版权声明 -8 对本书的赞誉 -7 前言 -6 目录 -2 第一部分
Android
简介 1 第1章 快速入门 3 1.1 安装工具 3 1.1.1 Java 5.0+ 3 1.1.2 Eclipse 4 1.1.3
Android
4 1.1.4 Eclipse插件 5 1.2 创建第
一个
程序 7 1.3 在模拟器上运行程序 8 1.4 在手机上运行程序 9 1.5 快速阅读指南 9 第2章 基本概念 11 2.1
Android
的系统架构 11 2.1.1 Linux内核 11 2.1.2 本机库 12 2.1.3
Android
运行时 13 2.1.4 应用程序框架 14 2.1.5 应用程序 15 2.2 它还活着 15 2.2.1 进程不等于应用程序 16 2.2.2 应用程序生命周期 17 2.3 构建块 19 2.3.1 活动 19 2.3.2 意图 19 2.3.3 服务 19 2.3.4 内容提供者 19 2.4 使用资源 20 2.5 安全性 20 2.6 快速阅读指南 21 第二部分
Android
基础知识 23 第3章 设计用户界面 25 3.1 数独游戏简介 25 3.2 声明性设计 26 3.3 创建启动界面 27 3.4 使用替代资源 34 3.5 实现About对话框 37 3.6 应用主题 41 3.7 添加菜单 43 3.8 添加设置 45 3.9 开始新游戏 47 3.10 利用日志消息调试程序 48 3.11 利用调试器调试程序 50 3.12 退出游戏 50 3.13 快速阅读指南 50 第4章 绘制2D图形 53 4.1
Android
图形基础 53 4.1.1 Color类 53 4.1.2 Paint类 54 4.1.3 Canvas类 55 4.1.4 Path类 55 4.1.5 Drawable类 56 4.2 在Sudoku程序中添加图形 58 4.2.1 开始游戏 58 4.2.2 定义Game类 58 4.2.3 定义PuzzleView类 60 4.2.4 绘制游戏盘面 61 4.2.5 绘制数字 63 4.3 处理输入 65 4.3.1 定义和
更
新选定区域 66 4.3.2 输入数字 68 4.3.3 增加提示 69 4.3.4 抖动屏幕 70 4.4 其他问题 71 4.4.1 创建软键盘 71 4.4.2 实现游戏逻辑 76 4.4.3 其他功能 78 4.5
更
多改进 80 4.6 快速阅读指南 81 第5章 多媒体 83 5.1 播放音频 83 5.2 播放视频 88 5.3 为数独游戏配上音乐 92 5.4 快速阅读指南 94 第6章 存储本地数据 95 6.1 为数独游戏添加选项 95 6.2 继续玩前
一个
游戏 97 6.3 记住当前位置 99 6.4 访问内部文件系统 100 6.5 访问SD卡 101 6.6 快速阅读指南 103 第三部分 高级主题 105 第7章 互联的世界 107 7.1 通过意图实现浏览 108 7.2 利用视图打开网页 111 7.3 JavaScript与Java通信 115 7.4 使用Web服务 121 7.5 快速阅读指南 131 第8章 定位与环境感知 133 8.1 位置,位置,位置 133 8.1.1 我在哪里 135 8.1.2
更
新位置 137 8.1.3 模拟说明 138 8.2 充分利用传感器 139 8.2.1 了解传感器 139 8.2.2 解析传感器的读数 140 8.2.3 模拟说明 140 8.3 地图功能 141 8.3.1 嵌入MapView 142 8.3.2 准备就绪 145 8.3.3 模拟说明 146 8.4 快速阅读指南 147 第9章 SQL实战 149 9.1 SQLite简介 149 9.2 SQL基础 150 9.2.1 DDL语句 151 9.2.2 修改语句 151 9.2.3 查询语句 151 9.3 你好,数据库 152 9.3.1 使用SQliteOpenHelper 153 9.3.2 定义主程序 155 9.3.3 添加一行 156 9.3.4 运行
一个
查询 157 9.3.5 显示查询结果 158 9.4 数据绑定 159 9.5 使用ContentProvider 162 9.5.1
更
改主程序 164 9.5.2 添加一行 164 9.5.3 运行
一个
查询 165 9.6 实现ContentProvider 165 9.7 快速阅读指南 166 第10章 利用OpenGL实现3D图形 169 10.1 理解3D图形 169 10.2 OpenGL简介 170 10.3 构建
一个
OpenGL程序 171 10.4 管理线程 173 10.5 构建
一个
模型 178 10.6 光线、相机…… 181 10.7 动作 183 10.8 应用纹理 184 10.9 透明效果 187 10.10 快速阅读指南 189 第四部分 附录 191 附录A Java与
Android
语言及其API 193 附录B 参考书目 197 译者序 2007年11月5日,谷歌公司推出了自己的开源手机平台,正式命名为
Android
,该平台由操作系统、中间件、用户界面和应用软件组成。谷歌公司对外宣称这是首个为移动终端打造的真正开放和完整的移动平台。. 作为基于Linux的开源手机平台,
Android
包括一部手机工作所需的全部软件——操作系统、用户界面和应用程序,而且不存在任何以往阻碍移动产业创新的专有权障碍。谷歌公司与开放手机联盟合作开发了
Android
,这个联盟囊括了中国移动、摩托罗拉、高通、宏达和T-Mobile在内的30多家无线应用方面的领头羊。通过与运营商、设备制造商、开发商和其他有关各方结成深层次的合作伙伴关系,谷歌公司希望能建立
一个
标准化、开放式的移动电话软件平台,这样必将推进
更
好、
更
快的创新,为移动用户提供不可思议的丰富应用和服务。
Android
作为谷歌公司企业发展战略的重要组成部分,将进一步推进“随时随地为每个人提供信息”这一企业目标的实现。作为一款多方倾力打造的平台,
Android
具有许多优点:实际应用程序运行速度快;开发限制少,平台开放;程序多任务性能优秀,切换迅速等。当然,它也具有系统细节不完善、电源管理不好、软件的界面不太好、支持的软件厂商还比较少等缺点。但是凭借谷歌公司的强大实力以及与开放手机联盟的通力合作,我们相信
Android
会越来越好,一定会成为主流的手机操作系统平台。.. 本书分为3个部分共10章,最后还有两个附录。第1~3章介绍
Android
的基础知识和基本概念;第4~6章介绍2D图形、多媒体和存储本地数据;第7~10章介绍高级主题,包括联网、定位与环境感知、数据库和3D图形;附录介绍了
Android
与Java之间的差别以及参考书目。 本书由张波、高朝勤、杨越和徐红霞等翻译,在翻译过程中得到了人民邮电出版社图灵公司编辑的热心帮助,在此一并致谢。由于译者的知识水平有限,加之时间比较仓促,文中难免会出现一些疏漏,恳请广大读者给予批评指正。... 前言
Android
是一款针对手机的全新开源软件工具包,它由Google和开放手机联盟(Open Handset Alliance)共同创建。
Android
有望在数年内遍布于数百万部手机和其他移动设备中,从而成为应用程序开发人员的主要平台。无论你是业余爱好者还是专业程序员,无论你是自己玩玩还是为了盈利,都应该了解关于
Android
开发的
更
多信息。本书将帮助你迅速入门。.
Android
的特别之处 如今,市场上已经有了许多移动平台,包括Symbian、iPhone、
Windows
Mobile、BlackBerry、Java Mobile Edition和Linux Mobile(LiMo)等。当我向别人说起
Android
时,他们的第
一个
疑问通常是:我们为什么还需要另
一个
移动标准?它有何惊人之处? 虽然
Android
的一些特性并非首创,但它是第
一个
将以下特性结合在一起的环境。 基于Linux,真正开放、开源、免费的开发平台。手持设备制造商钟情于它的原因,是它们可以使用和定制该平台而不需要支付版税。开发人员
喜欢
它的原因,是他们知道这个平台是独立的,不受任何一家厂商的限制。 受Internet mashup思想启发的基于组件的架构。
一个
应用程序的组件可以在另
一个
应用程序中用作其他用途。你甚至可以将
Android
内置的组件替换为自己改进后的版本。这将在移动领域掀起新一轮的创造风潮。 众多开箱即用的内置服务。基于位置的服务使用GPS或手机发射塔三角测量法,让你可根据所处位置来定制用户体验。凭借功能全面的SQL数据库,利用强大的本地存储,可以完成偶尔连接的计算和同步操作。浏览器和地图视图可以直接嵌入在应用程序中。所有这些内置服务有助于提高功能的标准,同时降低开发成本。 应用程序生命周期的自动化管理。多层安全措施将程序彼此分离,这将使智能电话的系统稳定性达到前所未有的水平。最终用户不再需要担心哪些应用程序是活动的,也不必在运行新程序前先关闭原有的一些程序。
Android
针对低能耗、低内存的设备进行了优化,这种根本性的优化是之前的平台从未尝试过的。 高质量的图形和声音。将类似于Flash的光滑、无锯齿的2D矢量图形和动画与3D加速的OpenGL图形相结合,可实现各种新式的游戏和商业应用程序。
Android
内置了最常用的行业标准音频和视频格式的编解码器,这些格式包括H.264 (AVC)、MP3和AAC。 当前及未来各类硬件间的可移植性。所有程序都是用Java语言编写的,并且将由
Android
的Dalvik虚拟机执行,所以代码在ARM、
x86
和其他架构之间是可以移植的。
Android
提供了对各种输入方法的支持,比如说键盘、触摸屏和轨迹球。用户界面可以针对任何屏幕分辨率和屏幕方向进行定制。
Android
为用户与移动应用程序交互提供了全新的方式,同时也提供了实现这些交互的底层技术保障。而
Android
最令人心动之处,莫过于你可以为它编写软件,本书恰好可以为你提供这方面的帮助。 本书读者对象 阅读本书唯一的前提条件,是具备对Java编程或类似面向对象语言(比如说C#)的基本理解,不需要拥有为移动设备开发软件的经验。实际上,如果你确实有这方面的经验,反倒应该忘记它们。
Android
是如此与众不同,因此最好不要带着成见来学习它。 本书内容 本书分为三部分。大致来说,本书采用由浅入深、循序渐进的方式讨论
Android
。 有些章使用了
一个
公共的示例:
Android
数独游戏。通过逐渐在游戏中添加特性,你将学习
Android
编程的许多方面,包括用户界面、多媒体和
Android
生命周期。.. 第一部分中将首先介绍
Android
,内容涉及如何安装
Android
模拟器,如何使用IDE(Intergrated Development Environment,集成开发环境)编写第
一个
程序。然后,我们将介绍一些基本的概念,比如
Android
中的生命周期。
Android
中的编程方式可能与你之前采用的方式不同,因此一定要在继续学习之前掌握这些概念。 第二部分讨论
Android
的用户界面、二维图形、多媒体组件以及简单的数据访问。这些特性在大多数程序中都用得到。 第三部分深入探讨
Android
平台。这一部分介绍外部通信、基于位置的服务、内置SQLite数据库和三维图形。 本书最后提供了
一个
附录,其中列出了
Android
与Java SE(Java Standard Edition,Java标准版)之间的不同之处。 . 在线资源 本书网站http://pragprog.com/titles/eband提供了以下资源。 本书使用的所有示例程序的完整源代码; 勘误页面,列出了本书这一版中的所有错误(希望它保持空白); 论坛,在此你可以直接与作者及其他
Android
开发人员交流(希望论坛用户越来越多)。 读者可以在自己的应用程序中随意使用源代码。 关于“快速阅读指南” 虽然大多数作者都希望读者阅读他们书中的每一句话,但我知道你可能不想这样做。你只希望阅读能够解决手头问题的部分,而在需要解决其他问题时,再回过头来阅读另外一些内容。因此,我在书中特意注明在哪里可以找到你所关心的内容。 本书每章最后都有
一个
“快速阅读指南”,告诉无序阅读本书的读者接下来应该阅读哪些内容。读者还可以在其中发现一些指向相关资源(如图书和在线文档)的链接,可以了解相关主题的
更
多信息。 好吧,你现在想了解点什么?第1章就将指导你完成第
一个
Android
程序。第2章回过头来介绍
Android
的基本概念和原理。第3章探讨用户界面,也就是大多数
Android
程序中最重要的部分。 致谢 我要感谢为本书成功出版做出贡献的许多人,包括审稿人Anthony Stevens、Gabor Paller、Fred Burke、Dianne Hackborn和Laurent Pontier,他们详尽审阅了本书;感谢编辑Susannah Pfalzer在我几乎要推迟交稿时提供的好建议并为我鼓足勇气。特别要感谢我的家人,感谢他们在我写作本书期间表现出来的极大耐心。... 媒体评论 “跟本书的2005版一样,我认为Louis的这本书写得非常好,信息量极其丰富而且实践性强。阅读过程中,你会觉得是在跟作者讨论问题。我
喜欢
这本书,还因为它有自己的观点,而非从在线图书中照搬过来……”. —— Amazon读者评论 这本书极其出色,不仅文笔流畅、浅显易懂,内容也妙趣横生。本书既恰到好处地讲解了
Android
独有的特性,同时也突出了高质量编程的原则。 ——Anthony Stevens PocketJourney创始人兼CTO,Google
Android
竞赛前20强 Ed Burnette的这本书虽然篇幅不长,但内容丰富,保持了Pragmatic(实用)系列图书的一贯风格。仅凭2D和3D图形方面的内容,本书就非常值得所有
Android
开发人员拥有。 ——Mark Murphy.. CommonsWare创始人 我还记得第一次使用
Android
时的情景:当时感觉它就像是一座超大型迷宫。有了这本书,入门就不会那么痛苦了。我深信,通过阅读本书,上手开发
Android
应用程序将是一件非常轻松愉快的事。 ——Gabor Paller OnRelay公司高级软件架构师...
pcf8563_i2c1_r8_ruoge_ov2640通过给RTC驱动增加设备节点读取秒钟成功+直接读取I2C1获取秒钟值20160626_2201.7z
pcf8563_i2c1_r8_ruoge_ov2640通过给RTC驱动增加设备节点读取秒钟成功+直接读取I2C1获取秒钟值20160626_2201.7z http://blog.csdn.net/21cnbao/article/details/7919055 在
Android
源码树中添加userspace I2C读写工具(i2c-util) 本文使用的开发板是:杭州若格科技有限公司的全志R8。CPU:CPUARM Cortex-A8
更
多芯片资料请参见全志官网: http://www.allwinnertech.com/clq/r/R8.html 通过/dev/i2c-n节点,用户可以在userspace直接访问板上的i2c外设寄存器,主要是透过I2C_RDWR这个IO控制命令将i2c_msg数组传递给kernel去执行。 开发板的/dev/i2c-1总线下挂有一片I2C的RTC:pcf8563。 root@
android
:/dev # cd /sys/class/i2c-adapter/ root@
android
:/sys/class/i2c-adapter # ll lrwxrwxrwx root root 1970-01-02 08:31 i2c-0 -> ../../devices/platform/sun5i-i2c.0/i2c-0 lrwxrwxrwx root root 1970-01-02 08:31 i2c-1 -> ../../devices/platform/sun5i-i2c.1/i2c-1 lrwxrwxrwx root root 1970-01-02 08:31 i2c-2 -> ../../devices/platform/sun5i-i2c.2/i2c-2 root@
android
:/sys/class/i2c-adapter # cd i2c-1 root@
android
:/sys/class/i2c-adapter/i2c-1 # ll drwxr-xr-x root root 1970-01-02 08:31 1-0051 --w------- root root 4096 1970-01-02 08:31 delete_device lrwxrwxrwx root root 1970-01-02 08:31 device -> ../../sun5i-i2c.1 drwxr-xr-x root root 1970-01-01 08:00 i2c-dev -r--r--r-- root root 4096 1970-01-02 08:31 name --w------- root root 4096 1970-01-02 08:31 new_device drwxr-xr-x root root 1970-01-01 08:00 power lrwxrwxrwx root root 1970-01-02 08:31 subsystem -> ../../../../bus/i2c -rw-r--r-- root root 4096 1970-01-01 08:00 uevent root@
android
:/sys/class/i2c-adapter/i2c-1 # root@
android
:/sys/class/i2c-adapter/i2c-1 # cd 1-0051/ root@
android
:/sys/class/i2c-adapter/i2c-1/1-0051 # ll lrwxrwxrwx root root 1970-01-02 10:18 driver -> ../../../../../bus/i2c/drivers/pcf8563 -r--r--r-- root root 4096 1970-01-02 10:18 modalias -r--r--r-- root root 4096 1970-01-02 10:18 name drwxr-xr-x root root 1970-01-02 10:18 power drwxr-xr-x root root 1970-01-02 10:18 rtc lrwxrwxrwx root root 1970-01-02 10:18 subsystem -> ../../../../../bus/i2c -rw-r--r-- root root 4096 1970-01-02 10:18 uevent root@
android
:/sys/class/i2c-adapter/i2c-1/1-0051 # cat name pcf8563 root@
android
:/sys/class/i2c-adapter/i2c-1/1-0051 # 注释:1-0051 1 表示 i2c-1这条I2C1总线上挂载的设备,如果是I2C2总线上挂载的设备,路径就是2-00XX了。 0051 一般的I2C设备的从机地址都是
一个
字节的,因为前两位为0x00(16进制的),后两位为pcf8563移位自后的I2C从机地址0x51(也是16进制的) 压缩包中的PCF8563-CN.pdf,datasheet告诉我们:I2C总线从地址:读,0A3H;写,0A2H。右移一位之后正好是0x51。 下面的代码可以完成这个功能: #include #include #include #include #include #include #include #include #include #include #include /* This is the structure as used in the I2C_RDWR ioctl call */ struct i2c_rdwr_ioctl_data { struct i2c_msg __user *msgs; /* pointers to i2c_msgs */ __u32 nmsgs; /* number of i2c_msgs */ }; int i2c_read_reg(char *dev, unsigned char *buf, unsigned slave_address, unsigned reg_address, int len) { struct i2c_rdwr_ioctl_data work_queue; unsigned char w_val = reg_address; int ret; int fd = open(dev, O_RDWR); if (!fd) { printf("Error on opening the device file\n"); return 0; } work_queue.nmsgs = 2; work_queue.msgs = (struct i2c_msg*)malloc(work_queue.nmsgs *sizeof(struct i2c_msg)); if (!work_queue.msgs) { printf("Memory alloc error\n"); close(fd); return 0; } ioctl(fd, I2C_TIMEOUT, 2); ioctl(fd, I2C_RETRIES, 1); (work_queue.msgs[0]).len = 1; (work_queue.msgs[0]).addr = slave_address; (work_queue.msgs[0]).buf = &w_val; (work_queue.msgs[1]).len = len; (work_queue.msgs[1]).flags = I2C_M_RD; (work_queue.msgs[1]).addr = slave_address; (work_queue.msgs[1]).buf = buf; ret = ioctl(fd, I2C_RDWR, (unsigned long) &work_queue); if (ret < 0) { printf("Error during I2C_RDWR ioctl with error code: %d\n", ret); close(fd); free(work_queue.msgs); return 0; } else { printf("read salve:x reg:x\n", slave_address, reg_address); close(fd); free(work_queue.msgs); return len; } } int i2c_write_reg(char *dev, unsigned char *buf, unsigned slave_address, unsigned reg_address, int len) { struct i2c_rdwr_ioctl_data work_queue; unsigned char w_val = reg_address; unsigned char w_buf[len+1]; int ret; w_buf[0] = reg_address; int fd = open(dev, O_RDWR); if (!fd) { printf("Error on opening the device file\n"); return 0; } work_queue.nmsgs = 1; work_queue.msgs = (struct i2c_msg*)malloc(work_queue.nmsgs *sizeof(struct i2c_msg)); if (!work_queue.msgs) { printf("Memory alloc error\n"); close(fd); return 0; } ioctl(fd, I2C_TIMEOUT, 2); ioctl(fd, I2C_RETRIES, 1); (work_queue.msgs[0]).len = 1 + len; (work_queue.msgs[0]).addr = slave_address; (work_queue.msgs[0]).buf = w_buf; memcpy(w_buf + 1, buf, len); ret = ioctl(fd, I2C_RDWR, (unsigned long) &work_queue); if (ret < 0) { printf("Error during I2C_RDWR ioctl with error code: %d\n", ret); close(fd); free(work_queue.msgs); return 0; } else { printf("write salve:x reg:x\n", slave_address, reg_address); close(fd); free(work_queue.msgs); return len; } } int main(int argc, char **argv) { unsigned int fd; unsigned int slave_address, reg_address; unsigned r_w; unsigned w_val; unsigned char rw_val; if (argc < 5) { printf("Usage:\n%s /dev/i2c-x start_addr reg_addr rw[0|1] [write_val]\n", argv[0]); return 0; } fd = open(argv[1], O_RDWR); if (!fd) { printf("Error on opening the device file %s\n", argv[1]); return 0; } sscanf(argv[2], "%x", &slave_address); sscanf(argv[3], "%x", ®_address); sscanf(argv[4], "%d", &r_w); if (r_w == 0) { i2c_read_reg(argv[1], &rw_val, slave_address, reg_address, 1); printf("Read %s-%x reg %x, read value:%x\n", argv[1], slave_address, reg_address, rw_val); } else { if (argc < 6) { printf("Usage:\n%s /dev/i2c-x start_addr reg_addr r|w[0|1] [write_val]\n", argv[0]); return 0; } sscanf(argv[5], "%d", &w_val); if ((w_val & ~0xff) != 0) printf("Error on written value %s\n", argv[5]); rw_val = (unsigned char)w_val; i2c_write_reg(argv[1], &rw_val, slave_address, reg_address, 1); } return 0; } 在
android
/external/新建i2c-util目录,上述源代码存入
android
/external/i2c-util/i2c-util.c, R:\wyb\pcf8563_i2c1_r8_ruoge_ov2640\
android
\i2c-util\i2c-util.c 编写对应的
Android
.mk: LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE_TAGS := optional LOCAL_MODULE = i2c-util # LOCAL_SRC_FILES := $(call all-subdir-c-files) LOCAL_SRC_FILES := i2c-util.c include $(BUILD_EXECUTABLE) 编译
Android
后,上述工具会位于/system/bin目录。在电路板上使用它: R:\wyb\pcf8563_i2c1_r8_ruoge_ov2640\
android
\out\target\product\nuclear-evb\system\bin\i2c-util 如果
android
已经编译了,只需要执行: rootroot@rootroot-E400:~/wyb/pcf8563_i2c1_r8_ruoge_ov2640/
android
$ source build/envsetup.sh rootroot@rootroot-E400:~/wyb/pcf8563_i2c1_r8_ruoge_ov2640/
android
$ lunch 选择:18. nuclear_evb-eng (注意:不同的ubuntu电脑,序号可能不同,但是只需要选择nuclear_evb-eng编译选项前面的序号既可!!!!) rootroot@rootroot-E400:~/wyb/pcf8563_i2c1_r8_ruoge_ov2640/
android
$ rootroot@rootroot-E400:~/wyb/pcf8563_i2c1_r8_ruoge_ov2640/
android
$ cd i2c-util/ rootroot@rootroot-E400:~/wyb/pcf8563_i2c1_r8_ruoge_ov2640/
android
/i2c-util$ rootroot@rootroot-E400:~/wyb/pcf8563_i2c1_r8_ruoge_ov2640/
android
/i2c-util$ rootroot@rootroot-E400:~/wyb/pcf8563_i2c1_r8_ruoge_ov2640/
android
/i2c-util$ mm 详细的编译步骤: Connecting to 192.168.1.103:22... Connection established. To escape to local shell, press 'Ctrl+Alt+]'. Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.13.0-24-generic
x86
_64) * Documentation: https://help.ubuntu.com/ Last login: Sun Jun 26 19:23:30 2016 from 192.168.1.101 rootroot@rootroot-E400:~$ cd wyb/pcf8563_i2c1_r8_ruoge_ov2640/ rootroot@rootroot-E400:~/wyb/pcf8563_i2c1_r8_ruoge_ov2640$ rootroot@rootroot-E400:~/wyb/pcf8563_i2c1_r8_ruoge_ov2640$ rootroot@rootroot-E400:~/wyb/pcf8563_i2c1_r8_ruoge_ov2640$ ll total 8606460 drwxr-xr-x 4 rootroot rootroot 4096 Jun 26 20:46 ./ drwxr-xr-x 19 rootroot rootroot 4096 Jun 25 06:50 ../ drwxrwxr-x 29 rootroot rootroot 4096 Jun 26 19:51
android
/ drwxrwxr-x 8 rootroot rootroot 4096 Jun 26 16:35 lichee/ rootroot@rootroot-E400:~/wyb/pcf8563_i2c1_r8_ruoge_ov2640$ cd
android
/ rootroot@rootroot-E400:~/wyb/pcf8563_i2c1_r8_ruoge_ov2640/
android
$ rootroot@rootroot-E400:~/wyb/pcf8563_i2c1_r8_ruoge_ov2640/
android
$ rootroot@rootroot-E400:~/wyb/pcf8563_i2c1_r8_ruoge_ov2640/
android
$ source build/envsetup.sh including device/asus/grouper/vendorsetup.sh including device/asus/tilapia/vendorsetup.sh including device/generic/armv7-a-neon/vendorsetup.sh including device/generic/armv7-a/vendorsetup.sh including device/generic/mips/vendorsetup.sh including device/generic/
x86
/vendorsetup.sh including device/samsung/maguro/vendorsetup.sh including device/samsung/manta/vendorsetup.sh including device/samsung/toroplus/vendorsetup.sh including device/samsung/toro/vendorsetup.sh including device/softwinner/common/vendorsetup.sh including device/softwinner/crane-evb/vendorsetup.sh including device/softwinner/nuclear-256m/vendorsetup.sh including device/softwinner/nuclear-evb/vendorsetup.sh including device/softwinner/nuclear-r8m-evb/vendorsetup.sh including device/ti/panda/vendorsetup.sh including sdk/bash_completion/adb.bash rootroot@rootroot-E400:~/wyb/pcf8563_i2c1_r8_ruoge_ov2640/
android
$ rootroot@rootroot-E400:~/wyb/pcf8563_i2c1_r8_ruoge_ov2640/
android
$ rootroot@rootroot-E400:~/wyb/pcf8563_i2c1_r8_ruoge_ov2640/
android
$ lunch You're building on Linux Lunch menu... pick a combo: 1. full-eng 2. full_
x86
-eng 3. vbox_
x86
-eng 4. full_mips-eng 5. full_grouper-userdebug 6. full_tilapia-userdebug 7. mini_armv7a_neon-userdebug 8. mini_armv7a-userdebug 9. mini_mips-userdebug 10. mini_
x86
-userdebug 11. full_maguro-userdebug 12. full_manta-userdebug 13. full_toroplus-userdebug 14. full_toro-userdebug 15. crane_evb-eng 16. nuclear_256m-user 17. nuclear_256m-eng 18. nuclear_evb-eng 19. nuclear_r8m_evb-eng 20. full_panda-userdebug Which would you like? [full-eng] 18 ============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=4.2.2 TARGET_PRODUCT=nuclear_evb TARGET_BUILD_VARIANT=eng TARGET_BUILD_TYPE=release TARGET_BUILD_APPS= TARGET_ARCH=arm TARGET_ARCH_VARIANT=armv7-a-neon HOST_ARCH=
x86
HOST_OS=linux HOST_OS_EXTRA=Linux-3.13.0-24-generic-
x86
_64-with-Ubuntu-14.04-trusty HOST_BUILD_TYPE=release BUILD_ID=JDQ39 OUT_DIR=out ============================================ rootroot@rootroot-E400:~/wyb/pcf8563_i2c1_r8_ruoge_ov2640/
android
$ rootroot@rootroot-E400:~/wyb/pcf8563_i2c1_r8_ruoge_ov2640/
android
$ rootroot@rootroot-E400:~/wyb/pcf8563_i2c1_r8_ruoge_ov2640/
android
$ ll total 156 drwxrwxr-x 29 rootroot rootroot 4096 Jun 26 19:51 ./ drwxr-xr-x 4 rootroot rootroot 4096 Jun 26 20:46 ../ drwxrwxr-x 3 rootroot rootroot 4096 Jun 13 11:38 abi/ drwxrwxr-x 10 rootroot rootroot 4096 Jun 13 11:38 bionic/ drwxrwxr-x 5 rootroot rootroot 4096 Jun 13 11:38 bootable/ drwxrwxr-x 7 rootroot rootroot 4096 Jun 13 11:38 build/ drwxrwxr-x 11 rootroot rootroot 4096 Jun 13 11:38 cts/ drwxrwxr-x 18 rootroot rootroot 4096 Jun 13 11:38 dalvik/ drwxrwxr-x 18 rootroot rootroot 4096 Jun 13 11:38 development/ drwxrwxr-x 10 rootroot rootroot 4096 Jun 13 11:38 device/ drwxrwxr-x 3 rootroot rootroot 4096 Jun 13 11:38 docs/ drwxrwxr-x 159 rootroot rootroot 4096 Jun 13 11:39 external/ drwxrwxr-x 14 rootroot rootroot 4096 Jun 13 11:40 frameworks/ drwxrwxr-x 10 rootroot rootroot 4096 Jun 13 11:40 gdk/ drwxrwxr-x 10 rootroot rootroot 4096 Jun 13 11:40 hardware/ drwxr-xr-x 2 rootroot rootroot 4096 Jun 26 19:37 i2cscan/ drwxr-xr-x 2 rootroot rootroot 4096 Jun 26 19:52 i2c-util/ drwxrwxr-x 11 rootroot rootroot 4096 Jun 13 11:40 libcore/ drwxrwxr-x 4 rootroot rootroot 4096 Jun 13 11:40 libnativehelper/ -r--r--r-- 1 rootroot rootroot 87 Jun 13 11:38 Makefile drwxrwxr-x 8 rootroot rootroot 4096 Jun 13 11:40 ndk/ drwxrwxr-x 4 rootroot rootroot 4096 Jun 26 16:43 out/ drwxrwxr-x 8 rootroot rootroot 4096 Jun 13 11:40 packages/ drwxrwxr-x 5 rootroot rootroot 4096 Jun 13 11:40 pdk/ drwxrwxr-x 10 rootroot rootroot 4096 Jun 13 11:41 prebuilts/ drwxr-xr-x 2 rootroot rootroot 4096 Jun 25 13:01 read_pcf8563/ drwxrwxr-x 6 rootroot rootroot 4096 Jun 13 11:38 .repo/ drwxrwxr-x 51 rootroot rootroot 4096 Jun 13 11:41 sdk/ drwxrwxr-x 9 rootroot rootroot 4096 Jun 13 11:41 system/ drwxrwxr-x 4 rootroot rootroot 4096 Jun 13 11:41 tools/ rootroot@rootroot-E400:~/wyb/pcf8563_i2c1_r8_ruoge_ov2640/
android
$ rootroot@rootroot-E400:~/wyb/pcf8563_i2c1_r8_ruoge_ov2640/
android
$ rootroot@rootroot-E400:~/wyb/pcf8563_i2c1_r8_ruoge_ov2640/
android
$ cd i2c-util/ rootroot@rootroot-E400:~/wyb/pcf8563_i2c1_r8_ruoge_ov2640/
android
/i2c-util$ rootroot@rootroot-E400:~/wyb/pcf8563_i2c1_r8_ruoge_ov2640/
android
/i2c-util$ rootroot@rootroot-E400:~/wyb/pcf8563_i2c1_r8_ruoge_ov2640/
android
/i2c-util$ mm ============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=4.2.2 TARGET_PRODUCT=nuclear_evb TARGET_BUILD_VARIANT=eng TARGET_BUILD_TYPE=release TARGET_BUILD_APPS= TARGET_ARCH=arm TARGET_ARCH_VARIANT=armv7-a-neon HOST_ARCH=
x86
HOST_OS=linux HOST_OS_EXTRA=Linux-3.13.0-24-generic-
x86
_64-with-Ubuntu-14.04-trusty HOST_BUILD_TYPE=release BUILD_ID=JDQ39 OUT_DIR=out ============================================ PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/Effect_Tick.ogg:system/media/audio/ui/Effect_Tick.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/KeypressStandard.ogg:system/media/audio/ui/KeypressStandard.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/KeypressSpacebar.ogg:system/media/audio/ui/KeypressSpacebar.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/KeypressDelete.ogg:system/media/audio/ui/KeypressDelete.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/KeypressReturn.ogg:system/media/audio/ui/KeypressReturn.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/VideoRecord.ogg:system/media/audio/ui/VideoRecord.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/camera_click.ogg:system/media/audio/ui/camera_click.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/LowBattery.ogg:system/media/audio/ui/LowBattery.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/Dock.ogg:system/media/audio/ui/Dock.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/Undock.ogg:system/media/audio/ui/Undock.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/Lock.ogg:system/media/audio/ui/Lock.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/Unlock.ogg:system/media/audio/ui/Unlock.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/ringtones/ogg/Sceptrum.ogg:system/media/audio/ringtones/Sceptrum.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/KeypressStandard_120.ogg:system/media/audio/ui/KeypressStandard.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/KeypressSpacebar_120.ogg:system/media/audio/ui/KeypressSpacebar.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/KeypressDelete_120.ogg:system/media/audio/ui/KeypressDelete.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/KeypressReturn_120.ogg:system/media/audio/ui/KeypressReturn.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/notifications/ogg/Capella.ogg:system/media/audio/notifications/Capella.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/notifications/ogg/CetiAlpha.ogg:system/media/audio/notifications/CetiAlpha.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/notifications/ogg/Polaris.ogg:system/media/audio/notifications/Polaris.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/notifications/ogg/Pollux.ogg:system/media/audio/notifications/Pollux.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/notifications/ogg/Procyon.ogg:system/media/audio/notifications/Procyon.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/ringtones/ogg/Aquila.ogg:system/media/audio/ringtones/Aquila.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/ringtones/ogg/ArgoNavis.ogg:system/media/audio/ringtones/ArgoNavis.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/ringtones/ogg/Carina.ogg:system/media/audio/ringtones/Carina.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/ringtones/ogg/Centaurus.ogg:system/media/audio/ringtones/Centaurus.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/ringtones/ogg/Cygnus.ogg:system/media/audio/ringtones/Cygnus.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/ringtones/ogg/Draco.ogg:system/media/audio/ringtones/Draco.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/ringtones/ogg/Machina.ogg:system/media/audio/ringtones/Machina.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/ringtones/ogg/Orion.ogg:system/media/audio/ringtones/Orion.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/ringtones/ogg/Pegasus.ogg:system/media/audio/ringtones/Pegasus.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/ringtones/ogg/Pyxis.ogg:system/media/audio/ringtones/Pyxis.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/ringtones/ogg/Rigel.ogg:system/media/audio/ringtones/Rigel.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/ringtones/ogg/Scarabaeus.ogg:system/media/audio/ringtones/Scarabaeus.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/ringtones/ogg/Solarium.ogg:system/media/audio/ringtones/Solarium.ogg ignored. PRODUCT_COPY_FILES device/softwinner/nuclear-common/googleservice/gapps-jb-20121130-signed/system/tts/lang_pico/es-ES_zl0_sg.bin:system/tts/lang_pico/es-ES_zl0_sg.bin ignored. PRODUCT_COPY_FILES device/softwinner/nuclear-common/googleservice/gapps-jb-20121130-signed/system/tts/lang_pico/es-ES_ta.bin:system/tts/lang_pico/es-ES_ta.bin ignored. PRODUCT_COPY_FILES device/softwinner/nuclear-common/googleservice/gapps-jb-20121130-signed/system/tts/lang_pico/fr-FR_nk0_sg.bin:system/tts/lang_pico/fr-FR_nk0_sg.bin ignored. PRODUCT_COPY_FILES device/softwinner/nuclear-common/googleservice/gapps-jb-20121130-signed/system/tts/lang_pico/fr-FR_ta.bin:system/tts/lang_pico/fr-FR_ta.bin ignored. PRODUCT_COPY_FILES device/softwinner/nuclear-common/googleservice/gapps-jb-20121130-signed/system/tts/lang_pico/de-DE_gl0_sg.bin:system/tts/lang_pico/de-DE_gl0_sg.bin ignored. PRODUCT_COPY_FILES device/softwinner/nuclear-common/googleservice/gapps-jb-20121130-signed/system/tts/lang_pico/it-IT_cm0_sg.bin:system/tts/lang_pico/it-IT_cm0_sg.bin ignored. PRODUCT_COPY_FILES device/softwinner/nuclear-common/googleservice/gapps-jb-20121130-signed/system/tts/lang_pico/it-IT_ta.bin:system/tts/lang_pico/it-IT_ta.bin ignored. PRODUCT_COPY_FILES device/softwinner/nuclear-common/googleservice/gapps-jb-20121130-signed/system/tts/lang_pico/de-DE_ta.bin:system/tts/lang_pico/de-DE_ta.bin ignored. No private recovery resources for TARGET_DEVICE nuclear-evb make: Entering directory `/home/rootroot/wyb/pcf8563_i2c1_r8_ruoge_ov2640/
android
' target thumb C: i2c-util cd R:\wyb\pcf8563_i2c1_r8_ruoge_ov2640\
android
\out\target\product\nuclear-evb\system\bin C:\Users\Administrator.USER-20150913SZ>r: R:\wyb\pcf8563_i2c1_r8_ruoge_ov2640\
android
\out\target\product\nuclear-evb\system\bin>adb remount remount succeeded R:\wyb\pcf8563_i2c1_r8_ruoge_ov2640\
android
\out\target\product\nuclear-evb\system\bin> R:\wyb\pcf8563_i2c1_r8_ruoge_ov2640\
android
\out\target\product\nuclear-evb\system\bin>dir i2c* 驱动器 R 中的卷是 rootroot 卷的序列号是 1A1C-E71D R:\wyb\pcf8563_i2c1_r8_ruoge_ov2640\
android
\out\target\product\nuclear-evb\system\bin 的目录 2016/06/26 21:10 5,388 i2c-util 1 个文件 5,388 字节 0 个目录 268,337,782,784 可用字节 R:\wyb\pcf8563_i2c1_r8_ruoge_ov2640\
android
\out\target\product\nuclear-evb\system\bin> R:\wyb\pcf8563_i2c1_r8_ruoge_ov2640\
android
\out\target\product\nuclear-evb\system\bin>adb push i2c-util /data/ 29 KB/s (5388 bytes in 0.180s) R:\wyb\pcf8563_i2c1_r8_ruoge_ov2640\
android
\out\target\product\nuclear-evb\system\bin> 将R8的串口连接到
windows
电脑上。通过串口工具:比如Xshell5(有些人可能
喜欢
使用SecureCRT)读取R8的串口打印 (ubuntu下请使用minicom,使用方法请自行搜索了) 波特率选择:115200 N 8 1 等R8的
android
启动完成之后(LCD进
android
主界面),输入:su [ 37.990060] init: process 'ril-daemon', pid 950 exited [ 38.010049] init: process 'ril-daemon' killing any children in process group su root@
android
:/ # root@
android
:/ # root@
android
:/ # cd /data root@
android
:/data # root@
android
:/data # ll drwxrwxr-x system system 1970-01-11 08:58 anr drwxrwx--x system system 1970-01-02 08:01 app drwx------ root root 1980-10-01 11:03 app-asec drwxrwx--x system system 1970-01-02 08:01 app-lib drwxrwx--x system system 1980-10-01 11:03 app-private drwx------ system system 1980-10-01 11:04 backup drwxrwx--x system system 1970-01-02 08:00 dalvik-cache drwxrwx--x system system 2016-06-21 10:11 data drwxr-x--- root log 1980-10-01 11:03 dontpanic drwxrwx--- drm drm 1980-10-01 11:04 drm -rw-rw-rw- root root 5388 2016-06-26 21:10 i2c-util drwxr-x--x root root 1980-10-01 11:03 local drwxrwx--- root root 1970-01-01 08:00 lost+found drwxrwx--- media_rw media_rw 1980-10-01 11:03 media drwxrwx--t system misc 1980-10-01 11:03 misc -rw------- system system 154 1970-01-02 08:02 pointercal drwx------ root root 1970-01-02 08:00 property -rwxrwxrwx root root 5392 2016-06-25 13:01 read_pcf8563 drwxrwx--x system system 1980-10-01 11:03 resource-cache drwxr-x--- root shell 1980-10-01 11:03 ssh drwxrwxr-x system system 1970-01-02 08:00 system drwx------ system system 1970-01-02 08:03 tombstones drwx--x--x system system 1980-10-01 11:03 user root@
android
:/data # (让i2c-util具有可执行权限:) root@
android
:/data # chmod 777 i2c-util root@
android
:/data # root@
android
:/data # ll i2c* -rwxrwxrwx root root 5388 2016-06-26 21:10 i2c-util root@
android
:/data # root@
android
:/data # root@
android
:/data # (可选执行) root@
android
:/data # sync root@
android
:/data # 注意:串口打印会打印很多log信息。上面的步骤中的状态信息已经被过滤了。 如果你的串口打印过量的log信息,属于正常现象! 如果不想要这么多的状态信息,可以考虑使用adb shell。 不过
windows
命令行中的adb shell不能够按TAB键自动补充,ubuntu的可以。 也许我们可以把
windows
的命令行特别设计一下(给它修正一下),让它也可以通过按TAB键来自动补全!^_ 读取pcf8563的第2个寄存器(秒钟值): 表 5:BCD 格式寄存器概况 标明“-”的位无效 地址 寄存器名称 Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0 02h 秒 VL 00~59BCD 码格式数 root@
android
:/data # ./i2c-util /dev/i2c-1 0x51 0x02 0 read salve:51 reg:02 Read /dev/i2c-1-51 reg 2, read value:11 root@
android
:/data # ./i2c-util /dev/i2c-1 0x51 0x02 0 read salve:51 reg:02 Read /dev/i2c-1-51 reg 2, read value:12 root@
android
:/data # ./i2c-util /dev/i2c-1 0x51 0x02 0 read salve:51 reg:02 Read /dev/i2c-1-51 reg 2, read value:12 root@
android
:/data # ./i2c-util /dev/i2c-1 0x51 0x02 0 read salve:51 reg:02 Read /dev/i2c-1-51 reg 2, read value:13 root@
android
:/data # ./i2c-util /dev/i2c-1 0x51 0x02 0 read salve:51 reg:02 Read /dev/i2c-1-51 reg 2, read value:14 root@
android
:/data # ./i2c-util /dev/i2c-1 0x51 0x02 0 read salve:51 reg:02 Read /dev/i2c-1-51 reg 2, read value:14 root@
android
:/data # ./i2c-util /dev/i2c-1 0x51 0x02 0 read salve:51 reg:02 Read /dev/i2c-1-51 reg 2, read value:15 可以知道秒钟的值是变化的,基本上是一秒钟递增一次,I2C读取成功。 如果感兴趣的话,在执行读取命令的时候通过协议分析仪或者示波器来抓取I2C1的SCL/SDA的波形,来进行
更
加详尽的分析!^_ 方法二: 给出了一种复杂的解决办法(步骤从简,
更
多请参考开头的方法): R:\wyb\pcf8563_i2c1_r8_ruoge_ov2640\lichee\linux-3.4\drivers\rtc\rtc-sun5i.c 给这个驱动文件增加设备节点:/dev/a20_r8_pcf8563 增加设备节点的方法请参考: http://blog.csdn.net/mirkerson/article/details/8844997
android
驱动学习---led实验 然后在这个驱动文件的pcf8563_probe函数处截获它的client指针(struct i2c_client *client) client2 = client; 用户可以通过在userspace直接访问设备节点:/dev/a20_r8_pcf8563(open) 然后调用ioctl:ioctl(fd, 0x00000001, 0x02); 来获取第2个寄存器:秒钟的值了。 #include #include #include #include #include #include #include #include #include #include #include int fd; int main(int argc, char **argv) { fd = open("/dev/a20_r8_pcf8563", O_RDWR); ioctl(fd, 0x00000001, 0x02); close(fd); return 0; } 执行过程(直接从内核打印秒钟值了,也可以看到秒钟值大概也是一秒钟递增一次!): root@
android
:/data # root@
android
:/data # ./read_pcf8563 [ 1397.060015] ****wyb drivers/rtc/rtc-sun5i.c:1169/r8_pcf8563_open()! open init.... [ 1397.071009] ****wyb drivers/rtc/rtc-sun5i.c:1130/r8_pcf8563_ioctl()! cmd=0x00000001 [ 1397.079076] ****wyb drivers/rtc/rtc-sun5i.c:1160/r8_pcf8563_ioctl()! cmd=0x00000001, value=0x00000046 [ 1397.088342] ****wyb drivers/rtc/rtc-sun5i.c:1177/r8_pcf8563_close()! close init root@
android
:/data # root@
android
:/data # ./read_pcf8563 [ 1398.409888] ****wyb drivers/rtc/rtc-sun5i.c:1169/r8_pcf8563_open()! open init.... [ 1398.411203] ****wyb drivers/rtc/rtc-sun5i.c:1130/r8_pcf8563_ioctl()! cmd=0x00000001 [ 1398.419273] ****wyb drivers/rtc/rtc-sun5i.c:1160/r8_pcf8563_ioctl()! cmd=0x00000001, value=0x00000047 [ 1398.428546] ****wyb drivers/rtc/rtc-sun5i.c:1177/r8_pcf8563_close()! close init root@
android
:/data # root@
android
:/data # root@
android
:/data # ./read_pcf8563 [ 1399.668173] ****wyb drivers/rtc/rtc-sun5i.c:1169/r8_pcf8563_open()! open init.... [ 1399.670939] ****wyb drivers/rtc/rtc-sun5i.c:1130/r8_pcf8563_ioctl()! cmd=0x00000001 [ 1399.679022] ****wyb drivers/rtc/rtc-sun5i.c:1160/r8_pcf8563_ioctl()! cmd=0x00000001, value=0x00000048 [ 1399.688299] ****wyb drivers/rtc/rtc-sun5i.c:1177/r8_pcf8563_close()! close init root@
android
:/data #
cmake-3.22.5-
windows
-i386.zip
Cmake 各版本安装包
简单分享:Linux是
一个
开源的类Unix操作系统内核
Linux是
一个
开源的类Unix操作系统内核,由Linus Torvalds在1991年首次发布。它遵循自由软件和开源开发的原则,任何人都可以自由地使用、修改和分发Linux内核。Linux内核是许多流行操作系统的核心,包括但不限于: - Ubuntu:
一个
用户友好的Linux发行版,适合初学者和高级用户。 - Debian:
一个
以稳定性和安全性著称的Linux发行版。 - Fedora:由Red Hat赞助,注重最新技术的发行版。 - Red Hat Enterprise Linux(RHEL):
一个
面向企业的发行版,提供商业支持。 - CentOS:
一个
由社区驱动的发行版,用于企业和数据中心。 - openSUSE:
一个
德国开发的Linux发行版,适合桌面和服务器使用。 Linux操作系统的特点包括: 1. **开源**:Linux内核源代码对所有人开放,任何人都可以查看和修改。 2. **多用户多任务**:Linux支持多用户同时使用系统,执行多个任务。 3. **权限管理**:Linux具有强大的用户和组权限管理机制。 4. **稳定性和安全性**:Linux系统以其稳定
a.kodi_16.0.pvr.iptvsimple.zip
a.kodi_16.0.pvr.iptvsimple.zip
英特尔边缘计算技术
567
社区成员
7,024
社区内容
发帖
与我相关
我的任务
英特尔边缘计算技术
英特尔® 边缘计算,聚焦于边缘计算、AI、IoT等领域,为开发者提供丰富的开发资源、创新技术、解决方案与行业活动。
复制链接
扫一扫
分享
社区描述
英特尔® 边缘计算,聚焦于边缘计算、AI、IoT等领域,为开发者提供丰富的开发资源、创新技术、解决方案与行业活动。
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章