The I2C bus in Linux
Each I2C device has a well defined 7 bits address that the master must use in order to communicate with a device. This address is not assigned at runtime as for the USB devices, it's assigned by the board designer by setting some chip's pins.
Note
Typically the chip manufacturer set most significant 3 or 4 bits and the board designer can set remaining bits in order to suite his/her needs. I2C bus specifications are controlled by NXP (Philips) and they are the ones who allocate addresses to I2C devices.
Another thing to be outlined regarding the I2C bus is that for each message the master must specify if the message wants read or write data from the slave. This special action is done by adding a final bit (least significant bit) ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access