版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、版本号:1. 02015-07-251 目录12录1言2编写目的2术语和缩写词2目引2.12.234567添加dts3内核配置4测试4版本历史6.7第 1 页2 引言2.1 编写目的对于 I2C 不够用、或速度比较低的特殊场合,有时需要使用 GPIO 来模拟 i2c。目前 Linux内核已经做了很好的支持,bitbanging(/drivers/i2c/busses/i2c-gpio.c)主要来完成模式 i2c 功能,对此开发无需再专门写个驱动。本文基于 S500介绍供开发者参考。2.2术语和缩写词第 2 页缩写和术语解 释dtsDevice Tree Source,目标板硬件信息3 添加 d
2、tsBitbanging 已经实现了 dts 与 platform_data两种方式,具体查看 i2c-gpio.c 中的i2c_gpio_probe 函数,dts 相对比较简单,无需修改board 文件,这里以 dts 为例,有兴趣的可研究下 platform_data。针对 dts 方式,只需要对应板型的 dts 中添加如下部分:第 3 页i2c0 /*字符串不能修改,具体见 i2c-gpio.c 中的 i2c_gpio_dt_ids。*如需修改,两边 compatible 字段保持同步。*/compatible = i2c-gpio;/*gpio 配置,第一个 gpio 描述 sda,第
3、二个是 scl,别反了*/ gpios = ;/*开漏极配置,其并不是真正的把 gpio 设为开漏极,仅仅是*sda/scl 设为 high。*/i2c-gpio,spen-drain; i2c-gpio,scl-open-drain;/*clk 周期设置*/i2c-gpay-us = ;/* 100 kHz */ #address-cells = ;#size-cells = ;/测试代码的配置,与标准 i2c 设备配置相同i2cdev50compatible =actions,i2cdev; reg = ;4 内核配置默认内核是没打开,需要手动打开:makeconfig或直接修改对应板型的
4、 deconfig 文件,如 kernel/arch/arm/configs/atm7059a_s500_defconfig5 测试完成以上操作,编译并替换 dtb 与 uImage 文件,使用 i2c_owl_dev.ko 或其它 i2c 测试用例,用示波器测试 sda 与 scl 两个pin 的波形:第 4 页# CONFIG_I2C_GPIO is not set修改为: CONFIG_I2C_GPIO=yDevice Drivers- I2C support-I2C Hardware Bupport- GPIO-based bitbanging I2C第 5 页6 版本历史第 6 页日
5、期版本号注释作者2015-7-261.0建立初始化版本Actduino S500 项目组7DierInformation givenhisis provided just as a reference or exle for thepure of using Actions products, and cannot be treated as a part of any quoion orcontract for sale.Actions products may contain design defects or errors known as anomas or errata which
6、may cause the products functions to deviate from published specifications. Designers mustnot rely on the instructions of Actions products marked “” or “undefined”. Actionsreserves these for future definition and shall have no responsibility whatsoever forsorpatibilities arising from future changes t
7、o them.ACTIONS DIS AND EXCLUDES ANY AND ALL WARRANTIES, INCLUDING WITHOUTLIMIION ANY AND ALL EXPRESS OR IMPD WARRANTIES OF MERCHANTABILITY,ACCURACY, SECURITY, FITNESS FOR A PARTICULAR PURE, TITLE, AND AGAINSTINFRINGEMENT OF ELLECTUAL PROPERTY AND THE LIKE TO THE INFORMATON OF THIS AND ACTIONS PRODUC
8、TS.IN NO EVENT SHALL ACTIONS BE LIABLE FOR ANY DIRECT, INCIDENTAL, INDIRECT, SPEL,PUNITIVE, OR CONSEQUENTIAL DAMAGES WHATSOEVER, INCLUDING, WITHOUT LIMIIONFOR LOST OF DATA, PROFITS, SAVINGS OR REVENUES OF ANY KIND ARISING FROM USINGTHE INFORMATON OF THIS AND ACTIONS PRODUCTS. REGARDLESS OF THEFORM O
9、F ACTION, WHETHER BASED ON CONTRACT; TORT; NEGLIGENCE OF ACTIONS OROTHERS; STRICT LIABILITY; OR OTHERWISE; WHETHER OR NOT ANY REMEDY OF BUYER ISHELD TO HAVE FAILED OF ITS ESSENTIAL PURE, AND WHETHER ACTIONS HAS BEENADVISED OF THE SIBILITY OF SUCH DAMAGES OR NOT. Actions products are not designed,end
10、ed, authorized or warranted for use in any lifesupport or other application where product failure could cause or contribute toalinjury or severe property damage. Any and all such uses without prior written approval of an Officer of Actions and further testing and/or modification will be fully at the
11、 risk of thecustomer.Ways of obtaining informationCopies of thisand/or other Actions product literature, as well as the Terms andConditions of Sale Agreement, may be obtained by visiting Actions website at: or from an authorized Actions represenive.第 7 页TrademarksThe word “Actions” and the logo are
12、the trademarks of Actions Semiconductor Co.,and Actions (Zhuhai) Technology Co., Limited is authorized to use them. Word “炬芯” is the trademark of Actions (Zhuhai) Technology Co., Limited. Names and brands of othercompanies and their productst may from time to time descriptively appearhisare the trad
13、emarks of their respective holders, no affiliation, authorization, orendorsement by suchtherein.s are claimed or impd except as may be expressly sedRightsThe proviof thisshall not be deemed to grant buyers any right in and topatent, copyright, trademark, trade secret, know how, and any otherActions
14、or others.ellectual property ofMiscellaneousInformation contained or described herein relates only to the Actions products and as of the release date of this publication, abrogates and supersedes all previously published data andspecifications relating to such products provided by Actions or by any othpurporting to distribute such information.ersonActions reserves the rights to make changes to information described herein at any timewithout notice. Please contact your Actions sales represeninformation before placing your product order.ives to obtahe
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2206贵州遵义市播州区市场监督管理局招聘城镇公益性岗位人员2人笔试参考题库及答案详解
- 旅游行业市场供需动态评估投资评估潜力规划前景分析研究报告
- 2026年六安金寨某国企工作人员公开招聘考试备考题库及答案详解
- 环境监测仪器行业竞争优势分析及产销占有率研究研究报告
- 宜宾发展控股集团有限公司下属子公司四川三江汇海商业保理有限公司2026年第三批员工公开招聘笔试参考试题及答案详解
- 中国重油添加剂行业发展分析及竞争策略与趋势预测研究报告
- 全球与中国低合金钢电镀锌板带行业发展现状及趋势预测分析研究报告
- 2025-2030合成生物学在化妆品原料创新中的应用前景与风险报告
- 2026年廉洁常识测试题及答案
- 2026陕西西安交通大学仪器科学与技术学院管理辅助人员招聘1人考试备考题库及答案详解
- 国家职业技术技能标准 6-31-03-04 无损检测员(试行)人社厅发202332号
- 贴身管家服务流程
- 失语症筛查评定表
- 工程项目进度控制
- 胰十二指肠切除术
- 电气设备安装工程-江西定额
- 婺源县矿产资源开发公司新田金矿采矿权出让收益评估报告
- GB/T 27050.2-2006合格评定供方的符合性声明第2部分:支持性文件
- GB/T 15166.6-2008高压交流熔断器第6部分:用于变压器回路的高压熔断器的熔断件选用导则
- 全国名校高一下学期末考试数学试题(含答案)
- 泥石流地质灾害防治工程抗滑桩监理规划
评论
0/150
提交评论