26 #define EP_MAXPKTSIZE 32 // Max size for data via USB
29 #define XBOX_CONTROL_PIPE 0
30 #define XBOX_INPUT_PIPE 1
31 #define XBOX_OUTPUT_PIPE 2
34 #define XBOX_VID 0x045E // Microsoft Corporation
35 #define MADCATZ_VID 0x1BAD // For unofficial Mad Catz controllers
36 #define JOYTECH_VID 0x162E // For unofficial Joytech controllers
37 #define LOGITECH_VID 0x046D // For official Logitech controllers
39 #define XBOX_OLD_PID1 0x0202 // Original Microsoft Xbox controller (US)
40 #define XBOX_OLD_PID2 0x0285 // Original Microsoft Xbox controller (Japan)
41 #define XBOX_OLD_PID3 0x0287 // Microsoft Microsoft Xbox Controller S
42 #define XBOX_OLD_PID4 0x0289 // Smaller Microsoft Xbox controller (US)
43 #define XBOX_OLD_PID5 0xCA84 // Logitech Cordless Precision controller
45 #define XBOX_MAX_ENDPOINTS 3
64 uint8_t
Init(uint8_t parent, uint8_t port,
bool lowspeed);
98 virtual bool VIDPIDOK(uint16_t vid, uint16_t pid) {
142 pFuncOnInit = funcOnInit;
166 void (*pFuncOnInit)(void);
172 uint8_t OldButtonState;
173 uint8_t ButtonClickState;
176 uint8_t buttonValues[8];
177 uint8_t oldButtonValues[8];
178 bool buttonClicked[8];
185 void printReport(uint16_t length);
188 void XboxCommand(uint8_t* data, uint16_t nbytes);