|
| | I2C (int module) |
| | Constructor for the I2C peripheral module. More...
|
| |
| void | setup (uint32_t busSpeed) |
| | Initialize the I2C module. More...
|
| |
|
void | resetBus () |
| | Reset the I2C bus.
|
| |
| Result_t | DoTransaction (I2CTxn_t *pTransaction, bool bRepeatedStart=false) |
| | Start an I2C transaction. More...
|
| |
| Result_t | writeReg8 (uint8_t devAddr, uint8_t reg, uint8_t dat) |
| | Write an 8-bit value to a I2C slave device register. More...
|
| |
| Result_t | readReg8 (uint8_t devAddr, uint8_t reg, uint8_t &dat) |
| | Read an 8-bit value form an I2C slave device register. More...
|
| |
| Result_t | writeRegN (uint8_t devAddr, uint8_t reg, uint8_t *buf, uint32_t blen) |
| | Write a number of 8-bit values to an I2C slave to the specified register address. More...
|
| |
| Result_t | readRegN (uint8_t devAddr, uint8_t reg, uint8_t *buf, uint32_t blen) |
| | Read a number of 8-bit values from an I2C slave at the specified register address. More...
|
| |
I2C Peripheral Class.
For I2C communication, you can choose the WireIntf class, or the I2C class. The WireIntf class is simpler to use, while the I2C class provides more low level control.
Note that the system automatically instantiates I2C and WireIntf objects for each of the I2C peripheral modules. The WireIntf objects can be accessed with Wire, Wire1 and Wire2. The I2C objects can be accesses with I2C[0], I2C[1] and I2C[2].