BRichter99 / Xbox360-Controller-with-BLE

ESP32 project for reanimating a dead Xbox360 Controller
GNU General Public License v3.0
15 stars 1 forks source link

increase the number #1

Open Yangzepeng5382 opened 1 month ago

Yangzepeng5382 commented 1 month ago

I wanted to increase the number of keys in this project to 16 but ran into some problems, I directly modified the code in hid but nothing worked

static const uint8_t _hidReportDescriptor[] = { USAGE_PAGE(1), 0x01, // USAGE_PAGE (Generic Desktop) USAGE(1), 0x05, // USAGE (Gamepad) COLLECTION(1), 0x01, // COLLECTION (Application) USAGE(1), 0x01, // USAGE (Pointer) COLLECTION(1), 0x00, // COLLECTION (Physical) REPORT_ID(1), 0x01, // REPORT_ID (1) // ------------------------------------------------- Buttons (1 to 14) USAGE_PAGE(1), 0x09, // USAGE_PAGE (Button) USAGE_MINIMUM(1), 0x01, // USAGE_MINIMUM (Button 1) USAGE_MAXIMUM(1), 0x10, // USAGE_MAXIMUM (Button 14) LOGICAL_MINIMUM(1), 0x00, // LOGICAL_MINIMUM (0) LOGICAL_MAXIMUM(1), 0x01, // LOGICAL_MAXIMUM (1) REPORT_SIZE(1), 0x01, // REPORT_SIZE (1) REPORT_COUNT(1), 0x10, // REPORT_COUNT (14) HIDINPUT(1), 0x02, // INPUT (Data, Variable, Absolute) ;14 button bits

Yangzepeng5382 commented 1 month ago

MJG UCXAB(AXH$)HE}02}O0 My God, my windows has 14 buttons on the left and 16 buttons on the right, but there are 16 buttons that can be used