Exemple #1
0
 private UsbSerialDeviceInfo FindDeviceInfo(UsbSerialDeviceID id)
 {
     if (AvailableDeviceInfo.ContainsKey(id))
     {
         return(AvailableDeviceInfo[id]);
     }
     else
     {
         return(null);
     }
 }
Exemple #2
0
        private UsbSerialDeviceInfo FindDeviceInfo(UsbSerialDeviceID id, UsbClass usbClass, bool allowAnonymousCdcAcmDevices)
        {
            if (AvailableDeviceInfo.ContainsKey(id))
            {
                return(AvailableDeviceInfo[id]);
            }
            if (allowAnonymousCdcAcmDevices && usbClass == UsbClass.Comm)
            {
                return(UsbSerialDeviceInfo.CdcAcm);
            }

            return(null);
        }