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. --- laks | 2 +- main.cpp | 26 +++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/laks b/laks index 043e8eb..29d8f1b 160000 --- a/laks +++ b/laks @@ -1 +1 @@ -Subproject commit 043e8eb4929ca2078bba9aab3ca763beb429f237 +Subproject commit 29d8f1b4e89f31e2f3b448c4d40c6c2518629686 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