Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of USBHostXpad by
Revision 9:2b1ba1e2eb70, committed 2017-04-03
- Comitter:
- Ownasaurus
- Date:
- Mon Apr 03 00:51:40 2017 +0000
- Parent:
- 8:f5f3dd9b97b6
- Commit message:
- Fixed support for Microsoft brand wired X360 controllers, which was not working (even though offbrands were)
Changed in this revision
| USBHostXpad.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/USBHostXpad.cpp Fri Feb 24 02:45:08 2017 +0000
+++ b/USBHostXpad.cpp Mon Apr 03 00:51:40 2017 +0000
@@ -405,8 +405,17 @@
return false;
}
if (dev) {
- if (host->interruptWrite(dev, int_out, odata, 12) != USB_TYPE_OK) {
- return false;
+ if(dev_type == TYPE_XBOX360)
+ {
+ if (host->interruptWrite(dev, int_out, odata, 3) != USB_TYPE_OK) {
+ return false;
+ }
+ }
+ else if(dev_type == TYPE_XBOX360W)
+ {
+ if (host->interruptWrite(dev, int_out, odata, 4) != USB_TYPE_OK) {
+ return false;
+ }
}
}
return true;
