* Wire Examples based on AVR ones of the same name
* Overload for begin(), change in callback arg from int to size_t
* Update master_reader.ino
Astyle
* Update master_writer.ino
Astyle
* Update slave_receiver.ino
Remove warning
* Update slave_receiver.ino
Astyle
I2C slave might stil have something to send when ESP826 starts I2C, thus
keeping the bus stuck.
Happens e.g. when power failure/reset during transmission.
Thanks to work of drmpf there is a solution.
Implemented as separate method so as not to interfere with existing.
Usage:
Wire.begin();
if (Wire.status() != I2C_OK) Serial.writeln("Something wrong with I2C
bus that cannot be recovered. Perform power cycle or search for other
masters on bus.";
this introduces optimistic_yield() used for when standard library
methods are normally used in tight loops waiting for something to
happen, like available().