ArduinoCore-avr/libraries/Wire
chuck todd f1c4cc6316 UnConfigured I2C Slave ISR Causing Reboot
In a MultiMaster I2C environment, The Default value of 0xFE in the TWAR cause the Arduino to respond as an I2C Slave device at address 0x7f.  If the Wire.h library was not configured as a I2C Slave, `Wire.begin(slaveID);` the Callbacks for `twi_onSlaveTransmit()` and `twi_onSlaveReceive()` are never initialized.
But, they are called during servicing the TWI ISR.  This causes a reboot of the Arduino by jumping to an uninitialized function address (0).
So, this fix initializes them to the Default Wire.h handler which will respond correctly even during Master Mode operations.
A MASTER MODE only Arduino will respond to all Slave Calls that match TWAR, Unless the TWEA bit is disabled outside of Master Transactions.
Chuck.
It also initialized the TWAR to the General Call ID (0x0) and Disables General Call responses.

Chuck.
2017-11-13 17:45:33 +01:00
..
examples [WIRE] Remove extra line from digital_potentiometer example 2017-11-13 12:42:12 +01:00
src UnConfigured I2C Slave ISR Causing Reboot 2017-11-13 17:45:33 +01:00
keywords.txt Remove unused keywords from Wire libraries keywords.txt 2015-11-28 17:56:21 -08:00
library.properties Update library.properties 2016-03-03 19:13:25 +01:00