public void WritePage(ushort Address, EEPROM_I2C_Page EEPROM_Page) { Address = PageAddress(Address); byte[] dummyAddress = { HighAddress(Address), LowAddress(Address) }; I2CDevice.I2CWriteTransaction writeCounter = I2CDevice.CreateWriteTransaction(dummyAddress); I2CDevice.I2CWriteTransaction pageWrite = I2CDevice.CreateWriteTransaction(EEPROM_Page.Page()); I2CDevice.I2CTransaction[] transactions = new I2CDevice.I2CTransaction[] { writeCounter, pageWrite }; m_transfer_count = I2C_device.Execute(transactions, m_timeout) - 2; m_transfer_type = transfer_type.write; }
public void WritePage(ushort Address, EEPROM_I2C_Page EEPROM_Page) { Address = PageAddress(Address); byte[] dummyAddress = { HighAddress(Address), LowAddress(Address) }; I2CDevice.I2CWriteTransaction writeCounter = I2CDevice.CreateWriteTransaction(dummyAddress); I2CDevice.I2CWriteTransaction pageWrite = I2CDevice.CreateWriteTransaction(EEPROM_Page.Page()); I2CDevice.I2CTransaction[] transactions = new I2CDevice.I2CTransaction[] { writeCounter, pageWrite }; m_transfer_count = I2C_device.Execute(transactions, m_timeout) - 2; m_transfer_type = transfer_type.write; }