Wire (i2c library) is evil, freezing programs whenever there's a problem on the line (e.g. unresponsive slave)... unacceptable.  This patch leaves things exactly as-is, by default, but allows you to:

  Wire.setAutoTimeout(UINT8); // set auto timeouts to a value between 0 (disabled) and 255 ms

Then proceed as usual. If auto-timeout is set, Xmega (xmWire) version may return TWI_ERROR_TIMEOUT errors on beginTransmission() and requestFrom(), should a timeout occur.

Questions/comments/suggestions welcome.
Pat Deegan, http://flyingcarsandstuff.com