版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 园林景观设计方案编制教程
- 我国保险业未来发展趋势分析报告
- 酒店员工劳动合同范本及流程
- 2019年五年级语文期末质量检测卷
- 社会工作专业实习案例分析
- 中小企业内部审计执行流程
- 班主任心理辅导技巧培训资料
- 营销与策划策划公司策划实习生实习报告
- 机械工程设备维修公司设备维修工程师实习报告
- 电子信息工程电子产品设计部实习报告
- 2026年哈尔滨五常市广源农林综合开发有限公司招聘工作人员5人笔试备考题库及答案解析
- 2025年农村人居环境五年评估报告
- 《开学第一课:龙马精神·梦想起航》课件 2025-2026学年统编版语文七年级下册
- 2026年洪湖市事业单位人才引进100人参考考试题库及答案解析
- 2026年中好建造(安徽)科技有限公司第一次社会招聘42人笔试参考题库及答案解析
- 北京市海淀区2025一2026学年度第一学期期末统一检测历史(含答案)
- 2026年科研仪器预约使用平台服务协议
- 2026年成都锦江人才发展有限责任公司公开招聘成都市锦江区编外人员的备考题库及参考答案详解1套
- 浙江省杭州市拱墅区2024-2025学年四年级上册期末考试数学试卷(含答案)
- 高中心理健康教育-给自己点个赞教学课件设计
- 苏轼《赤壁赋》朗诵脚本-上海大同中学
评论
0/150
提交评论