|
bool | startWriteRead (const uint8_t *writeBuffer, std::size_t writeSize, uint8_t *readBuffer, std::size_t readSize) |
| Configures the transaction with a write/read operation and starts it.
|
|
bool | startWrite (const uint8_t *buffer, std::size_t size) |
| Configures the transaction with a write operation and starts it.
|
|
bool | startRead (uint8_t *buffer, std::size_t size) |
| Configures the transaction with a read operation and starts it.
|
|
bool | startTransaction () |
| Starts the transaction with our own transaction object.
|
|
bool | startTransaction (modm::I2cTransaction *transaction) |
| Starts the transaction with a separate transaction object.
|
|
bool | isTransactionRunning () |
|
bool | wasTransactionSuccessful () |
|
modm::ResumableResult< bool > | runTransaction () |
| Starts our own transaction and waits until finished.
|
|
int8_t | getResumableDepth () const |
|
bool | isResumableRunning () const |
|
void | stopResumable () |
|
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