-
Notifications
You must be signed in to change notification settings - Fork 0
/
usbio.h
42 lines (34 loc) · 2.41 KB
/
usbio.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
********************************************************************
* USB stack and host controller driver for SGI IRIX 6.5 *
* *
* Programmed by BSDero *
* bsdero at gmail dot com *
* 2011/2012 *
* *
* *
* File: usbio.h *
* Description: macros for ioctl definitions *
* *
********************************************************************
*******************************************************************************************************
* FIXLIST (latest at top) *
*-----------------------------------------------------------------------------------------------------*
* Author MM-DD-YYYY Description *
*-----------------------------------------------------------------------------------------------------*
* BSDero 03-29-2012 -Initial version *
* *
*******************************************************************************************************
*/
#ifndef _USBIO_H_
#define _USBIO_H_
#define _IOCTL_RMASK (0x0100)
#define _IOCTL_WMASK (0x0200)
#define _IOCTL_(c,v) ((int)(c << 8 | v))
#define _IOCTL_R(c,v,n) ((int)( _IOCTL_RMASK | (sizeof( n) << 18) | _IOCTL_(c,v)))
#define _IOCTL_W(c,v,n) ((int)( _IOCTL_WMASK | (sizeof( n) << 18) | _IOCTL_(c,v)))
#define _IOCTL_WR(c,v,n) ((int)( _IOCTL_RMASK | _IOCTL_WMASK | (sizeof( n) << 18) | _IOCTL_(c,v)))
#define _IOCTL_GETC(c) (( c >> 8) & 0xff)
#define _IOCTL_GETN(n) (n & 0xff)
#define _IOCTL_GETS(s) (( s >> 18) & 0xffff)
#endif