mirror of
https://github.com/whowechina/iidx_pico.git
synced 2024-11-14 10:17:40 +01:00
Fix string issue in USB desc
This commit is contained in:
parent
1d7b76654e
commit
671bb98cb2
Binary file not shown.
@ -1,4 +1,4 @@
|
|||||||
# Pico IIDX - Beatmania IIDX controller
|
# IIDX Pico - Beatmania IIDX controller
|
||||||
|
|
||||||
<img src="doc/main.jpg" width="80%">
|
<img src="doc/main.jpg" width="80%">
|
||||||
<img src="doc/stacked.jpg" width="80%">
|
<img src="doc/stacked.jpg" width="80%">
|
||||||
|
@ -130,8 +130,9 @@ uint8_t const* tud_descriptor_configuration_cb(uint8_t index) {
|
|||||||
const char *string_desc_arr[] = {
|
const char *string_desc_arr[] = {
|
||||||
(const char[]){0x09, 0x04}, // 0: is supported language is English (0x0409)
|
(const char[]){0x09, 0x04}, // 0: is supported language is English (0x0409)
|
||||||
"WHowe" , // 1: Manufacturer
|
"WHowe" , // 1: Manufacturer
|
||||||
"Pico IIDX Controller", // 2: Product
|
"IIDX Pico Controller", // 2: Product
|
||||||
"654321", // 3: Serials, should use chip ID
|
"654321", // 3: Serials, should use chip ID
|
||||||
|
"IIDX Pico CLI Port",
|
||||||
"Button 1",
|
"Button 1",
|
||||||
"Button 2",
|
"Button 2",
|
||||||
"Button 3",
|
"Button 3",
|
||||||
|
@ -9,13 +9,8 @@ enum {
|
|||||||
REPORT_ID_LIGHTS,
|
REPORT_ID_LIGHTS,
|
||||||
};
|
};
|
||||||
|
|
||||||
// because they are missing from tusb_hid.h
|
|
||||||
#define HID_STRING_INDEX(x) HID_REPORT_ITEM(x, 7, RI_TYPE_LOCAL, 1)
|
|
||||||
#define HID_STRING_INDEX_N(x, n) HID_REPORT_ITEM(x, 7, RI_TYPE_LOCAL, n)
|
|
||||||
#define HID_STRING_MINIMUM(x) HID_REPORT_ITEM(x, 8, RI_TYPE_LOCAL, 1)
|
#define HID_STRING_MINIMUM(x) HID_REPORT_ITEM(x, 8, RI_TYPE_LOCAL, 1)
|
||||||
#define HID_STRING_MINIMUM_N(x, n) HID_REPORT_ITEM(x, 8, RI_TYPE_LOCAL, n)
|
|
||||||
#define HID_STRING_MAXIMUM(x) HID_REPORT_ITEM(x, 9, RI_TYPE_LOCAL, 1)
|
#define HID_STRING_MAXIMUM(x) HID_REPORT_ITEM(x, 9, RI_TYPE_LOCAL, 1)
|
||||||
#define HID_STRING_MAXIMUM_N(x, n) HID_REPORT_ITEM(x, 9, RI_TYPE_LOCAL, n)
|
|
||||||
|
|
||||||
// Joystick Report Descriptor Template - Based off Drewol/rp2040-gamecon
|
// Joystick Report Descriptor Template - Based off Drewol/rp2040-gamecon
|
||||||
// Button Map | X | Y
|
// Button Map | X | Y
|
||||||
@ -41,8 +36,9 @@ enum {
|
|||||||
HID_COLLECTION(HID_COLLECTION_APPLICATION), \
|
HID_COLLECTION(HID_COLLECTION_APPLICATION), \
|
||||||
__VA_ARGS__ HID_REPORT_COUNT(11), /* LED NUM */ \
|
__VA_ARGS__ HID_REPORT_COUNT(11), /* LED NUM */ \
|
||||||
HID_REPORT_SIZE(8), HID_LOGICAL_MIN(0x00), HID_LOGICAL_MAX_N(0x00ff, 2), \
|
HID_REPORT_SIZE(8), HID_LOGICAL_MIN(0x00), HID_LOGICAL_MAX_N(0x00ff, 2), \
|
||||||
HID_USAGE_PAGE(HID_USAGE_PAGE_ORDINAL), HID_STRING_MINIMUM(4), \
|
HID_USAGE_PAGE(HID_USAGE_PAGE_ORDINAL), \
|
||||||
HID_STRING_MAXIMUM(16), HID_USAGE_MIN(1), HID_USAGE_MAX(16), \
|
HID_STRING_MINIMUM(5), HID_STRING_MAXIMUM(17), \
|
||||||
|
HID_USAGE_MIN(1), HID_USAGE_MAX(16), \
|
||||||
HID_OUTPUT(HID_DATA | HID_VARIABLE | HID_ABSOLUTE), HID_REPORT_COUNT(1), \
|
HID_OUTPUT(HID_DATA | HID_VARIABLE | HID_ABSOLUTE), HID_REPORT_COUNT(1), \
|
||||||
HID_REPORT_SIZE(8), /*Padding*/ \
|
HID_REPORT_SIZE(8), /*Padding*/ \
|
||||||
HID_INPUT(HID_CONSTANT | HID_VARIABLE | HID_ABSOLUTE), \
|
HID_INPUT(HID_CONSTANT | HID_VARIABLE | HID_ABSOLUTE), \
|
||||||
|
Loading…
Reference in New Issue
Block a user