📄 summary
字号:
I2C and SMBus=============I2C (pronounce: I squared C) is a protocol developed by Philips. It is a slow two-wire protocol (variable speed, up to 400 kHz), with a high speedextension (3.4 MHz). It provides an inexpensive bus for connecting manytypes of devices with infrequent or low bandwidth communications needs.I2C is widely used with embedded systems. Some systems use variants thatdon't meet branding requirements, and so are not advertised as being I2C.SMBus (System Management Bus) is based on the I2C protocol, and is mostlya subset of I2C protocols and signaling. Many I2C devices will work on anSMBus, but some SMBus protocols add semantics beyond what is required toachieve I2C branding. Modern PC mainboards rely on SMBus. The most commondevices connected through SMBus are RAM modules configured using I2C EEPROMs,and hardware monitoring chips.Because the SMBus is mostly a subset of the generalized I2C bus, we canuse its protocols on many I2C systems. However, there are systems that don'tmeet both SMBus and I2C electrical constraints; and others which can'timplement all the common SMBus protocol semantics or messages.Terminology===========When we talk about I2C, we use the following terms: Bus -> Algorithm Adapter Device -> Driver ClientAn Algorithm driver contains general code that can be used for a whole classof I2C adapters. Each specific adapter driver either depends on one algorithmdriver, or includes its own implementation.A Driver driver (yes, this sounds ridiculous, sorry) contains the generalcode to access some type of device. Each detected device gets its owndata in the Client structure. Usually, Driver and Client are more closelyintegrated than Algorithm and Adapter.For a given configuration, you will need a driver for your I2C bus, anddrivers for your I2C devices (usually one driver for each device).At this time, Linux only operates I2C (or SMBus) in master mode; you can'tuse these APIs to make a Linux system behave as a slave/device, either tospeak a custom protocol or to emulate some other device.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -