public static bool Find_HID_Device(ushort p_VendorID, ushort p_PoductID, ushort p_index, ref IntPtr p_ReadHandle, ref IntPtr p_WriteHandle, ref string p_devicepath, ref Guid p_HidGuid) { ushort num = 0; bool flag = Get_HID_Device(p_VendorID, p_PoductID, p_index, ref p_ReadHandle, ref p_WriteHandle, ref p_devicepath, true, ref p_HidGuid, ref num); if (flag) { flag = Kick_Off_Read_Thread(); if (flag) { flag = USBWrite.kick_off_write_thread(); } } return(flag); }
public static bool Find_ThisDevice(ushort VendorID, ushort ProductID) { IntPtr zero = IntPtr.Zero; IntPtr zero2 = IntPtr.Zero; Guid empty = Guid.Empty; string text = ""; ushort num = 0; bool flag = USB.Get_This_Device(VendorID, ProductID, 0, ref zero, ref zero2, ref text, false, ref empty, ref num); if (flag) { flag = USBRead.Kick_Off_Read_Thread(); if (flag) { flag = USBWrite.kick_off_write_thread(); } } return(flag); }
public static bool Find_HID_Device(ushort p_VendorID, ushort p_PoductID) { IntPtr zero = IntPtr.Zero; IntPtr ptr2 = IntPtr.Zero; Guid empty = Guid.Empty; string str = ""; ushort num = 0; bool flag = Get_HID_Device(p_VendorID, p_PoductID, 0, ref zero, ref ptr2, ref str, false, ref empty, ref num); if (flag) { flag = Kick_Off_Read_Thread(); if (flag) { flag = USBWrite.kick_off_write_thread(); } } return(flag); }
public static bool Initialize_PICkitSerial(ushort USBIndex) { IntPtr zero = IntPtr.Zero; IntPtr ptr2 = IntPtr.Zero; Guid empty = Guid.Empty; string str = ""; ushort num = 0x36; ushort num2 = 0x4d8; ushort num3 = 0; bool flag = USB.Get_This_Device(num2, num, USBIndex, ref zero, ref ptr2, ref str, false, ref empty, ref num3); if (flag) { flag = USBRead.Kick_Off_Read_Thread(); if (flag) { flag = USBWrite.kick_off_write_thread(); } } return(flag); }
public static bool Initialize_PICkitSerial(ushort USBIndex) { IntPtr zero = IntPtr.Zero; IntPtr zero2 = IntPtr.Zero; Guid empty = Guid.Empty; string text = ""; ushort p_PoductID = 54; ushort p_VendorID = 1240; ushort num = 0; bool flag = USB.Get_This_Device(p_VendorID, p_PoductID, USBIndex, ref zero, ref zero2, ref text, false, ref empty, ref num); if (flag) { flag = USBRead.Kick_Off_Read_Thread(); if (flag) { flag = USBWrite.kick_off_write_thread(); } } return(flag); }
public static bool Initialize_MyDevice(ushort USBIndex, ushort ProductID) { IntPtr zero = IntPtr.Zero; IntPtr ptr2 = IntPtr.Zero; Guid empty = Guid.Empty; string str = ""; ushort num = 0x4d8; ushort num2 = 0; bool flag = USB.Get_This_Device(num, ProductID, USBIndex, ref zero, ref ptr2, ref str, false, ref empty, ref num2); if (flag) { flag = USBRead.Kick_Off_Read_Thread(); if (flag) { flag = USBWrite.kick_off_write_thread(); if (ProductID == 80) { Utilities.g_comm_mode = Utilities.COMM_MODE.MTOUCH2; } } } return(flag); }
public static bool ReEstablish_Comm_Threads() { return(USBRead.Kick_Off_Read_Thread() && USBWrite.kick_off_write_thread()); }