예제 #1
0
 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);
 }
예제 #2
0
        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());
            }
        }
예제 #3
0
        private void sendMPMessage(byte[] m)
        {
            HIDReport hidReport = new HIDReport(0, m);

            m_usb.Write(hidReport);
        }