public void Write(byte[] buffer, int offset, int size) { m_usb.Write(buffer, offset, size); bFlag = true; offsetAll = 0; //初始化Event,初始信号状态为false event_RWCtrl = new ManualResetEventSlim(false); }
private void SendCommand(Command cmd) { bool status; if (cmd.RType == 0) { status = m_usb.Write(cmd.GetHidReport()); } else { status = m_usb.WriteFeature(cmd.GetHidReport()); } if (status) { ShowData("TX", cmd.RType, cmd.GetHidReport()); } }
private void sendMPMessage(byte[] m) { HIDReport hidReport = new HIDReport(0, m); m_usb.Write(hidReport); }