- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Linux Device Drivers.ppt
Linux Device Drivers Inroduction What’s a ‘device-driver’? A special kind of computer program Intended to control a peripheral device Needs to execute ‘privileged’ instructions Must be integrated into the OS kernel Interfaces both to kernel and to hardware Program-format specific to a particular OS Linux device-drivers A package mainly of ‘service functions’ The package is conceptually an ‘object’ But in C this means it’s a ‘struct’ Specifically: struct file_operations { …; }; Definition is found in a kernel-header: ‘/usr/src/linux/include/linux/fs.h’ Types of Device-Drivers Character drivers: - the device processes individual bytes (e.g., keyboard, printer, modem) Block drivers: - the device processes groups of bytes (e.g., hard disks, CD-ROM drives) Linux has other driver-types Network drivers Mouse drivers SCSI drivers USB drivers Video drivers ‘Hot-swap’ drivers … and others Linux treats devices as files Programmers accustomed to the file API open(), seek(), read(), write(), close(), ... Requires creating a filename in a directory (special ‘/dev’ directory is for devices) Driver Identification Character/Block drivers: Use ‘major-number’ to identify the driver Use ‘minor-numbers’ to distinguish among several devices the same driver controls Kernel also needs a driver-name Users need a device-node as ‘interface’ Developing a device-driver Clarify your requirements Devise a design to achieve them Test your design-concept (‘prototype’) ‘Debug’ your prototype (as needed) Build your final driver in iteratively Document your work for future use ‘Open Source’ Hardware Some equipment manufactures regard their designs as ‘intellectual property’ They don’t want to ‘give away’ their info They believe ‘secrecy’ is an advantage They fear others might copy their designs BUT: This hinders systems programmers! Non-Disclosure Agreements Sometimes manufacturers will let ‘trusted’ individuals, or commercial ‘partners’, look at th
您可能关注的文档
- how gentle is the rain that falls softly on the meadow b.ppt
- How To Tell The Time.ppt
- huge arm.ppt
- Human rights - health and reproduction in Europe.ppt
- Incident Reporting and Fraud (and FOIA).ppt
- IndividualCertification bodies.ppt
- Infusing South AsiaGovernance Challenges in South Asia.ppt
- International investments in agricultural production.ppt
- Internet Security and Identity Theft.ppt
- Intracellular Compartments and Protein Sorting.ppt
- Listen and say a poem.At the library..ppt
- México antes de la guerra contra Estados Unidos.ppt
- M. Manghisonic,d, L. Rattia,c, V. Reb,c, V. Spezialia,c.ppt
- Machining.ppt
- Making Presentations That Audiences Will Love.ppt
- Making the Connections.ppt
- Management of Poisoning.ppt
- Managing Uncertainty in the Supply Chain.ppt
- Marginal Analysis.ppt
- mark.baker@computer.org.ppt
最近下载
- YY0306-2018 热辐射类治疗设备安全专用要求.pdf VIP
- 电力工程项目建设用地指标(风电场)(建标〔2011〕209号).pdf VIP
- 商品混凝土采购组织供应、运输、售后服务方案.docx VIP
- 《合成生物学》课件.pptx VIP
- 《中国文化概况》带翻译版.pdf VIP
- 消除艾滋病、梅毒和乙肝母婴传播项目工作制度及流程(模板).docx
- 2.1.2 认识地球(第2课时 地球仪与经纬网)七年级地理上册课件(湘教版).pptx VIP
- 二年级上册1-8单元看图写话.pdf VIP
- YY/T 0061-2021特定电磁波治疗器.pdf
- 沥青路面旧路改造工程施工方案.docx VIP
文档评论(0)