37 if (n !=
static_cast<int>(size))
u_int8_t flags
State flags transmitted with every I2C transaction.
Definition mBaseJoint.h:394
stp_reg_t
register and command definitions
Definition mBaseJoint.h:39
int write(const stp_reg_t reg, T data, u_int8_t &flags)
Wrapper function to send command to the I2C slave.
Definition mJoint.hpp:62
int read(const stp_reg_t reg, T &data, u_int8_t &flags)
Wrapper function to request data from the I2C slave.
Definition mJoint.hpp:32
int handle
I2C bus handle.
Definition mJoint.h:175
A file containing utility macros and functions.
#define MAX_BUFFER
Maximum size of I2C Payload in bytes.
Definition joint.h:26
#define RFLAGS_SIZE
Size of the return flags in bytes.
Definition joint.h:33
File including the Joint class.
Definition mBaseJoint.h:19
Low level utility for I2C communication on Raspberry Pi using lgpio library.
int readFromI2CDev(const int dev_handle, const int reg, char *buffer, const int data_length)
reads block of bytes from device to buffer
Definition uI2C.cpp:16
int writeToI2CDev(const int dev_handle, const int reg, char *tx_buffer, const int data_length, char *RFLAGS_buffer)
writes block of bytes from buffer to device
Definition uI2C.cpp:36