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 XBOX_WIRELESS_PID 0x028F // Wireless controller only support charging
44 #define XBOX_WIRELESS_RECEIVER_PID 0x0719 // Microsoft Wireless Gaming Receiver
45 #define XBOX_WIRELESS_RECEIVER_THIRD_PARTY_PID 0x0291 // Third party Wireless Gaming Receiver
47 #define MADCATZ_VID 0x1BAD // For unofficial Mad Catz controllers
48 #define JOYTECH_VID 0x162E // For unofficial Joytech controllers
50 #define XBOX_REPORT_BUFFER_SIZE 14 // Size of the input report buffer
53 #define bmREQ_HID_OUT USB_SETUP_HOST_TO_DEVICE|USB_SETUP_TYPE_CLASS|USB_SETUP_RECIPIENT_INTERFACE
54 #define HID_REQUEST_SET_REPORT 0x09
56 #define XBOX_MAX_ENDPOINTS 3
75 virtual uint8_t
Init(uint8_t parent, uint8_t port,
bool lowspeed);
85 virtual uint8_t
Poll();
95 virtual bool isReady() {
return bPollEnable; };
174 uint32_t ButtonState;
175 uint32_t OldButtonState;
176 uint16_t ButtonClickState;
178 uint16_t controllerStatus;
190 void XboxCommand(uint8_t* data, uint16_t nbytes);