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

📄 usb_ctl.h

📁 linux2.4.20下的针对三星公司的s3c2410的usb模块驱动代码
💻 H
字号:
/* *  Copyright (C) Compaq Computer Corporation, 1998, 1999 *  Copyright (C) Extenex Corporation 2001 *  Copyright (C) Intrinsyc, Inc., 2002 * */#ifndef _USB_CTL_H#define _USB_CTL_Henum { 	USB_STATE_NOTATTACHED	=0,	USB_STATE_ATTACHED	=1,	USB_STATE_POWERED	=2,	USB_STATE_DEFAULT	=3,	USB_STATE_ADDRESS	=4,	USB_STATE_CONFIGURED	=5,	USB_STATE_SUSPENDED	=6};struct usb_stats_t {	 unsigned long ep0_fifo_write_failures;	 unsigned long ep0_bytes_written;	 unsigned long ep0_fifo_read_failures;	 unsigned long ep0_bytes_read;};struct usb_info_t{	 char * client_name;	 dmach_t dmach_tx, dmach_rx;	 int state;	 unsigned char address;	 struct usb_stats_t stats;};/* in usb_ctl.c */extern struct usb_info_t usbd_info;/* * Function Prototypes */enum { 	kError		=-1,	kEvSuspend	=0,	kEvReset	=1,	kEvResume	=2,	kEvAddress	=3,	kEvConfig	=4,	kEvDeConfig	=5 };int usbctl_next_state_on_event( int event );/* endpoint zero */extern unsigned int ep0_state;void ep0_reset(void);void ep0_int_hndlr(void);#define EP0_STATE_IDLE		 0#define EP0_STATE_TRANSFER	 1#define EP0_STATE_RECEIVER	 2/* receiver */void ep_bulk_out1_state_change_notify( int new_state );int  ep_bulk_out1_recv(void);int  ep_bulk_out1_init(int chn);void ep_bulk_out1_int_hndlr(int status);void ep_bulk_out1_reset(void);void ep_bulk_out1_stall(void);/* xmitter */void ep_bulk_in1_state_change_notify( int new_state );void ep_bulk_in1_reset(void);int  ep_bulk_in1_init(int chn);void ep_bulk_in1_int_hndlr(int status);void ep_bulk_in1_stall(void);#endif /* _USB_CTL_H */

⌨️ 快捷键说明

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