|
| I2cDevice (uint8_t address) |
|
void | setAddress (uint8_t address) |
|
void | attachConfigurationHandler (I2c::ConfigurationHandler handler) |
|
bool | ping () |
|
bool | writeRead (const uint8_t *writeBuffer, std::size_t writeSize, uint8_t *readBuffer, std::size_t readSize) |
| Starts a write-read transaction and waits until finished.
|
|
bool | write (const uint8_t *buffer, std::size_t size) |
| Starts a write transaction and waits until finished.
|
|
bool | read (uint8_t *buffer, std::size_t size) |
| Starts a write transaction and waits until finished.
|
|
template<class I2cMaster, uint8_t NestingLevels = 10, class Transaction = I2cWriteReadTransaction>
class modm::I2cDevice< I2cMaster, NestingLevels, Transaction >
Base class of an I2C Device.
This class provides functions for configuring the adapter and peripheral and starting transactions. It also provides a basic ping()
resumable function, which checks if the device responds to its address.
You need to provide the number of required nesting levels for your driver here. By default, 10 levels are chosen, which should be more than enough in any case.
You can choose to use your own custom I2c Transaction Adapter, by providing a class subclassed from an existing I2cAdapter or which implements the I2cTransaction interface manually.
- Template Parameters
-
- Author
- Georgi Grinshpun
-
Niklas Hauser