设为首页 加入收藏

TOP

底层之旅 —— Linux下的I2c体系结构(二)
2014-11-24 11:20:26 来源: 作者: 【 】 浏览:1
Tags:底层 之旅 Linux I2c 体系结构

unsigned short addr;/* chip address - NOTE: 7bit*/
/* addresses are stored in the*/
/* _LOWER_ 7 bits*/

char name[I2C_NAME_SIZE];
struct i2c_adapter *adapter;/* the adapter we sit on*/
struct i2c_driver *driver;/* and our access routines*/
struct device dev;/* the device structure*/
int irq; /* irq issued by device*/
struct list_head detected;
};


这四个数据结构之间又有密切联系。一个I2C适配器需要i2c_algorithm中提供的通信函数来控制适配器上产生特定的访问周期。缺少i2c_algorithmi2c_adapter什么也做不了,因此i2c_adapter中包含其使用的 i2c_algorithm的指针。i2c_driver与i2c_client的关系是一对多,一个i2c_driver上可以支持多个同类型的i2c_client。


首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Linux C 线程同步实例分析 下一篇Android中的service 实现之 利用o..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·Redis on AWS:Elast (2025-12-27 04:19:30)
·在 Spring Boot 项目 (2025-12-27 04:19:27)
·使用华为开发者空间 (2025-12-27 04:19:24)
·Getting Started wit (2025-12-27 03:49:24)
·Ubuntu 上最好用的中 (2025-12-27 03:49:20)