public FtdiCommunicationTests(ITestOutputHelper output) { this.output = output; var ftdi = new FTDI(); var deviceCount = 0u; ftdi.GetNumberOfDevices(ref deviceCount); var deviceArray = new FTDI.FT_DEVICE_INFO_NODE[deviceCount]; ftdi.GetDeviceList(deviceArray); box = AmpsBoxFactory.CreateAmpsBox(deviceArray[0].SerialNumber); }
public DeviceCommandTest(ITestOutputHelper output) { this.output = output; serialPort = new SerialPort("COM3", 19200 * 2, Parity.Even) { RtsEnable = true, Handshake = Handshake.XOnXOff }; if (!serialPort.IsOpen) { serialPort.Open(); } box = AmpsBoxFactory.CreateAmpsBox(serialPort); }
public DeviceCommandTest(ITestOutputHelper output) { this.output = output; serialPort = new SerialPortStream("COM3", 19200 * 2, 8, Parity.Even, StopBits.One) { RtsEnable = false, Handshake = Handshake.XOn }; if (!serialPort.IsOpen) { serialPort.Open(); } box = AmpsBoxFactory.CreateAmpsBox(serialPort); }