mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Newer Xbox One controllers requires a longer initialisation command
Fixes #216
This commit is contained in:
parent
ff8bdb24c1
commit
f286114ac9
2 changed files with 7 additions and 3 deletions
|
@ -179,7 +179,10 @@ uint8_t XBOXONE::Init(uint8_t parent, uint8_t port, bool lowspeed) {
|
||||||
// initialize the controller for input
|
// initialize the controller for input
|
||||||
writeBuf[0] = 0x05;
|
writeBuf[0] = 0x05;
|
||||||
writeBuf[1] = 0x20;
|
writeBuf[1] = 0x20;
|
||||||
rcode = XboxCommand(writeBuf, 2);
|
writeBuf[2] = 0x00;
|
||||||
|
writeBuf[3] = 0x01;
|
||||||
|
writeBuf[4] = 0x00;
|
||||||
|
rcode = XboxCommand(writeBuf, 5);
|
||||||
if (rcode)
|
if (rcode)
|
||||||
goto Fail;
|
goto Fail;
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,8 @@
|
||||||
|
|
||||||
// PID and VID of the different devices
|
// PID and VID of the different devices
|
||||||
#define XBOX_VID 0x045E // Microsoft Corporation
|
#define XBOX_VID 0x045E // Microsoft Corporation
|
||||||
#define XBOX_ONE_PID 0x02D1 // Microsoft One Wired controller
|
#define XBOX_ONE_PID1 0x02D1 // Microsoft One Wired controller
|
||||||
|
#define XBOX_ONE_PID2 0x02DD // Microsoft One Wired controller
|
||||||
|
|
||||||
#define XBOX_REPORT_BUFFER_SIZE 14 // Size of the input report buffer
|
#define XBOX_REPORT_BUFFER_SIZE 14 // Size of the input report buffer
|
||||||
|
|
||||||
|
@ -94,7 +95,7 @@ public:
|
||||||
* @return Returns true if the device's VID and PID matches this driver.
|
* @return Returns true if the device's VID and PID matches this driver.
|
||||||
*/
|
*/
|
||||||
virtual bool VIDPIDOK(uint16_t vid, uint16_t pid) {
|
virtual bool VIDPIDOK(uint16_t vid, uint16_t pid) {
|
||||||
return (vid == XBOX_VID && pid == XBOX_ONE_PID);
|
return (vid == XBOX_VID && (pid == XBOX_ONE_PID1 || pid == XBOX_ONE_PID2));
|
||||||
};
|
};
|
||||||
/**@}*/
|
/**@}*/
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue