public static int RecieveRaw(IntPtr hidapi_handle, byte[] buf)
{
if (hidapi_handle == IntPtr.Zero) return -2;
HIDapi.hid_set_nonblocking(hidapi_handle, 1);
int res = HIDapi.hid_read(hidapi_handle, buf, new UIntPtr(Convert.ToUInt32(buf.Length)));
return res;
}