AceWire
0.4.1
Unified interface for selecting different I2C implementations on Arduino platforms
|
25 #ifndef ACE_WIRE_TODBOT_WIRE_INTERFACE_H
26 #define ACE_WIRE_TODBOT_WIRE_INTERFACE_H
43 template <
typename T_WIRE>
72 return mWire.beginTransmission(addr) ^ 0x1;
83 uint8_t
write(uint8_t data)
const {
84 return (uint8_t) mWire.write(data);
96 return mWire.endTransmission();
113 uint8_t
requestFrom(uint8_t addr, uint8_t quantity,
bool sendStop =
true)
116 return mWire.requestFrom(addr, quantity);
A thin wrapper for the SoftI2CMaster class from the https://github.com/todbot/SoftI2CMaster project s...
uint8_t write(uint8_t data) const
Write data immediately into the I2C bus with the Write bit set, since SoftI2CMaster library does not ...
uint8_t read() const
Read byte from the I2C bus.
uint8_t requestFrom(uint8_t addr, uint8_t quantity, bool sendStop=true) const
Prepare to send quantity bytes to the device at addr.
uint8_t beginTransmission(uint8_t addr) const
Send the I2C address on the bus immediately, since the underlying implementation does not use a TX bu...
void end() const
End the interface.
void begin() const
Initial the interface.
uint8_t endTransmission(bool sendStop=true) const
Send the data in the buffer.
TodbotWireInterface(T_WIRE &wire)
Constructor.