int i2ctcp_read(i2ctcp_msg_t *target, const char *buf, size_t buf_sz)
Read chunk of input stream, and store resulting message in target.
Definition i2ctcpv1.c:8
void i2ctcp_read_reset(i2ctcp_msg_t *target)
Reset the remaining message data counter.
Definition i2ctcpv1.c:29
bool i2ctcp_write(const i2ctcp_msg_t *target, char **buf, size_t *buf_sz)
Allocate and write a msgpack-formatted message to buf.
Definition i2ctcpv1.c:31
I²C over TCP message (v1)
Definition i2ctcpv1.h:38
char * data
message content
Definition i2ctcpv1.h:40
size_t length
message size
Definition i2ctcpv1.h:41
uint16_t addr
I²C address.
Definition i2ctcpv1.h:39