public void SendInputData(VicarDevice.AdditionalCustomInterface iface, byte[] data) { var d = new byte[1 + 2 + data.Length]; Utilities.SetLittleEndianUshort(d, 1, (ushort)data.Length); Array.Copy(data, 0, d, 3, data.Length); switch (iface) { case AdditionalCustomInterface.HumanInterfaceDevice: { d[0] = _CUSTOM_HID_INCOMING_ENDPOINT; break; } case AdditionalCustomInterface.MassStorageDevice: { d[0] = _CUSTOM_MSD_INCOMING_ENDPOINT; break; } default: { break; } } var response = _SendRequest((byte)'V', d, false); }
public void SetDeviceConfiguration(VicarDevice.AdditionalCustomInterface configuration) { _SendRequest((byte)'D', new byte[] { (byte)configuration }, false); }