USB-BDI
|
00001 /* USB-BDI Used for programming and debugging a MPC555 over USB 00002 * 00003 * Copyright 2005 NTB Interstate University of Applied Sciences of Technology Buchs 00004 * 00005 * This program is free software: you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation, either version 3 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 */ 00015 00026 // Standard USB requests. 00027 // These are contained in end point 0 setup packets 00028 00029 00030 #ifndef _USB_REQUESTS_H_ 00031 #define _USB_REQUESTS_H_ 00032 00033 // format of bmRequestType byte 00034 00035 #define bmRT_DIR_MASK (0x1 << 7) 00036 #define bmRT_DIR_IN (1 << 7) 00037 #define bmRT_DIR_OUT (0 << 7) 00038 00039 #define bmRT_TYPE_MASK (0x3 << 5) 00040 #define bmRT_TYPE_STD (0 << 5) 00041 #define bmRT_TYPE_CLASS (1 << 5) 00042 #define bmRT_TYPE_VENDOR (2 << 5) 00043 #define bmRT_TYPE_RESERVED (3 << 5) 00044 00045 #define bmRT_RECIP_MASK (0x1f << 0) 00046 #define bmRT_RECIP_DEVICE (0 << 0) 00047 #define bmRT_RECIP_INTERFACE (1 << 0) 00048 #define bmRT_RECIP_ENDPOINT (2 << 0) 00049 #define bmRT_RECIP_OTHER (3 << 0) 00050 00051 00052 // standard request codes (bRequest) 00053 00054 #define RQ_GET_STATUS 0 00055 #define RQ_CLEAR_FEATURE 1 00056 #define RQ_RESERVED_2 2 00057 #define RQ_SET_FEATURE 3 00058 #define RQ_RESERVED_4 4 00059 #define RQ_SET_ADDRESS 5 00060 #define RQ_GET_DESCR 6 00061 #define RQ_SET_DESCR 7 00062 #define RQ_GET_CONFIG 8 00063 #define RQ_SET_CONFIG 9 00064 #define RQ_GET_INTERFACE 10 00065 #define RQ_SET_INTERFACE 11 00066 #define RQ_SYNCH_FRAME 12 00067 00068 // standard descriptor types 00069 00070 #define DT_DEVICE 1 00071 #define DT_CONFIG 2 00072 #define DT_STRING 3 00073 #define DT_INTERFACE 4 00074 #define DT_ENDPOINT 5 00075 #define DT_DEVQUAL 6 00076 #define DT_OTHER_SPEED 7 00077 #define DT_INTERFACE_POWER 8 00078 00079 // standard feature selectors 00080 00081 #define FS_ENDPOINT_HALT 0 // recip: endpoint 00082 #define FS_DEV_REMOTE_WAKEUP 1 // recip: device 00083 #define FS_TEST_MODE 2 // recip: device 00084 00085 // Get Status device attributes 00086 00087 #define bmGSDA_SELF_POWERED 0x01 00088 #define bmGSDA_REM_WAKEUP 0x02 00089 00091 #endif /* _USB_REQUESTS_H_ */