public List write_read(string bus_id, int device_address, List write_buffer, int read_buffer_length) { var readBuffer = new byte[read_buffer_length]; _i2CBusService.WriteRead( bus_id, device_address, ConverterPythonProxy.ListToByteArray(write_buffer).AsArraySegment(), readBuffer.AsArraySegment()); return(PythonConvert.ToPythonList(readBuffer)); }
public void write(string bus_id, int device_address, List buffer) { if (bus_id == null) { throw new ArgumentNullException(nameof(bus_id)); } if (buffer == null) { throw new ArgumentNullException(nameof(buffer)); } _i2CBusService.Write(bus_id, device_address, ConverterPythonProxy.ListToByteArray(buffer).AsArraySegment()); }