aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/src/endpoints.c
diff options
context:
space:
mode:
authorinnovaker <[email protected]>2020-11-03 16:54:16 +0000
committerPete Johanson <[email protected]>2020-11-03 23:50:54 -0500
commite925319e4ce14b8aaf3515d3f2bea8b9eb287e89 (patch)
tree9d9061928629033e1e6c366b03778b9f6a595e10 /app/src/endpoints.c
parent3c0a0ff3087d7c3d522d610227c6fedcec8f27a7 (diff)
downloadzmk-e925319e4ce14b8aaf3515d3f2bea8b9eb287e89.tar.gz
zmk-e925319e4ce14b8aaf3515d3f2bea8b9eb287e89.zip
refactor(hid): Replace deprecated HID usage page references
Deprecate `USAGE_KEYPAD` and replace with `HID_USAGE_KEY`. Deprecate `USAGE_CONSUMER` and replace with `HID_USAGE_CONSUMER`. Closes #217.
Diffstat (limited to 'app/src/endpoints.c')
-rw-r--r--app/src/endpoints.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/src/endpoints.c b/app/src/endpoints.c
index 0c7958907c..9a6967c630 100644
--- a/app/src/endpoints.c
+++ b/app/src/endpoints.c
@@ -10,6 +10,7 @@
#include <zmk/ble.h>
#include <zmk/endpoints.h>
#include <zmk/hid.h>
+#include <dt-bindings/zmk/hid_usage_pages.h>
#include <zmk/usb.h>
#include <zmk/hog.h>
#include <zmk/event-manager.h>
@@ -116,9 +117,9 @@ int zmk_endpoints_send_report(u8_t usage_page) {
LOG_DBG("usage page 0x%02X", usage_page);
switch (usage_page) {
- case USAGE_KEYPAD:
+ case HID_USAGE_KEY:
return send_keypad_report();
- case USAGE_CONSUMER:
+ case HID_USAGE_CONSUMER:
return send_consumer_report();
default:
LOG_ERR("Unsupported usage page %d", usage_page);
@@ -209,8 +210,8 @@ static void disconnect_current_endpoint() {
zmk_hid_keypad_clear();
zmk_hid_consumer_clear();
- zmk_endpoints_send_report(USAGE_KEYPAD);
- zmk_endpoints_send_report(USAGE_CONSUMER);
+ zmk_endpoints_send_report(HID_USAGE_KEY);
+ zmk_endpoints_send_report(HID_USAGE_CONSUMER);
}
static void update_current_endpoint() {