30 #define EP_MAXPKTSIZE 32 // max size for data via USB 33 #define XBOX_CONTROL_PIPE 0 34 #define XBOX_OUTPUT_PIPE 1 35 #define XBOX_INPUT_PIPE 2 38 #define XBOX_VID 0x045E // Microsoft Corporation 39 #define XBOX_ONE_PID 0x02D1 // Microsoft One Wired controller 41 #define XBOX_REPORT_BUFFER_SIZE 14 // Size of the input report buffer 43 #define XBOX_MAX_ENDPOINTS 3 62 virtual uint8_t
Init(uint8_t parent, uint8_t port,
bool lowspeed);
72 virtual uint8_t
Poll();
96 virtual bool VIDPIDOK(uint16_t vid, uint16_t pid) {
127 pFuncOnInit = funcOnInit;
148 void (*pFuncOnInit)(void);
153 uint16_t ButtonState;
154 uint16_t OldButtonState;
155 uint16_t ButtonClickState;
157 uint16_t triggerValue[2];
158 uint16_t triggerValueOld[2];
164 uint8_t writeBuf[12];
170 uint8_t XboxCommand(uint8_t* data, uint16_t nbytes);
void attachOnInit(void(*funcOnInit)(void))
EpInfo epInfo[XBOX_MAX_ENDPOINTS]
#define XBOX_MAX_ENDPOINTS
virtual uint8_t Release()
uint16_t getButtonPress(ButtonEnum b)
virtual uint8_t GetAddress()
bool getButtonClick(ButtonEnum b)
virtual uint8_t Init(uint8_t parent, uint8_t port, bool lowspeed)
int16_t getAnalogHat(AnalogHatEnum a)
virtual bool VIDPIDOK(uint16_t vid, uint16_t pid)