mirror of
https://github.com/zmkfirmware/zmk.git
synced 2026-03-20 04:55:20 -05:00
feat(endpoints): Add endpoint select changed event.
This commit is contained in:
committed by
Pete Johanson
parent
9d34cf561e
commit
d05d7ec2d2
@@ -6,13 +6,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <zmk/keys.h>
|
||||
#include <zmk/hid.h>
|
||||
|
||||
enum zmk_endpoint {
|
||||
ZMK_ENDPOINT_USB,
|
||||
ZMK_ENDPOINT_BLE,
|
||||
};
|
||||
#include <zmk/endpoints_types.h>
|
||||
|
||||
int zmk_endpoints_select(enum zmk_endpoint endpoint);
|
||||
int zmk_endpoints_toggle();
|
||||
|
||||
12
app/include/zmk/endpoints_types.h
Normal file
12
app/include/zmk/endpoints_types.h
Normal file
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
* Copyright (c) 2021 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
enum zmk_endpoint {
|
||||
ZMK_ENDPOINT_USB,
|
||||
ZMK_ENDPOINT_BLE,
|
||||
};
|
||||
18
app/include/zmk/events/endpoint_selection_changed.h
Normal file
18
app/include/zmk/events/endpoint_selection_changed.h
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <zephyr.h>
|
||||
|
||||
#include <zmk/endpoints_types.h>
|
||||
#include <zmk/event_manager.h>
|
||||
|
||||
struct zmk_endpoint_selection_changed {
|
||||
enum zmk_endpoint endpoint;
|
||||
};
|
||||
|
||||
ZMK_EVENT_DECLARE(zmk_endpoint_selection_changed);
|
||||
Reference in New Issue
Block a user