Author: greatlrd
Date: Thu Jun 28 15:27:20 2007
New Revision: 27305
URL:
http://svn.reactos.org/svn/reactos?rev=27305&view=rev
Log:
cleaning up ddk header file, I am aming for ddk2003sp1 3790.1830 compatible
Added:
branches/ddk2003/include/ddk2003/ksdebug.h (with props)
branches/ddk2003/include/ddk2003/ptpusd.h (with props)
branches/ddk2003/include/ddk2003/usb200.h (with props)
Added: branches/ddk2003/include/ddk2003/ksdebug.h
URL:
http://svn.reactos.org/svn/reactos/branches/ddk2003/include/ddk2003/ksdebug…
==============================================================================
--- branches/ddk2003/include/ddk2003/ksdebug.h (added)
+++ branches/ddk2003/include/ddk2003/ksdebug.h Thu Jun 28 15:27:20 2007
@@ -1,0 +1,116 @@
+
+#if !defined(_KSDEBUG_)
+#define _KSDEBUG_
+
+#if !defined(REMIND)
+#define QUOTE(x) #x
+#define QQUOTE(y) QUOTE(y)
+#define REMIND(str) __FILE__ "(" QQUOTE(__LINE__) ") : " str
+#endif
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+#if defined(_NTDDK_)
+
+#define DEBUGLVL_ERROR 0
+#define DEBUGLVL_TERSE 1
+#define DEBUGLVL_VERBOSE 2
+#define DEBUGLVL_BLAB 3
+
+
+
+#if (DBG)
+
+#if defined(IRPMJFUNCDESC)
+static const PCHAR IrpMjFuncDesc[] =
+{
+ "IRP_MJ_CREATE",
+ "IRP_MJ_CREATE_NAMED_PIPE",
+ "IRP_MJ_CLOSE",
+ "IRP_MJ_READ",
+ "IRP_MJ_WRITE",
+ "IRP_MJ_QUERY_INFORMATION",
+ "IRP_MJ_SET_INFORMATION",
+ "IRP_MJ_QUERY_EA",
+ "IRP_MJ_SET_EA",
+ "IRP_MJ_FLUSH_BUFFERS",
+ "IRP_MJ_QUERY_VOLUME_INFORMATION",
+ "IRP_MJ_SET_VOLUME_INFORMATION",
+ "IRP_MJ_DIRECTORY_CONTROL",
+ "IRP_MJ_FILE_SYSTEM_CONTROL",
+ "IRP_MJ_DEVICE_CONTROL",
+ "IRP_MJ_INTERNAL_DEVICE_CONTROL",
+ "IRP_MJ_SHUTDOWN",
+ "IRP_MJ_LOCK_CONTROL",
+ "IRP_MJ_CLEANUP",
+ "IRP_MJ_CREATE_MAILSLOT",
+ "IRP_MJ_QUERY_SECURITY",
+ "IRP_MJ_SET_SECURITY",
+ "IRP_MJ_SET_POWER",
+ "IRP_MJ_QUERY_POWER"
+};
+#endif
+#endif
+
+#if (DBG)
+ #if !defined( DEBUG_LEVEL )
+ #if defined( DEBUG_VARIABLE )
+ #if defined( KSDEBUG_INIT )
+ ULONG DEBUG_VARIABLE = DEBUGLVL_TERSE;
+ #else
+ extern ULONG DEBUG_VARIABLE;
+ #endif
+ #else
+ #define DEBUG_VARIABLE DEBUGLVL_TERSE
+ #endif
+ #else
+ #if defined( DEBUG_VARIABLE )
+ #if defined( KSDEBUG_INIT )
+ ULONG DEBUG_VARIABLE = DEBUG_LEVEL;
+ #else
+ extern ULONG DEBUG_VARIABLE;
+ #endif
+ #else
+ #define DEBUG_VARIABLE DEBUG_LEVEL
+ #endif
+ #endif
+
+ #define _DbgPrintFEx(component, lvl, strings) \
+ { \
+ if ((lvl) <= DEBUG_VARIABLE)\
+ {\
+ DbgPrintEx(component, lvl, STR_MODULENAME);\
+ DbgPrintEx(component, lvl, strings);\
+ DbgPrintEx(component, lvl, "\n");\
+ if ((lvl) == DEBUGLVL_ERROR)\
+ {\
+ DbgBreakPoint();\
+ } \
+ } \
+ }
+
+ #define _DbgPrintF(lvl, strings)\
+ { \
+ if (((lvl)==DEBUG_VARIABLE) || (lvl < DEBUG_VARIABLE))\
+ {\
+ DbgPrint(STR_MODULENAME);\
+ DbgPrint##strings;\
+ DbgPrint("\n");\
+ if ((lvl) == DEBUGLVL_ERROR)\
+ {\
+ DbgBreakPoint();\
+ } \
+ } \
+ }
+#else
+ #define _DbgPrintF(lvl, strings)
+ #define _DbgPrintFEx(component, lvl, strings)
+#endif
+#endif
+
+
+#if defined(__cplusplus)
+}
+#endif
+#endif
Propchange: branches/ddk2003/include/ddk2003/ksdebug.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: branches/ddk2003/include/ddk2003/ptpusd.h
URL:
http://svn.reactos.org/svn/reactos/branches/ddk2003/include/ddk2003/ptpusd.…
==============================================================================
--- branches/ddk2003/include/ddk2003/ptpusd.h (added)
+++ branches/ddk2003/include/ddk2003/ptpusd.h Thu Jun 28 15:27:20 2007
@@ -1,0 +1,44 @@
+
+const DWORD ESCAPE_PTP_CLEAR_STALLS = 0x0200;
+const DWORD ESCAPE_PTP_VENDOR_COMMAND = 0x0100;
+const DWORD ESCAPE_PTP_ADD_OBJ_CMD = 0x0010;
+const DWORD ESCAPE_PTP_REM_OBJ_CMD = 0x0020;
+const DWORD ESCAPE_PTP_ADD_OBJ_RESP = 0x0040;
+const DWORD ESCAPE_PTP_REM_OBJ_RESP = 0x0080;
+const DWORD ESCAPE_PTP_ADDREM_PARM1 = 0x0000;
+const DWORD ESCAPE_PTP_ADDREM_PARM2 = 0x0001;
+const DWORD ESCAPE_PTP_ADDREM_PARM3 = 0x0002;
+const DWORD ESCAPE_PTP_ADDREM_PARM4 = 0x0003;
+const DWORD ESCAPE_PTP_ADDREM_PARM5 = 0x0004;
+const DWORD PTP_MAX_PARAMS = 5;
+const DWORD SIZEOF_REQUIRED_VENDOR_DATA_IN = sizeof(PTP_VENDOR_DATA_IN) - 1;
+const DWORD SIZEOF_REQUIRED_VENDOR_DATA_OUT = sizeof(PTP_VENDOR_DATA_OUT) - 1;
+const DWORD PTP_NEXTPHASE_READ_DATA = 3;
+const DWORD PTP_NEXTPHASE_WRITE_DATA = 4;
+const DWORD PTP_NEXTPHASE_NO_DATA = 5;
+
+
+#pragma pack(push, Old, 1)
+
+typedef struct _PTP_VENDOR_DATA_IN
+{
+ WORD OpCode;
+ DWORD SessionId;
+ DWORD TransactionId;
+ DWORD Params[PTP_MAX_PARAMS];
+ DWORD NumParams;
+ DWORD NextPhase;
+ BYTE VendorWriteData[1];
+} PTP_VENDOR_DATA_IN, *PPTP_VENDOR_DATA_IN;
+
+typedef struct _PTP_VENDOR_DATA_OUT
+{
+ WORD ResponseCode;
+ DWORD SessionId;
+ DWORD TransactionId;
+ DWORD Params[PTP_MAX_PARAMS];
+ BYTE VendorReadData[1];
+} PTP_VENDOR_DATA_OUT, *PPTP_VENDOR_DATA_OUT;
+
+#pragma pack(pop, Old)
+
Propchange: branches/ddk2003/include/ddk2003/ptpusd.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: branches/ddk2003/include/ddk2003/usb200.h
URL:
http://svn.reactos.org/svn/reactos/branches/ddk2003/include/ddk2003/usb200.…
==============================================================================
--- branches/ddk2003/include/ddk2003/usb200.h (added)
+++ branches/ddk2003/include/ddk2003/usb200.h Thu Jun 28 15:27:20 2007
@@ -1,0 +1,114 @@
+#ifndef __USB200_H__
+#define __USB200_H__
+
+#include "usb100.h"
+
+#include <PSHPACK1.H>
+
+#define USB_PORT_STATUS_CONNECT 0x0001
+#define USB_PORT_STATUS_ENABLE 0x0002
+#define USB_PORT_STATUS_SUSPEND 0x0004
+#define USB_PORT_STATUS_OVER_CURRENT 0x0008
+#define USB_PORT_STATUS_RESET 0x0010
+#define USB_PORT_STATUS_POWER 0x0100
+#define USB_PORT_STATUS_LOW_SPEED 0x0200
+#define USB_PORT_STATUS_HIGH_SPEED 0x0400
+#define USB_DEVICE_QUALIFIER_DESCRIPTOR_TYPE 0x06
+#define USB_OTHER_SPEED_CONFIGURATION_DESCRIPTOR_TYPE 0x07
+#define USB_INTERFACE_ASSOCIATION_DESCRIPTOR_TYPE 0x0B
+
+typedef enum _USB_DEVICE_SPEED
+{
+ UsbLowSpeed = 0,
+ UsbFullSpeed,
+ UsbHighSpeed
+} USB_DEVICE_SPEED;
+
+typedef enum _USB_DEVICE_TYPE
+{
+ Usb11Device = 0,
+ Usb20Device
+} USB_DEVICE_TYPE;
+
+
+typedef union _BM_REQUEST_TYPE
+{
+ struct _BM
+ {
+ UCHAR Recipient:2;
+ UCHAR Reserved:3;
+ UCHAR Type:2;
+ UCHAR Dir:1;
+ };
+ UCHAR B;
+} BM_REQUEST_TYPE, *PBM_REQUEST_TYPE;
+
+typedef struct _USB_DEFAULT_PIPE_SETUP_PACKET
+{
+ BM_REQUEST_TYPE bmRequestType;
+ UCHAR bRequest;
+ union _wValue
+ {
+ struct
+ {
+ UCHAR LowByte;
+ UCHAR HiByte;
+ };
+ USHORT W;
+ } wValue;
+ union _wIndex
+ {
+ struct
+ {
+ UCHAR LowByte;
+ UCHAR HiByte;
+ };
+ USHORT W;
+ } wIndex;
+ USHORT wLength;
+} USB_DEFAULT_PIPE_SETUP_PACKET, *PUSB_DEFAULT_PIPE_SETUP_PACKET;
+
+
+
+typedef struct _USB_DEVICE_QUALIFIER_DESCRIPTOR
+{
+ UCHAR bLength;
+ UCHAR bDescriptorType;
+ USHORT bcdUSB;
+ UCHAR bDeviceClass;
+ UCHAR bDeviceSubClass;
+ UCHAR bDeviceProtocol;
+ UCHAR bMaxPacketSize0;
+ UCHAR bNumConfigurations;
+ UCHAR bReserved;
+} USB_DEVICE_QUALIFIER_DESCRIPTOR, *PUSB_DEVICE_QUALIFIER_DESCRIPTOR;
+
+typedef union _USB_HIGH_SPEED_MAXPACKET
+{
+ struct _MP
+ {
+ USHORT MaxPacket:11;
+ USHORT HSmux:2;
+ USHORT Reserved:3;
+ };
+ USHORT us;
+ } USB_HIGH_SPEED_MAXPACKET, *PUSB_HIGH_SPEED_MAXPACKET;
+
+typedef struct _USB_INTERFACE_ASSOCIATION_DESCRIPTOR
+{
+ UCHAR bLength;
+ UCHAR bDescriptorType;
+ UCHAR bFirstInterface;
+ UCHAR bInterfaceCount;
+ UCHAR bFunctionClass;
+ UCHAR bFunctionSubClass;
+ UCHAR bFunctionProtocol;
+ UCHAR iFunction;
+} USB_INTERFACE_ASSOCIATION_DESCRIPTOR, *PUSB_INTERFACE_ASSOCIATION_DESCRIPTOR;
+
+C_ASSERT(sizeof(USB_DEFAULT_PIPE_SETUP_PACKET) == 8);
+
+#include <POPPACK.H>
+#endif
+
+
Propchange: branches/ddk2003/include/ddk2003/usb200.h
------------------------------------------------------------------------------
svn:eol-style = native