summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp26
1 files changed, 25 insertions, 1 deletions
diff --git a/main.cpp b/main.cpp
index 2e05399..680d71b 100644
--- a/main.cpp
+++ b/main.cpp
@@ -16,8 +16,31 @@ void reset_bootloader() {
SCB.AIRCR = (0x5fa << 16) | (1 << 2); // SYSRESETREQ
}
-auto report_desc = gamepad(
+auto report_desc = keyboard(
// Inputs.
+ usage_page(UsagePage::Keyboard),
+ usage('z' - 'a' + 4),
+ usage('s' - 'a' + 4),
+ usage('x' - 'a' + 4),
+ usage('d' - 'a' + 4),
+ usage('c' - 'a' + 4),
+ usage('f' - 'a' + 4),
+ usage('v' - 'a' + 4),
+ usage('g' - 'a' + 4),
+ usage('b' - 'a' + 4),
+ usage(0x28),
+ usage(0x2a),
+ usage(0xe0),
+ usage(0xe1),
+ logical_minimum(0),
+ logical_maximum(1),
+ report_count(13),
+ report_size(1),
+ input(0x02),
+
+ padding_in(3 + 8 + 8),
+
+ /*
buttons(15),
padding_in(1),
@@ -36,6 +59,7 @@ auto report_desc = gamepad(
report_count(1),
report_size(8),
input(0x02),
+ */
// Outputs.
usage_page(UsagePage::Ordinal),