Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 942 Bytes

i2c.rst

File metadata and controls

27 lines (19 loc) · 942 Bytes

i2c --- I2C

i2c

I2C is a data transfer bus. Normally one master and one or more slaves are connected to the bus. The master addresses one slave at a time to transfer data between the devices.

The master is normally fairly easy to implement since it controls the bus clock and no race conditions can occur. The slave, on the other hand, can be implemented in various ways depending on the application requirements. In this implementation the slave will always send an acknowledgement when addressed by the master, and lock the bus by pulling SCL low until it is ready for the transmission.


Source code: src/drivers/i2c.h, src/drivers/i2c.c

Test code: tst/drivers/i2c/master/main.c


drivers/i2c.h