/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (C) Copyright Intel Corp., 1996 File: process.h Universal Serial Bus 930 Test firmware Revision History --------------------------------------------- 0.1 05-27-96 Abdul Rahman Ismail ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ // The following #defines are used to decode the recipient from bmRequestType #define GET_RECIPIENT 0x03 #define RECEIPIENT_DEVICE 0x00 #define RECEIPIENT_INTERFACE 0x01 #define RECEIPIENT_ENDPOINT 0x02 // Find the direction of the endpoint. #define GET_EP_DIRECTION 0x80 #define GET_EP_NUMBER 0x0F // Bit 7 is 0 for OUT endpoint and 1 for IN endpoint. #define HOST_2_DEV 0x00 #define DEV_2_HOST 0x80 // Bit 7 in EPCONx register stalls RX on the endpoint. // Bit 6 in EPCONx register stalls TX on the endpoint. #define STALL_RX 0x80 #define STALL_TX 0x40 // Feature Selector - used when enabling or setting features. // Sent down in the Setup packet for SetFeature and ClearFeature. #define DEVICE_REMOTE_WAKEUP 0x1 #define ENDPOINT_STALL 0x0 // Max packet sizes for EP1 and 2 within alternate interfaces. #define MPS_EP1_AX0 0x08 #define MPS_EP2_AX0 0x08 #define MPS_EP1_AX1 0x20 #define MPS_EP2_AX1 0x04 #define MPS_EP1_AX2 0x40 #define MPS_EP2_AX2 0x02 #define MPS_EP1_AX3 0x80 #define MPS_EP2_AX3 0x01 #define MPS_EP1_AX4 0x35 #define MPS_EP2_AX4 0x03 #define MPS_EP1_AX5 0x67 #define MPS_EP2_AX5 0x07