AceWire
0.4.0
Unified interface for selecting different I2C implementations on Arduino platforms
|
25 #ifndef ACE_WIRE_SEEED_WIRE_INTERFACE_H
26 #define ACE_WIRE_SEEED_WIRE_INTERFACE_H
40 template <
typename T_WIRE>
69 return mWire.beginTransmission(addr) ^ 0x1;
79 uint8_t
write(uint8_t data)
const {
80 return (uint8_t) mWire.write(data);
94 return mWire.endTransmission();
111 uint8_t
requestFrom(uint8_t addr, uint8_t quantity,
bool sendStop =
true)
114 return mWire.requestFrom(addr, quantity);
void end() const
End the interface.
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 write(uint8_t data) const
Write data immediately into the I2C bus with the Write bit set, since the SoftwareI2C library does no...
void begin() const
Initial the interface.
uint8_t beginTransmission(uint8_t addr) const
Send the I2C address on the bus immediately since the underlying SoftwareI2C class does not use a TX ...
A thin wrapper for the SoftwareI2C class from the https://github.com/Seeed-Studio/Arduino_Software_I2...
uint8_t endTransmission(bool sendStop=true) const
Send the data in the buffer.
SeeedWireInterface(T_WIRE &wire)
Constructor.
uint8_t read() const
Read byte from the I2C bus.