26 #include "I2CMaster.h"
30 SoftI2C(uint8_t dataPin, uint8_t clockPin);
35 void write(uint8_t value);
38 bool startRead(
unsigned int address,
unsigned int count);
48 unsigned int readCount;
52 void writeBit(
bool bit);
Bit-banged implementation of an I2C master.
bool startRead(unsigned int address, unsigned int count)
Starts a read operation for count bytes by sending the start condition and the I2C control byte...
bool endWrite()
Ends the current write operation.
SoftI2C(uint8_t dataPin, uint8_t clockPin)
Constructs a new software I2C master on dataPin and clockPin.
unsigned int available()
Returns the number of bytes that are still available for reading.
uint8_t read()
Reads a single byte from the I2C bus.
void write(uint8_t value)
Writes a single byte value on the I2C bus.
unsigned int maxTransferSize() const
Returns the maximum number of bytes that can be read or written in a single request by this bus maste...
Abstract base class for I2C master implementations.
void startWrite(unsigned int address)
Starts a write operation by sending a start condition and the I2C control byte.