protected void writeEEPROM(EEPROMLocation address, byte value) { writeTransaction[0].Buffer[0] = (byte)Command.WriteEEPROM; writeTransaction[0].Buffer[1] = (byte)address; writeTransaction[0].Buffer[2] = (byte)value; if (Execute(writeTransaction, 500) == 0) throw new I2CException(); }
protected byte readEEPROM(EEPROMLocation address) { readTransaction[0].Buffer[0] = (byte)Command.ReadEEPROM; readTransaction[0].Buffer[1] = (byte)address; if (Execute(readTransaction, 500) == 0) throw new I2CException(); else return readTransaction[1].Buffer[0]; }