added error and general I2C callback support