aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/src/endpoints.c
diff options
context:
space:
mode:
authorPeter Johanson <[email protected]>2021-08-02 21:44:01 -0400
committerPete Johanson <[email protected]>2021-08-03 00:19:05 -0400
commitd05d7ec2d2b40ca40339b4d7cceb31974bac0e94 (patch)
tree37e3f90b46e3e5c01146f1d9c505b7e05d1d5e95 /app/src/endpoints.c
parent9d34cf561e11682840e10283f0a6947547a649b5 (diff)
downloadzmk-d05d7ec2d2b40ca40339b4d7cceb31974bac0e94.tar.gz
zmk-d05d7ec2d2b40ca40339b4d7cceb31974bac0e94.zip
feat(endpoints): Add endpoint select changed event.
Diffstat (limited to 'app/src/endpoints.c')
-rw-r--r--app/src/endpoints.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/src/endpoints.c b/app/src/endpoints.c
index 93dfb81768..c15aad87ac 100644
--- a/app/src/endpoints.c
+++ b/app/src/endpoints.c
@@ -16,6 +16,7 @@
#include <zmk/event_manager.h>
#include <zmk/events/ble_active_profile_changed.h>
#include <zmk/events/usb_conn_state_changed.h>
+#include <zmk/events/endpoint_selection_changed.h>
#include <logging/log.h>
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
@@ -242,6 +243,9 @@ static void update_current_endpoint() {
current_endpoint = new_endpoint;
LOG_INF("Endpoint changed: %d", current_endpoint);
+
+ ZMK_EVENT_RAISE(new_zmk_endpoint_selection_changed(
+ (struct zmk_endpoint_selection_changed){.endpoint = current_endpoint}));
}
}