Esempio n. 1
0
        public void Connect(string ComPort)
        {
            GC.Collect(); // avoid open connections
            if (IsConnected)
            {
                throw new Exception($"Already connected to device {SerialD.PortName}");
            }
            SerialD = ComPort == null?SerialDevice.getAvailable() : new SerialDevice(ComPort);

            PinCount = SerialD.RunCommand(SysExMsg.MSG_GET_PINCOUNT, CommandType.Get).Values[0];

            LoadSettings();
        }
Esempio n. 2
0
 public static IEnumerable <string> getPorts()
 {
     return(SerialDevice.GetPortNames());
 }