source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/usbdi.h@ 1170

Last change on this file since 1170 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 1.7 KB
Line 
1/**
2 * usbdi.h
3 *
4 * USBD and USB device driver definitions
5 *
6 * FIXME : Obsolete header.. Use usb.h instead.
7 *
8 * This file is part of the mingw-w64 runtime package.
9 * No warranty is given; refer to the file DISCLAIMER within this package.
10 *
11 * This file is based on the ReactOS PSDK file usbdi.h header.
12 * Original contributed by Casper S. Hornstrup <chorns@users.sourceforge.net>
13 *
14 * Added winapi-family check by Kai Tietz.
15 */
16
17#ifndef __USBDI_H__
18#define __USBDI_H__
19#include <winapifamily.h>
20
21#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
22
23#include <usb.h>
24#include <usbioctl.h>
25
26#define USBD_STATUS_CANCELLING ((USBD_STATUS) 0x00020000)
27#define USBD_STATUS_CANCELING ((USBD_STATUS) 0x00020000)
28#define USBD_STATUS_NO_MEMORY ((USBD_STATUS) 0x80000100)
29#define USBD_STATUS_ERROR ((USBD_STATUS) 0x80000000)
30#define USBD_STATUS_REQUEST_FAILED ((USBD_STATUS) 0x80000500)
31#define USBD_STATUS_HALTED ((USBD_STATUS) 0xc0000000)
32
33#define USBD_HALTED(Status) ((ULONG) (Status) >> 30 == 3)
34#define USBD_STATUS(Status) ((ULONG) (Status) & __MSABI_LONG (0x0fffffff))
35
36#define URB_FUNCTION_RESERVED0 0x0016
37#define URB_FUNCTION_RESERVED 0x001d
38#define URB_FUNCTION_LAST 0x0029
39
40#define USBD_PF_DOUBLE_BUFFER 0x00000002
41
42#ifdef USBD_PF_VALID_MASK
43#undef USBD_PF_VALID_MASK
44#endif
45
46#define USBD_PF_VALID_MASK (USBD_PF_CHANGE_MAX_PACKET | USBD_PF_DOUBLE_BUFFER | USBD_PF_ENABLE_RT_THREAD_ACCESS | USBD_PF_MAP_ADD_TRANSFERS)
47
48#define USBD_TRANSFER_DIRECTION_BIT 0
49#define USBD_SHORT_TRANSFER_OK_BIT 1
50#define USBD_START_ISO_TRANSFER_ASAP_BIT 2
51
52#ifdef USBD_TRANSFER_DIRECTION
53#undef USBD_TRANSFER_DIRECTION
54#endif
55
56#define USBD_TRANSFER_DIRECTION(x) ((x) & USBD_TRANSFER_DIRECTION_IN)
57#endif
58#endif
Note: See TracBrowser for help on using the repository browser.