ucls_hub.h

来自「此為philip 1362 USB DOS下的驅動程式包, 已經共測試並內含有說」· C头文件 代码 · 共 114 行

H
114
字号
/*
   //*************************************************************************
   //
   //                  P H I L I P S   P R O P R I E T A R Y
   //
   //           COPYRIGHT (c)   2000 BY PHILIPS SINGAPORE.
   //                     --  ALL RIGHTS RESERVED  --
   //
   // File Name:	UsbClass_Hub.H
   // Author:		ZhenYu Zhang
   // Created:      Jun. 8, 2000
   // Contact: 	    hilbert.zhang@philips.com
   // Modified:
   // Revision:		0.0
   //
   //*************************************************************************
   // Abstract:
   //
 //*************************************************************************
*/
#ifndef   __USB_HUB_H__
#define   __USB_HUB_H__


#define USBHUBXFER_DEV   		                  	0x00
#define USBHUBXFER_HUBPORT                          0x03

#define USBHUB_REQUEST_GET_STATUS                   0x00
#define USBHUB_REQUEST_CLEAR_FEATURE                0x01
#define USBHUB_REQUEST_GET_STATE					0x02
#define USBHUB_REQUEST_SET_FEATURE                  0x03
#define USBHUB_REQUEST_GET_DESCRIPTOR               0x06
#define USBHUB_REQUEST_SET_DESCRIPTOR               0x07

BOOLEAN UsbHubCls_ClearHubFeature(
	UCHAR DevAddr,
	UCHAR Speed,
	UCHAR PktSize,
	USHORT 	wFeatureSelector
);

BOOLEAN UsbHubCls_SetHubFeature(
	UCHAR DevAddr,
	UCHAR Speed,
	UCHAR PktSize,

	USHORT 	wFeatureSelector
);

BOOLEAN UsbHubCls_ClearPortFeature(
	UCHAR 	DevAddr,
	UCHAR 	Speed,
	UCHAR 	PktSize,

	USHORT	wPort,
	USHORT 	wFeatureSelector
);

BOOLEAN UsbHubCls_SetPortFeature(
	UCHAR 	DevAddr,
	UCHAR 	Speed,
	UCHAR 	PktSize,

	USHORT	wPort,
	USHORT 	wFeatureSelector
);

BOOLEAN UsbHubCls_GetBusState(
	UCHAR 	DevAddr,
	UCHAR 	Speed,
	UCHAR 	PktSize,

	USHORT	wPort
);

BOOLEAN UsbHubCls_GetHubDescriptor(
	UCHAR 	DevAddr,
	UCHAR 	Speed,
	UCHAR 	PktSize,

	UCHAR	byDescriptorType,
	UCHAR	byDescriptorIndex,
	USHORT  wLanguageID,
	USHORT  wLength
);

BOOLEAN UsbHubCls_SetHubDescriptor(
	UCHAR 	DevAddr,
	UCHAR 	Speed,
	UCHAR 	PktSize,

	UCHAR	byDescriptorType,
	UCHAR	byDescriptorIndex,
	USHORT  wLanguageID,
	USHORT  wLength,
	PUCHAR  pPayload

);

BOOLEAN UsbHubCls_GetHubStatus(
	UCHAR 	DevAddr,
	UCHAR 	Speed,
	UCHAR 	PktSize
);

BOOLEAN UsbHubCls_GetPortStatus(
	UCHAR 	DevAddr,
	UCHAR 	Speed,
	UCHAR 	PktSize,

	USHORT  wPort
);

#endif

⌨️ 快捷键说明

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