diff --git a/README.md b/README.md index 8e27c9f..2b0e1a6 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Currently working/fixed: - Gamepad mode - default boot mode - Keyboard & Mouse Mode - limited to 6KRO - hold btn-a to enter kb mode - HID LEDs with Reactive LED fallback -- sdvx/iidx spoof - untested on EAC +- sdvx/iidx spoof - Tested on EAC - 1000hz polling - Reversable Encoders - Switch and LED pins are now staggered for easier wiring diff --git a/build_uf2/Pico_Game_Controller.uf2 b/build_uf2/Pico_Game_Controller.uf2 index 5d0beaa..f9cabf9 100644 Binary files a/build_uf2/Pico_Game_Controller.uf2 and b/build_uf2/Pico_Game_Controller.uf2 differ diff --git a/src/pico_game_controller.c b/src/pico_game_controller.c index 16b9600..ea34c4d 100644 --- a/src/pico_game_controller.c +++ b/src/pico_game_controller.c @@ -145,7 +145,7 @@ void joy_mode() { } if (send_report) { - tud_hid_n_report(0x00, REPORT_ID_GAMEPAD, &report, sizeof(report)); + tud_hid_n_report(0x00, REPORT_ID_JOYSTICK, &report, sizeof(report)); } } } diff --git a/src/usb_descriptors.c b/src/usb_descriptors.c index 76554b5..708b533 100644 --- a/src/usb_descriptors.c +++ b/src/usb_descriptors.c @@ -74,7 +74,7 @@ uint8_t const* tud_descriptor_device_cb(void) { //--------------------------------------------------------------------+ uint8_t const desc_hid_report[] = { - GAMECON_REPORT_DESC_GAMEPAD(HID_REPORT_ID(REPORT_ID_GAMEPAD)), + GAMECON_REPORT_DESC_JOYSTICK(HID_REPORT_ID(REPORT_ID_JOYSTICK)), GAMECON_REPORT_DESC_LIGHTS(HID_REPORT_ID(REPORT_ID_LIGHTS)), TUD_HID_REPORT_DESC_KEYBOARD(HID_REPORT_ID(REPORT_ID_KEYBOARD)), TUD_HID_REPORT_DESC_MOUSE(HID_REPORT_ID(REPORT_ID_MOUSE))}; diff --git a/src/usb_descriptors.h b/src/usb_descriptors.h index b3f8762..c09dfba 100644 --- a/src/usb_descriptors.h +++ b/src/usb_descriptors.h @@ -5,7 +5,7 @@ #define USB_DESCRIPTORS_H_ enum { - REPORT_ID_GAMEPAD = 1, + REPORT_ID_JOYSTICK = 1, REPORT_ID_LIGHTS, REPORT_ID_KEYBOARD, REPORT_ID_MOUSE, @@ -13,11 +13,11 @@ enum { #endif /* USB_DESCRIPTORS_H_ */ -// Gamepad Report Descriptor Template - Based off Drewol/rp2040-gamecon +// Joystick Report Descriptor Template - Based off Drewol/rp2040-gamecon // 11 Button Map | X | Y -#define GAMECON_REPORT_DESC_GAMEPAD(...) \ +#define GAMECON_REPORT_DESC_JOYSTICK(...) \ HID_USAGE_PAGE(HID_USAGE_PAGE_DESKTOP), \ - HID_USAGE(HID_USAGE_DESKTOP_GAMEPAD), \ + HID_USAGE(HID_USAGE_DESKTOP_JOYSTICK), \ HID_COLLECTION(HID_COLLECTION_APPLICATION), \ __VA_ARGS__ HID_USAGE_PAGE(HID_USAGE_PAGE_BUTTON), HID_USAGE_MIN(1), \ HID_USAGE_MAX(11), /*11 buttons*/ \