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

📄 usb.h

📁 PXA250上的XBOOT
💻 H
字号:
/*  * $Id: usb.h,v 1.1 2002/12/05 22:20:38 telka Exp $ * * Copyright (C) 2001, 2002 ETC s.r.o. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * Written by Marcel Telka <marcel@telka.sk>, 2001, 2002. * */#ifndef	_USB_H_#define	_USB_H_#include <pshpack1.h>struct usb_dev_req {	char m_request;	char request;	char value_lo;	char value_hi;	short index;	short length;};struct usb_dev_desc {	char length;	char desc_type;	short usb;	char device_class;	char device_subclass;	char device_protocol;	char max_packet_size0;	short id_vendor;	short id_product;	short device;	char manufacturer;	char product;	char serial_number;	char num_configs;};struct usb_conf_desc_conf {	char length;	char desc_type;	short total_length;	char num_ifaces;	char config_val;	char config;	char attr;	char maxpower;};struct usb_conf_desc_iface {	char length;	char descriptortype;	char iface_num;	char alternatesetting;	char num_endpoints;	char class;	char subclass;	char protocol;	char iface;};struct usb_conf_desc_endp {	char length;	char desc_type;	char endp_addr;	char attr;	short max_packet_size;	char interval;};struct usb_conf_desc {	struct usb_conf_desc_conf conf;	struct usb_conf_desc_iface iface;	struct usb_conf_desc_endp ep1;	struct usb_conf_desc_endp ep2;};#include <poppack.h>/* UDCCR flags */#define	UDD	(1 << 0)#define	UDA	(1 << 1)#define	RESIM	(1 << 2)#define	EIM	(1 << 3)#define	RIM	(1 << 4)#define	TIM	(1 << 5)#define	SUSIM	(1 << 6)/* UDCSR flags */#define	EIR	(1 << 0)#define	RIR	(1 << 1)#define	TIR	(1 << 2)#define	SUSIR	(1 << 3)#define	RESIR	(1 << 4)#define	RSTIR	(1 << 5)/* UDCCS0 flags */#define	OPR	(1 << 0)#define	IPR	(1 << 1)#define	SST	(1 << 2)#define	FST	(1 << 3)#define	DE	(1 << 4)#define	SE	(1 << 5)#define	SO	(1 << 6)#define	SSE	(1 << 7)/* UDCCS1 flags */#define	RPC	(1 << 1)#define	RNE	(1 << 5)/* UDCCS2 flags */#define	TPC	(1 << 1)/* macros */#define CLEAR_OPR(UDCCS)	while (UDCCS & OPR) UDCCS = SO;#define	CLEAR_OPR_DE(UDCCS)	{ \					unsigned int udccs = UDCCS; \					while (((udccs = UDCCS) & OPR) | !(udccs & DE)) \						UDCCS = DE | SO; \				}#define	SET_IPR(UDCCS)		while (!(UDCCS & IPR)) UDCCS = IPR;#endif /* _USB_H_ */

⌨️ 快捷键说明

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