Added a new setting to remember the user's preferred endpoint. When both USB and BLE are connected, the preferred endpoint will be used. Added a new behavior to control this setting. It supports commands: &end END_USB - Prefer USB output &end END_BLE - Prefer BLE output &end END_TOG - Toggle between USB and BLE
20 lines
345 B
C
20 lines
345 B
C
/*
|
|
* Copyright (c) 2020 The ZMK Contributors
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <zmk/keys.h>
|
|
#include <zmk/hid.h>
|
|
|
|
enum zmk_endpoint {
|
|
ZMK_ENDPOINT_USB,
|
|
ZMK_ENDPOINT_BLE,
|
|
};
|
|
|
|
int zmk_endpoints_select(enum zmk_endpoint endpoint);
|
|
int zmk_endpoints_toggle();
|
|
|
|
int zmk_endpoints_send_report(u8_t usage_report);
|