diff options
author | innovaker <66737976+innovaker@users.noreply.github.com> | 2020-11-21 20:58:53 +0000 |
---|---|---|
committer | Pete Johanson <peter@peterjohanson.com> | 2020-11-22 10:04:35 -0500 |
commit | ae924b359462a4d2e03bbe19f33cefe9bd53ba0d (patch) | |
tree | 0aebc636eeeecbcd29b5adc9e39ce962d45359f1 | |
parent | 2f1170c01a869ea5baa07e217cb74be0a6e54e9f (diff) |
refactor(hid): replace `kp_report` with `keyboard_report`
Aligns with other existing conventions.
-rw-r--r-- | app/src/hid.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/app/src/hid.c b/app/src/hid.c index da2aaab..2d6e6f2 100644 --- a/app/src/hid.c +++ b/app/src/hid.c @@ -10,7 +10,7 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include <zmk/hid.h> #include <dt-bindings/zmk/modifiers.h> -static struct zmk_hid_keyboard_report kp_report = { +static struct zmk_hid_keyboard_report keyboard_report = { .report_id = 1, .body = {.modifiers = 0, ._reserved = 0, .keys = {0}}}; static struct zmk_hid_consumer_report consumer_report = {.report_id = 2, .body = {.keys = {0}}}; @@ -22,8 +22,8 @@ static zmk_mod_flags explicit_modifiers = 0; #define SET_MODIFIERS(mods) \ { \ - kp_report.body.modifiers = mods; \ - LOG_DBG("Modifiers set to 0x%02X", kp_report.body.modifiers); \ + keyboard_report.body.modifiers = mods; \ + LOG_DBG("Modifiers set to 0x%02X", keyboard_report.body.modifiers); \ } int zmk_hid_register_mod(zmk_mod modifier) { @@ -51,10 +51,10 @@ int zmk_hid_unregister_mod(zmk_mod modifier) { #define TOGGLE_KEYBOARD(match, val) \ for (int idx = 0; idx < ZMK_HID_KEYBOARD_NKRO_SIZE; idx++) { \ - if (kp_report.body.keys[idx] != match) { \ + if (keyboard_report.body.keys[idx] != match) { \ continue; \ } \ - kp_report.body.keys[idx] = val; \ + keyboard_report.body.keys[idx] = val; \ break; \ } @@ -93,7 +93,7 @@ int zmk_hid_keyboard_release(zmk_key code) { return 0; }; -void zmk_hid_keyboard_clear() { memset(&kp_report.body, 0, sizeof(kp_report.body)); } +void zmk_hid_keyboard_clear() { memset(&keyboard_report.body, 0, sizeof(keyboard_report.body)); } int zmk_hid_consumer_press(zmk_key code) { TOGGLE_CONSUMER(0U, code); @@ -108,7 +108,7 @@ int zmk_hid_consumer_release(zmk_key code) { void zmk_hid_consumer_clear() { memset(&consumer_report.body, 0, sizeof(consumer_report.body)); } struct zmk_hid_keyboard_report *zmk_hid_get_keyboard_report() { - return &kp_report; + return &keyboard_report; } struct zmk_hid_consumer_report *zmk_hid_get_consumer_report() { |