public async Task <int> ReadIntAsync(EEPROMDeviceType device, int addr) { var res = await Transact( string.Format(Protocol.ReadROMFormat, (int)device, addr, (int)EEPROMDataTypeCodes.Integer) ); return(res.ToInt32()); }
public async Task <float> ReadFloatAsync(EEPROMDeviceType device, int addr) { var res = await Transact( string.Format(Protocol.ReadROMFormat, (int)device, addr, (int)EEPROMDataTypeCodes.Float) ); return(res.ToFloat()); }
public async Task <byte> ReadByteAsync(EEPROMDeviceType device, int addr) { var res = await Transact( string.Format(Protocol.ReadROMFormat, (int)device, addr, (int)EEPROMDataTypeCodes.Byte) ); return(res.ToByte()); }
public Task WriteFloatAsync(EEPROMDeviceType device, int addr, float data) => SetCommandTransact( string.Format(Protocol.WriteROMFormat, (int)device, addr, (int)EEPROMDataTypeCodes.Float, data) );
public Task WriteByteAsync(EEPROMDeviceType device, int addr, byte data) => SetCommandTransact( string.Format(Protocol.WriteROMFormat, (int)device, addr, (int)EEPROMDataTypeCodes.Byte, (int)data) );