当前位置:网站首页>基于I2C协议的驱动开发
基于I2C协议的驱动开发
2022-07-03 10:04:00 【sydyh43】
1、linux下的I2C协议框架
一般i2c_adapter以下的特定适配器硬件相关操作代码由芯片厂家开发完成。只需要完成在I2C协议基础上的二次开发,比方说基于I2C协议实现网络数据的传输,或者I2C外围器件的控制,或者blalalala
2、I2C协议的读写时序图
I2C设备挂载I2C总线以后,I2C设备的设备地址由硬件确定。同一条I2C总线上的不同I2C设备的设备地址不同。I2C协议传输的单元是一个字节。
写时序
一次I2C的写操作包括设备地址+写操作;寄存器地址,数据。
每次CPU发送一个字节的数据后,I2C设备把DATA线拉低,做ACK
读时序
读时序相对写时序稍微复杂一点点。分成两部分,第一步写操作,告诉I2C设备需要读寄存器的地址。第二步读操作,第二次发送I2C设备地址,等待I2C设备ACK后,完成数据读取。【此时CPU成为接收端,当完成读取一个字节的数据后,CPU可以发送ACK。假如有ACK,从设备会继续发送寄存器的数据(大部分I2C设备支持多地址读取,发送一次寄存器地址,连续接下来的多个寄存器数据);假如NOACK,I2C设备停止发送数据】
3、代码框架
待补充
边栏推荐
- Stack, monotone stack, queue, monotone queue
- Do you really need automated testing?
- Balance between picture performance of unity mobile game performance optimization spectrum and GPU pressure
- Software testing e-commerce projects that can be written into your resume, don't you come in and get it?
- Lecture 1 number field
- AMS Series 1 - AMS startup process
- After 8 years of industry thinking, the test director has a deeper understanding of test thinking
- IIS does not take effect after modifying the configuration information
- 使用onvif协议操作设备
- glassfish org. h2.server. Shutdownhandler classnotfoundexception exception exception handling
猜你喜欢
10. Nacos source code construction
Comment réaliser des tests automatisés pour les tests logiciels embarqués?
Software testing e-commerce projects that can be written into your resume, don't you come in and get it?
. Net core - a queuing system for wechat official account
How to realize automatic testing in embedded software testing?
高精度室内定位技术,在智慧工厂安全管理的应用
What is the salary level of 17k? Let's take a look at the whole interview process of post-95 Test Engineers
解决undefined reference to `__aeabi_uidivmod‘和undefined reference to `__aeabi_uidiv‘错误
Balance between picture performance of unity mobile game performance optimization spectrum and GPU pressure
My understanding of testing (summarized by senior testers)
随机推荐
字节跳动大裁员,测试工程师差点遭团灭:大厂招人背后的套路,有多可怕?
Software testing (test case) writing: vulgar, native and skillful
Overview of testing theory
Empire CMS no thumbnail smart tag (e:loop) two ways to judge whether there is a titlepic
Game test related tests a hero's skills (spring moves are asked more questions)
one hot 独热码
File upload and download test point
glassfish org. h2.server. Shutdownhandler classnotfoundexception exception exception handling
反正切熵(Arctangent entropy):2022.7月最新SCI论文
QT: QSS custom qtoolbar and qtoolbox instances
QT: QSS custom qtreeview instance
The testing department of the company came to the king of the Post-00 roll, and the veteran exclaimed that it was really dry, but
ExecutorException: Statement returned more than one row, where no more than one was expected.
可以写进简历的软件测试电商项目,不进来get一下?
如何让让别人畏惧你
Solutions of n-ary linear equations and their criteria
Qt:qss custom qspinbox instance
[true question of the Blue Bridge Cup trials 44] scratch eliminate the skeleton Legion children programming explanation of the true question of the Blue Bridge Cup trials
栈,单调栈,队列,单调队列
Multiple IO transfer - preamble