- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
本科毕业论文
(科研训练、毕业设计)
题 目:Linux字符设备驱动
姓 名:
学 院:软件学院
系:
专 业:软件工程
年 级:
学 号:
指导教师(校内): 职称:
指导教师(校外): 职称:
年月摘 要
关键词I2C;实时时钟;交叉编译。
Abstract
Device drivers take on a special role in the Linux kernel; they hide completely the details of how the device works. User activities are performed by means of a set of standardized calls that are independent of the specific driver; mapping those calls to device-specific operations that act on real hardware is then the role of the device driver. This programming interface is such that drivers can be built separately from the rest of the kernel and plugged in at runtime when needed. This modularity makes Linux drivers easy to write, easy to modify.
Through an instance of realizing a modularized driver of the RTC device in the embedded Linux, this paper analyzes the function mechanism of the char device driver in detail, and pay more attention on the key process during the development of the Linux char device drivers, including the basic char device driver, the i2c bus driver, the device bottom operation and so on. The paper also presents the whole debug and development process with the cross compile method
Key words: char device; device driver; I2C; RTC; cross compile.
目 录
第1章 引 言 1
1.1 Linux 简介 1
1.2 设备驱动 1
1.3 Linux驱动 2
1.4 选题背景 3
第2章 字符设备驱动框架 4
2.1 注册设备文件 4
2.1.1 设备号 4
2.1.2 注册设备号 4
2.1.3 释放设备号 5
2.1.4 创建设备节点 5
2.2 内核设备注册 6
2.3 设备操作索引 6
2.4 设备操作函数 7
2.4.1 Open() 7
2.4.2 Release() 7
2.4.3 Read() 7
2.4.4 Write() 8
2.4.5 ioctl() 8
第3章 设计与实现 9
3.1 设计思路 9
3.1.1 设计目标 9
3.1.2 解决方案 9
3.1.3 最终方案 9
3.1.4 细节 10
3.1.5 数据流图 10
3.2 I2C总线驱动 11
3.2.1 I2C背景 11
3.2.2 传输格式 11
3.2.3 标志位 START STOP 12
3.2.4 响应 13
3.2.5 传输流图 13
3.2.6 引脚地址 14
3.2.7 电平设置 14
3.2.8 引脚初始化 15
3.2.9 I2C写数据 15
3.2.10 写入从机地址 16
3.2.11 I2C读数据 16
3.3 RTC设备驱动 17
3.3.1 从机地址 17
3.3.2 设备数据地址 18
3.3.3 数据编码 18
3.3.4 读寄存器数据 19
3.3.5 写寄存器数据 19
3.3.6 读取时间 19
3.3.7 设置时间 20
第4章 编译调试 21
4.1 交叉编译 21
4.2 模块Makefile设计 21
4.3 测试设计
您可能关注的文档
最近下载
- 爱护我们的人民币.ppt VIP
- GJB9001C:2017质量保证大纲.doc VIP
- 可用性人因设计研究报告 .pdf VIP
- 设计概论讲课课件(第三版杨晓琪).pptx VIP
- 西师版六年级数学教案(上学期)全册教学案.pdf VIP
- 1.1+坚持改革开放(课件)-2025-2026学年九年级道德与法治上册(统编版).pptx VIP
- 2025-2026学年初中数学人教版2024八年级上册-人教版2024教学设计合集.docx
- 征信简版电子版PDF个人信用报告最新版2024年可编辑带水印模板.pdf VIP
- 创新创业基础(高职高专版)PPT教学完整课件.ppt
- 人教版小学六年级数学上册全册教案 -(最全).doc VIP
文档评论(0)