Add request, capture, flush to TWIBus

This commit is contained in:
Scott Lahteine
2016-08-14 21:45:28 -07:00
parent 132322e4d9
commit bd928a69ec
3 changed files with 103 additions and 17 deletions

View File

@@ -5285,8 +5285,8 @@ inline void gcode_M121() { endstops.enable_globally(false); }
uint8_t bytes = code_seen('B') ? code_value_byte() : 1;
if (i2c.addr > 0 && bytes > 0 && bytes <= 32) {
i2c.reqbytes(bytes);
if (i2c.addr && bytes && bytes <= TWIBUS_BUFFER_SIZE) {
i2c.relay(bytes);
}
else {
SERIAL_ERROR_START;