diff options
author | innovaker <66737976+innovaker@users.noreply.github.com> | 2020-11-21 20:09:21 +0000 |
---|---|---|
committer | Pete Johanson <peter@peterjohanson.com> | 2020-11-21 15:52:16 -0500 |
commit | 3ac1a11a370d262e54538f0e10d947303cf77afa (patch) | |
tree | d698e9fbdd916c65a28cd8858a8ff063c813f4de /app/src/endpoints.c | |
parent | 3ebd192411c347ad0bf4859a63206efb6b730c29 (diff) |
refactor: change `keypad` to `keyboard`
The application usage used by report 1 is `HID_USAGE_GD_KEYBOARD`. Moreover, the `keys` usage page (0x07) that primarily feeds into this report is predominantly keyboard codes. The rest of the system should align with this naming convention.
Diffstat (limited to 'app/src/endpoints.c')
-rw-r--r-- | app/src/endpoints.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/src/endpoints.c b/app/src/endpoints.c index 9a6967c..406d23b 100644 --- a/app/src/endpoints.c +++ b/app/src/endpoints.c @@ -53,13 +53,13 @@ int zmk_endpoints_toggle() { return zmk_endpoints_select(new_endpoint); } -static int send_keypad_report() { - struct zmk_hid_keypad_report *keypad_report = zmk_hid_get_keypad_report(); +static int send_keyboard_report() { + struct zmk_hid_keyboard_report *keyboard_report = zmk_hid_get_keyboard_report(); switch (current_endpoint) { #if IS_ENABLED(CONFIG_ZMK_USB) case ZMK_ENDPOINT_USB: { - int err = zmk_usb_hid_send_report((u8_t *)keypad_report, sizeof(*keypad_report)); + int err = zmk_usb_hid_send_report((u8_t *)keyboard_report, sizeof(*keyboard_report)); if (err) { LOG_ERR("FAILED TO SEND OVER USB: %d", err); } @@ -69,7 +69,7 @@ static int send_keypad_report() { #if IS_ENABLED(CONFIG_ZMK_BLE) case ZMK_ENDPOINT_BLE: { - int err = zmk_hog_send_keypad_report(&keypad_report->body); + int err = zmk_hog_send_keyboard_report(&keyboard_report->body); if (err) { LOG_ERR("FAILED TO SEND OVER HOG: %d", err); } @@ -118,7 +118,7 @@ int zmk_endpoints_send_report(u8_t usage_page) { LOG_DBG("usage page 0x%02X", usage_page); switch (usage_page) { case HID_USAGE_KEY: - return send_keypad_report(); + return send_keyboard_report(); case HID_USAGE_CONSUMER: return send_consumer_report(); default: @@ -207,7 +207,7 @@ static enum zmk_endpoint get_selected_endpoint() { } static void disconnect_current_endpoint() { - zmk_hid_keypad_clear(); + zmk_hid_keyboard_clear(); zmk_hid_consumer_clear(); zmk_endpoints_send_report(HID_USAGE_KEY); |