protected override bool _CaptureStart(int num) { capnum = num; captime = DateTime.Now; uint[] array = new uint[] { 1u, (uint)RX_BUF_SIZE, (uint)num }; USBIFSTATUS sTATUS = USBIF.SendCommand(7u, array, array.Length); if (sTATUS != USBIFSTATUS.E_OK) { throw new IOException(sTATUS.ToString()); } if (!USBIF.Reset()) { throw new IOException("can't reset device"); } USBIF.WriteReg(0x8000, 1u, 0u); //0x8000 = 32768u while ((array[0] & 1u) != 0u) { USBIF.ReadReg(0x8000, ref array[0], 0u); //0x8000 = 32768u Thread.Sleep(100); } return(true); }