cherry-embedded / CherryUSB

CherryUSB is a tiny, beautiful and portable USB host and device stack for embedded system with USB IP
https://cherryusb.readthedocs.io/
Apache License 2.0
1.21k stars 256 forks source link

Add host driver for XBOX controllers #224

Closed harbaum closed 1 month ago

harbaum commented 1 month ago

This adds support for the XBOX wired and wireless controllers to the usb host.

sakumisu commented 1 month ago

Thank you! And how to use xbox api. do you have any example?

harbaum commented 1 month ago

The FPGA-Companion uses it to use XBOX controllers with the retro FPGA setups:

https://github.com/harbaum/FPGA-Companion/blob/main/src/bl616/mcu_hw.c

harbaum commented 1 month ago

It bascically works like HID. But the report format is fixed and doesn't require any report descriptor parsers. The report size is always 20 bytes and is parsed as e.g. explained in section Controller to Xbox of https://xboxdevwiki.net/Xbox_Input_Devices#Controller_to_Xbox_3

sakumisu commented 1 month ago

Thank you, i have the xbox and i will study your code to work with it.