From 7a08559deb565bb25fc42aad3ea07d0526995e3e Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Thu, 14 Apr 2016 18:38:00 +0200 Subject: Replace gamepad report with keyboard report. --- main.cpp | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'main.cpp') 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), -- cgit v1.2.3