added i2cIsMaster mode tracking and reworked error handling

still lacks synchronous api