⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fps200usb.h

📁 小程序,但是有点用出处的.进攻参考.请多多提意见.
💻 H
字号:
#ifndef FPS200USB_H#define FPS200USB_H#define _BULK_DATA_LEN 64typedef struct{	unsigned char data[_BULK_DATA_LEN];	unsigned int size;	unsigned int pipe;}bulk_transfer_t,*pbulk_transfer_t;#define USB_BLOCK_SIZE 64#define FPS200USB_MINOR 240		/* some unassigned USB minor */#define FPS200USB_VERSION 0x1000#define IOCTL_FS_BULK              _IOWR('d', 0x30, bulk_transfer_t)#define IOCTL_FS_OVERRUNS	   _IOR('d',  0x15, int)#define IOCTL_FS_VERSION           _IOR('d', 0x3f, int) #ifdef __KERNEL__typedef enum { _stopped=0, _started } driver_state_t;typedef struct{  struct semaphore mutex;  struct usb_device *usbdev;  wait_queue_head_t wait;  wait_queue_head_t remove_ok;  wait_queue_head_t waitReadCompletion;  spinlock_t lock;  atomic_t pending_io;  driver_state_t state;  int remove_pending;  int got_mem;  int readptr;  int opened;  int statusDataReceived;  int fatal_error; /* true if a fatal error ocurred */  /* urb control to read data */  struct urb *read_urb;  unsigned char *bulk_in_buffer; /* the buffer to be used for reading */  unsigned int bulk_in_size; /* size of the buffer to read the image */#ifdef INTERRUPT_HANDLING  /* urb control to interrupt handler */  struct urb irq_urb; /* the urb to handle interrupts */  unsigned char icr_state; /* the state of the icr register (cache) */  unsigned char irq_status; /* the status of the interrupt */#endif  /* acquisition control */  int x;  /* start row */  int y;  /* start line */  int width; /* width of the image */  int height; /* height of the image */  int image_size;   /* total size of the image */  int header_size;  /* the size of the file header */  char *file_header; /* the header for the file */  int file_format;  /* the format of the file */} fps200usb_t,*pfps200usb_t;#endif#endif /* FPS200USB_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -