Search found 2 matches

by monkeyonkeyboard
Thu May 30, 2019 5:05 am
Forum: ESP-IDF
Topic: Issues with i2c_slave_read_buffer
Replies: 2
Views: 4063

Re: Issues with i2c_slave_read_buffer

In case anyone is looking for a solution, I've mostly resolved the issue by reading the buffer one byte at a time: uint8_t byte = 0; // attempt to read in bytes one by one while (true){ i2c_slave_read_buffer(I2C_NUM_0, &byte, 1, portMAX_DELAY); buf[i++] = byte; // ... other code, terminate while loo...
by monkeyonkeyboard
Tue May 28, 2019 11:29 am
Forum: ESP-IDF
Topic: Issues with i2c_slave_read_buffer
Replies: 2
Views: 4063

Issues with i2c_slave_read_buffer

Hi everyone, I'm trying to send a roughly 29 byte Protobuf message over I2C + a 3 byte header between two ESP32s. The I2C master can send the messages fine, however, I'm having trouble using i2c_slave_read_buffer because the bytes are out of order. The first byte of my header is always 0xB, so the b...