Adds Glove80's status indicator using RGB underglow support. Requires ZMK PR#999 and PR#1243. The underglow status is able to show layer state, battery levels, caps/num/scroll-lock, BLE and USB state. The underglow positions selected for each of these indicators is configured using the new devicetree node zmk,underglow-indicators, which takes an array of integer LED positions for each feature.
41 lines
1.2 KiB
C
41 lines
1.2 KiB
C
/*
|
|
* Copyright (c) 2020 The ZMK Contributors
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <zmk/keys.h>
|
|
#include <zmk/ble/profile.h>
|
|
|
|
#define ZMK_BLE_IS_CENTRAL \
|
|
(IS_ENABLED(CONFIG_ZMK_SPLIT) && IS_ENABLED(CONFIG_ZMK_BLE) && \
|
|
IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL))
|
|
|
|
#if ZMK_BLE_IS_CENTRAL
|
|
#define ZMK_BLE_PROFILE_COUNT (CONFIG_BT_MAX_PAIRED - 1)
|
|
#define ZMK_BLE_SPLIT_PERIPHERAL_COUNT 1
|
|
#else
|
|
#define ZMK_BLE_PROFILE_COUNT CONFIG_BT_MAX_PAIRED
|
|
#endif
|
|
|
|
int zmk_ble_clear_bonds();
|
|
int zmk_ble_prof_next();
|
|
int zmk_ble_prof_prev();
|
|
int zmk_ble_prof_select(uint8_t index);
|
|
int zmk_ble_clear_all_bonds();
|
|
|
|
int zmk_ble_active_profile_index();
|
|
int zmk_ble_profile_index(const bt_addr_le_t *addr);
|
|
bt_addr_le_t *zmk_ble_active_profile_addr();
|
|
bool zmk_ble_active_profile_is_open();
|
|
bool zmk_ble_active_profile_is_connected();
|
|
char *zmk_ble_active_profile_name();
|
|
int8_t zmk_ble_profile_status(uint8_t index);
|
|
|
|
int zmk_ble_unpair_all();
|
|
|
|
#if IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
|
|
void zmk_ble_set_peripheral_addr(bt_addr_le_t *addr);
|
|
#endif /* IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) */
|