winapi_ui_automation/shared/
winusbio.rs

1// Licensed under the Apache License, Version 2.0
2// <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
3// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
4// All files in the project carrying such notice may not be copied, modified, or distributed
5// except according to those terms.
6//! Public header for WINUSB
7use shared::minwindef::{UCHAR, ULONG, USHORT};
8use shared::usb::USBD_PIPE_TYPE;
9pub const SHORT_PACKET_TERMINATE: ULONG = 0x01;
10pub const AUTO_CLEAR_STALL: ULONG = 0x02;
11pub const PIPE_TRANSFER_TIMEOUT: ULONG = 0x03;
12pub const IGNORE_SHORT_PACKETS: ULONG = 0x04;
13pub const ALLOW_PARTIAL_READS: ULONG = 0x05;
14pub const AUTO_FLUSH: ULONG = 0x06;
15pub const RAW_IO: ULONG = 0x07;
16pub const MAXIMUM_TRANSFER_SIZE: ULONG = 0x08;
17pub const RESET_PIPE_ON_RESUME: ULONG = 0x09;
18pub const DEVICE_SPEED: ULONG = 0x01;
19pub const LowSpeed: ULONG = 0x01;
20pub const FullSpeed: ULONG = 0x02;
21pub const HighSpeed: ULONG = 0x03;
22DEFINE_GUID!{WinUSB_TestGuid,
23    0xda812bff, 0x12c3, 0x46a2, 0x8e, 0x2b, 0xdb, 0xd3, 0xb7, 0x83, 0x4c, 0x43}
24STRUCT!{struct WINUSB_PIPE_INFORMATION {
25    PipeType: USBD_PIPE_TYPE,
26    PipeId: UCHAR,
27    MaximumPacketSize: USHORT,
28    Interval: UCHAR,
29}}
30pub type PWINUSB_PIPE_INFORMATION = *mut WINUSB_PIPE_INFORMATION;
31STRUCT!{struct WINUSB_PIPE_INFORMATION_EX {
32    PipeType: USBD_PIPE_TYPE,
33    PipeId: UCHAR,
34    MaximumPacketSize: USHORT,
35    Interval: UCHAR,
36    MaximumBytesPerInterval: ULONG,
37}}
38pub type PWINUSB_PIPE_INFORMATION_EX = *mut WINUSB_PIPE_INFORMATION_EX;