Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XInput #2

Merged
merged 18 commits into from
Mar 7, 2019
Merged

XInput #2

merged 18 commits into from
Mar 7, 2019

Conversation

dmadison
Copy link
Owner

@dmadison dmadison commented Mar 7, 2019

Modifies the core files to change the USB mode to XInput, emulating an Xbox 360 wired gamepad. This includes:

  • Device and config descriptors
  • String descriptors
  • VID and PID identifiers (all boards)
  • Endpoint memory allocation
  • Public XInputUSB API

Reworking the USB mode requires the following associated changes to the Arduino files:

  • Removes CDC USB
  • Replaces Serial_ class with dummy. Sketches using the Serial object will compile but will not output serial data over USB.
  • Disables PluggableUSB support

This seems to work perfectly with my testing on Windows 10 x64. I don't have a Mac or Linux PC setup to test with, but I'm hoping the endpoint renumbering (5b5ddcf) doesn't cause any issues.

Distinguish at a glance from the 'normal' boards in the IDE
Can't be used since PluggableHID and XInput are mutually exclusive
Not compatible with XInput, which requires a static descriptor
Unused if pluggable USB is not enabled. Should submit a PR to fix this in the main repo...
Allows sketches using Serial to compile but discards all data
This will compile but will NOT enumerate properly without a config descriptor. You've been warned...
Easier for the AVR to deal with the memory if the in/out numbers aren't paired.
Better to set these where intended so they can be easily overridden if need be.
Using the OUT endpoint interrupt
No reason not to take advantage of this feature, although with the interrupt in place I doubt it will be useful.
Returns true if the device USB is configured. Although will still return true if the device has been configured and the USB data pins disconnected...
@dmadison dmadison merged commit 14f191e into master Mar 7, 2019
@dmadison dmadison deleted the xinput branch March 7, 2019 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant