forked from qmor/elcus-1553-usb-linux-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
devstruct.h
49 lines (46 loc) · 1.77 KB
/
devstruct.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
43
44
45
46
47
48
49
#ifndef __TMK1553BUSB_STRUCT__
#define __TMK1553BUSB_STRUCT__
#ifndef __KERNEL__
# define __KERNEL__
#endif
#include <linux/usb.h>
typedef struct
{
short nType;
char szName[10];
unsigned short wPorts1;
unsigned short wPorts2;
unsigned short wIrq1;
unsigned short wIrq2;
unsigned short wIODelay;
} TTmkConfigData;
struct tmk1553busb
{
struct usb_device * udev; /* save off the usb device pointer */
struct usb_interface * interface; /* the interface for this device */
#ifdef CONFIG_DEVFS_FS
devfs_handle_t devfs; /* devfs device node */
#endif
unsigned char minor; /* the starting minor number for this device */
unsigned char device_type; /* type of the device */
/* TA1-USB-01 stuff */
__u8 ep2_address; /* the address of the bulk out endpoint */
__u8 ep4_address; /* the address of the bulk in endpoint */
__u8 ep6_address; /* the address of the bulk in endpoint */
__u8 ep8_address; /* the address of the bulk in endpoint */
__u16 ep2_maxsize; /* endpoint 2 max packet size */
__u16 ep4_maxsize; /* endpoint 2 max packet size */
__u16 ep6_maxsize; /* endpoint 2 max packet size */
__u16 ep8_maxsize; /* endpoint 2 max packet size */
int curproc; /* current process for this device */
int open_count; /* number of times this port has been opened */
struct semaphore startstopth_sem;
u8 fwver[2];
TTmkConfigData tmkConfigData_usb;
char intLoopMode;
char ResetEP6mt;
char ResetEP6int;
volatile char event;
int SerialNumber;
};
#endif