Fix incorrect Print.write() return value.

The write method must return the number of byte successfully written
(1 in this case).

This fixes the library with the latest AVR core that stops writing
on error:
25d81c98e4

Without this patch the LCD shows only the first charater of a string.
master
Cristian Maglie 9 years ago
parent 24a5d3a28b
commit 143b5a1cb3
  1. 2
      LiquidCrystal_I2C.cpp

@ -9,7 +9,7 @@
#define printIIC(args) Wire.write(args)
inline size_t LiquidCrystal_I2C::write(uint8_t value) {
send(value, Rs);
return 0;
return 1;
}
#else

Loading…
Cancel
Save