122 uint32_t read_delay = 0);
135 _bufferChunkSize = theChunk;
146 return _bufferChunkSize;
162 static constexpr size_t kDefaultBufferChunk = 32;
165 size_t _bufferChunkSize;
The sfTkArdI2C implements an sfTkII2C interface, defining the Arduino implementation for I2C in the T...
Definition: sfTkArdI2C.h:28
sfTkError_t ping()
A simple ping of the device at the given address.
Definition: sfTkArdI2C.cpp:99
sfTkError_t readRegister(uint8_t *devReg, size_t regLength, uint8_t *data, size_t numBytes, size_t &readBytes, uint32_t read_delay=0)
Reads data from a specified register of an I2C device.
Definition: sfTkArdI2C.cpp:144
sfTkArdI2C & operator=(const sfTkArdI2C &rhs)
Copy assignment.
Definition: sfTkArdI2C.h:59
TwoWire * _i2cPort
Definition: sfTkArdI2C.h:158
void setBufferChunkSize(size_t theChunk)
set the buffer chunk size
Definition: sfTkArdI2C.h:132
sfTkArdI2C(sfTkArdI2C const &rhs)
copy constructor
Definition: sfTkArdI2C.h:49
sfTkArdI2C(void)
Constructor.
Definition: sfTkArdI2C.h:34
size_t bufferChunkSize(void)
set the buffer chunk size
Definition: sfTkArdI2C.h:144
sfTkArdI2C(uint8_t addr)
Constructor.
Definition: sfTkArdI2C.h:42
sfTkError_t init()
Method sets up the required I2C settings.
Definition: sfTkArdI2C.cpp:81
sfTkError_t writeRegister(uint8_t *devReg, size_t regLength, const uint8_t *data, size_t length)
Writes data to a specified register on an I2C device.
Definition: sfTkArdI2C.cpp:118
virtual sfTkError_t writeRegister(uint8_t *devReg, size_t regLength, const uint8_t *data, size_t length)=0
Writes an array of bytes to a register on the target address. Supports any address size.
virtual sfTkError_t readRegister(uint8_t *devReg, size_t regLength, uint8_t *data, size_t numBytes, size_t &readBytes, uint32_t read_delay=0)=0
Reads an array of bytes to a register on the target address. Supports any address size.
Definition: sfTkII2C.h:27
header file for the SparkFun Toolkit Arduino layer
int32_t sfTkError_t
Definition: sfTkError.h:35
Header file for the SparkFun Toolkit I2C Interface Definition.