feat: Split physical layout selection sync.

* Ensure the split peripherals have the same selected physical
  layout on connection and change.
This commit is contained in:
Peter Johanson
2024-07-31 11:54:15 -06:00
committed by Pete Johanson
parent 3975d2fdaf
commit 03b5b38bc4
5 changed files with 116 additions and 3 deletions

View File

@@ -8,6 +8,13 @@
#include <zephyr/kernel.h>
#include <zmk/matrix_transform.h>
#include <zmk/event_manager.h>
struct zmk_physical_layout_selection_changed {
uint8_t selection;
};
ZMK_EVENT_DECLARE(zmk_physical_layout_selection_changed);
struct zmk_key_physical_attrs {
int16_t width;

View File

@@ -18,3 +18,4 @@
#define ZMK_SPLIT_BT_CHAR_RUN_BEHAVIOR_UUID ZMK_BT_SPLIT_UUID(0x00000002)
#define ZMK_SPLIT_BT_CHAR_SENSOR_STATE_UUID ZMK_BT_SPLIT_UUID(0x00000003)
#define ZMK_SPLIT_BT_UPDATE_HID_INDICATORS_UUID ZMK_BT_SPLIT_UUID(0x00000004)
#define ZMK_SPLIT_BT_SELECT_PHYS_LAYOUT_UUID ZMK_BT_SPLIT_UUID(0x00000005)