21 #if defined(ARDUINO) && ARDUINO >= 100
31 #define EP_MAXPKTSIZE 32 // max size for data via USB
34 #define EP_INTERRUPT 0x03
37 #define XBOX_CONTROL_PIPE 0
38 #define XBOX_INPUT_PIPE 1
39 #define XBOX_OUTPUT_PIPE 2
42 #define XBOX_VID 0x045E // Microsoft Corporation
43 #define MADCATZ_VID 0x1BAD // For unofficial Mad Catz controllers
44 #define JOYTECH_VID 0x162E // For unofficial Joytech controllers
46 #define XBOX_WIRED_PID 0x028E // Microsoft 360 Wired controller
47 #define XBOX_WIRELESS_PID 0x028F // Wireless controller only support charging
48 #define XBOX_WIRELESS_RECEIVER_PID 0x0719 // Microsoft Wireless Gaming Receiver
49 #define XBOX_WIRELESS_RECEIVER_THIRD_PARTY_PID 0x0291 // Third party Wireless Gaming Receiver
51 #define XBOX_REPORT_BUFFER_SIZE 14 // Size of the input report buffer
54 #define bmREQ_HID_OUT USB_SETUP_HOST_TO_DEVICE|USB_SETUP_TYPE_CLASS|USB_SETUP_RECIPIENT_INTERFACE
55 #define HID_REQUEST_SET_REPORT 0x09
57 #define XBOX_MAX_ENDPOINTS 3
76 virtual uint8_t
Init(uint8_t parent, uint8_t port,
bool lowspeed);
86 virtual uint8_t
Poll();
110 virtual boolean VIDPIDOK(uint16_t vid, uint16_t pid) {
188 pFuncOnInit = funcOnInit;
210 void (*pFuncOnInit)(void);
215 uint32_t ButtonState;
216 uint32_t OldButtonState;
217 uint16_t ButtonClickState;
219 uint16_t controllerStatus;
231 void XboxCommand(uint8_t* data, uint16_t nbytes);