From 9d4422980088fb6d2130ac9a3119809984762267 Mon Sep 17 00:00:00 2001 From: Stephen Wan Date: Mon, 15 Mar 2021 12:26:18 -0700 Subject: [PATCH 01/26] feature(split): add support for sensors from peripheral This commit adds a new GATT characteristics on the peripheral side and wires it up to read sensor values. The central side subscribes to this new characteristics and replays sensor values on its side. Co-authored-by: Peter Johanson --- app/include/zmk/sensors.h | 6 +- app/include/zmk/split/bluetooth/service.h | 15 +++- app/include/zmk/split/bluetooth/uuid.h | 1 + app/src/sensors.c | 6 +- app/src/split/bluetooth/central.c | 92 +++++++++++++++++++---- app/src/split/bluetooth/service.c | 78 ++++++++++++++++++- app/src/split/bluetooth/split_listener.c | 26 +++++-- 7 files changed, 196 insertions(+), 28 deletions(-) diff --git a/app/include/zmk/sensors.h b/app/include/zmk/sensors.h index 8ac1c283cb6..1919d4ce647 100644 --- a/app/include/zmk/sensors.h +++ b/app/include/zmk/sensors.h @@ -24,7 +24,9 @@ struct zmk_sensor_config { uint16_t triggers_per_rotation; }; +// This struct is also used for data transfer for splits, so any changes to the size, layout, etc +// is a breaking change for the split GATT service protocol. struct zmk_sensor_channel_data { - enum sensor_channel channel; struct sensor_value value; -}; + enum sensor_channel channel; +} __packed; diff --git a/app/include/zmk/split/bluetooth/service.h b/app/include/zmk/split/bluetooth/service.h index f0c1d79ff7d..112cd552942 100644 --- a/app/include/zmk/split/bluetooth/service.h +++ b/app/include/zmk/split/bluetooth/service.h @@ -6,8 +6,18 @@ #pragma once +#include +#include + #define ZMK_SPLIT_RUN_BEHAVIOR_DEV_LEN 9 +struct sensor_event { + uint8_t sensor_index; + + uint8_t channel_data_size; + struct zmk_sensor_channel_data channel_data[ZMK_SENSOR_EVENT_MAX_CHANNELS]; +} __packed; + struct zmk_split_run_behavior_data { uint8_t position; uint8_t state; @@ -21,4 +31,7 @@ struct zmk_split_run_behavior_payload { } __packed; int zmk_split_bt_position_pressed(uint8_t position); -int zmk_split_bt_position_released(uint8_t position); \ No newline at end of file +int zmk_split_bt_position_released(uint8_t position); +int zmk_split_bt_sensor_triggered(uint8_t sensor_index, + const struct zmk_sensor_channel_data channel_data[], + size_t channel_data_size); diff --git a/app/include/zmk/split/bluetooth/uuid.h b/app/include/zmk/split/bluetooth/uuid.h index cbdb17723cd..c38131dd83e 100644 --- a/app/include/zmk/split/bluetooth/uuid.h +++ b/app/include/zmk/split/bluetooth/uuid.h @@ -16,3 +16,4 @@ #define ZMK_SPLIT_BT_SERVICE_UUID ZMK_BT_SPLIT_UUID(0x00000000) #define ZMK_SPLIT_BT_CHAR_POSITION_STATE_UUID ZMK_BT_SPLIT_UUID(0x00000001) #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) diff --git a/app/src/sensors.c b/app/src/sensors.c index e339afe0437..60f2bd2a33f 100644 --- a/app/src/sensors.c +++ b/app/src/sensors.c @@ -29,7 +29,7 @@ struct sensors_item_cfg { { \ .dev = DEVICE_DT_GET_OR_NULL(node), \ .trigger = {.type = SENSOR_TRIG_DATA_READY, .chan = SENSOR_CHAN_ROTATION}, \ - .config = &configs[idx] \ + .config = &configs[idx], .sensor_index = idx \ } #define SENSOR_ITEM(idx, _i) _SENSOR_ITEM(idx, ZMK_KEYMAP_SENSORS_BY_IDX(idx)) @@ -112,7 +112,7 @@ static void zmk_sensors_trigger_handler(const struct device *dev, int sensor_index = test_item - sensors; if (sensor_index < 0 || sensor_index >= ARRAY_SIZE(sensors)) { - LOG_ERR("Invalid sensor item triggered our callback"); + LOG_ERR("Invalid sensor item triggered our callback (%d)", sensor_index); return; } @@ -127,8 +127,6 @@ static void zmk_sensors_trigger_handler(const struct device *dev, static void zmk_sensors_init_item(uint8_t i) { LOG_DBG("Init sensor at index %d", i); - sensors[i].sensor_index = i; - if (!sensors[i].dev) { LOG_DBG("No local device for %d", i); return; diff --git a/app/src/split/bluetooth/central.c b/app/src/split/bluetooth/central.c index 8a5e9d35c5a..b70d79e3a3a 100644 --- a/app/src/split/bluetooth/central.c +++ b/app/src/split/bluetooth/central.c @@ -21,10 +21,12 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include #include +#include #include #include #include #include +#include static int start_scanning(void); @@ -41,6 +43,7 @@ struct peripheral_slot { struct bt_conn *conn; struct bt_gatt_discover_params discover_params; struct bt_gatt_subscribe_params subscribe_params; + struct bt_gatt_subscribe_params sensor_subscribe_params; struct bt_gatt_discover_params sub_discover_params; uint16_t run_behavior_handle; uint8_t position_state[POSITION_STATE_DATA_LEN]; @@ -165,6 +168,52 @@ int confirm_peripheral_slot_conn(struct bt_conn *conn) { return 0; } +#if ZMK_KEYMAP_HAS_SENSORS +K_MSGQ_DEFINE(peripheral_sensor_event_msgq, sizeof(struct zmk_sensor_event), + CONFIG_ZMK_SPLIT_BLE_CENTRAL_POSITION_QUEUE_SIZE, 4); + +void peripheral_sensor_event_work_callback(struct k_work *work) { + struct zmk_sensor_event ev; + while (k_msgq_get(&peripheral_sensor_event_msgq, &ev, K_NO_WAIT) == 0) { + LOG_DBG("Trigger sensor change for %d", ev.sensor_index); + ZMK_EVENT_RAISE(new_zmk_sensor_event(ev)); + } +} + +K_WORK_DEFINE(peripheral_sensor_event_work, peripheral_sensor_event_work_callback); + +static uint8_t split_central_sensor_notify_func(struct bt_conn *conn, + struct bt_gatt_subscribe_params *params, + const void *data, uint16_t length) { + if (!data) { + LOG_DBG("[UNSUBSCRIBED]"); + params->value_handle = 0U; + return BT_GATT_ITER_STOP; + } + + LOG_DBG("[SENSOR NOTIFICATION] data %p length %u", data, length); + + if (length < offsetof(struct sensor_event, channel_data)) { + LOG_WRN("Ignoring sensor notify with insufficient data length (%d)", length); + return BT_GATT_ITER_STOP; + } + + struct sensor_event sensor_event; + memcpy(&sensor_event, data, MIN(length, sizeof(sensor_event))); + struct zmk_sensor_event ev = { + .sensor_index = sensor_event.sensor_index, + .channel_data_size = MIN(sensor_event.channel_data_size, ZMK_SENSOR_EVENT_MAX_CHANNELS), + .timestamp = k_uptime_get()}; + + memcpy(ev.channel_data, sensor_event.channel_data, + sizeof(struct zmk_sensor_channel_data) * sensor_event.channel_data_size); + k_msgq_put(&peripheral_sensor_event_msgq, &ev, K_NO_WAIT); + k_work_submit(&peripheral_sensor_event_work); + + return BT_GATT_ITER_CONTINUE; +} +#endif /* ZMK_KEYMAP_HAS_SENSORS */ + static uint8_t split_central_notify_func(struct bt_conn *conn, struct bt_gatt_subscribe_params *params, const void *data, uint16_t length) { @@ -209,14 +258,8 @@ static uint8_t split_central_notify_func(struct bt_conn *conn, return BT_GATT_ITER_CONTINUE; } -static void split_central_subscribe(struct bt_conn *conn) { - struct peripheral_slot *slot = peripheral_slot_for_conn(conn); - if (slot == NULL) { - LOG_ERR("No peripheral state found for connection"); - return; - } - - int err = bt_gatt_subscribe(conn, &slot->subscribe_params); +static int split_central_subscribe(struct bt_conn *conn, struct bt_gatt_subscribe_params *params) { + int err = bt_gatt_subscribe(conn, params); switch (err) { case -EALREADY: LOG_DBG("[ALREADY SUBSCRIBED]"); @@ -228,6 +271,8 @@ static void split_central_subscribe(struct bt_conn *conn) { LOG_ERR("Subscribe failed (err %d)", err); break; } + + return err; } static uint8_t split_central_chrc_discovery_func(struct bt_conn *conn, @@ -250,9 +295,9 @@ static uint8_t split_central_chrc_discovery_func(struct bt_conn *conn, } LOG_DBG("[ATTRIBUTE] handle %u", attr->handle); + const struct bt_uuid *chrc_uuid = ((struct bt_gatt_chrc *)attr->user_data)->uuid; - if (bt_uuid_cmp(((struct bt_gatt_chrc *)attr->user_data)->uuid, - BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_POSITION_STATE_UUID)) == 0) { + if (bt_uuid_cmp(chrc_uuid, BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_POSITION_STATE_UUID)) == 0) { LOG_DBG("Found position state characteristic"); slot->discover_params.uuid = NULL; slot->discover_params.start_handle = attr->handle + 2; @@ -263,14 +308,33 @@ static uint8_t split_central_chrc_discovery_func(struct bt_conn *conn, slot->subscribe_params.value_handle = bt_gatt_attr_value_handle(attr); slot->subscribe_params.notify = split_central_notify_func; slot->subscribe_params.value = BT_GATT_CCC_NOTIFY; - split_central_subscribe(conn); - } else if (bt_uuid_cmp(((struct bt_gatt_chrc *)attr->user_data)->uuid, - BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_RUN_BEHAVIOR_UUID)) == 0) { + split_central_subscribe(conn, &slot->subscribe_params); +#if ZMK_KEYMAP_HAS_SENSORS + } else if (bt_uuid_cmp(chrc_uuid, BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_SENSOR_STATE_UUID)) == + 0) { + slot->discover_params.uuid = NULL; + slot->discover_params.start_handle = attr->handle + 2; + slot->discover_params.type = BT_GATT_DISCOVER_CHARACTERISTIC; + + slot->sensor_subscribe_params.disc_params = &slot->sub_discover_params; + slot->sensor_subscribe_params.end_handle = slot->discover_params.end_handle; + slot->sensor_subscribe_params.value_handle = bt_gatt_attr_value_handle(attr); + slot->sensor_subscribe_params.notify = split_central_sensor_notify_func; + slot->sensor_subscribe_params.value = BT_GATT_CCC_NOTIFY; + split_central_subscribe(conn, &slot->sensor_subscribe_params); +#endif /* ZMK_KEYMAP_HAS_SENSORS */ + } else if (bt_uuid_cmp(chrc_uuid, BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_RUN_BEHAVIOR_UUID)) == + 0) { LOG_DBG("Found run behavior handle"); + slot->discover_params.uuid = NULL; + slot->discover_params.start_handle = attr->handle + 2; slot->run_behavior_handle = bt_gatt_attr_value_handle(attr); } - bool subscribed = (slot->run_behavior_handle && slot->subscribe_params.value_handle); + bool subscribed = slot->run_behavior_handle && slot->subscribe_params.value_handle; +#if ZMK_KEYMAP_HAS_SENSORS + subscribed = subscribed && slot->sensor_subscribe_params.value_handle; +#endif /* ZMK_KEYMAP_HAS_SENSORS */ return subscribed ? BT_GATT_ITER_STOP : BT_GATT_ITER_CONTINUE; } diff --git a/app/src/split/bluetooth/service.c b/app/src/split/bluetooth/service.c index f7b0d587b26..620df53e11c 100644 --- a/app/src/split/bluetooth/service.c +++ b/app/src/split/bluetooth/service.c @@ -4,6 +4,7 @@ * SPDX-License-Identifier: MIT */ +#include #include #include #include @@ -20,6 +21,22 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include #include +#include +#include + +#if ZMK_KEYMAP_HAS_SENSORS +static struct sensor_event last_sensor_event; + +static ssize_t split_svc_sensor_state(struct bt_conn *conn, const struct bt_gatt_attr *attrs, + void *buf, uint16_t len, uint16_t offset) { + return bt_gatt_attr_read(conn, attrs, buf, len, offset, &last_sensor_event, + sizeof(last_sensor_event)); +} + +static void split_svc_sensor_state_ccc(const struct bt_gatt_attr *attr, uint16_t value) { + LOG_DBG("value %d", value); +} +#endif /* ZMK_KEYMAP_HAS_SENSORS */ #define POS_STATE_LEN 16 @@ -98,7 +115,14 @@ BT_GATT_SERVICE_DEFINE( BT_GATT_CHRC_WRITE_WITHOUT_RESP, BT_GATT_PERM_WRITE_ENCRYPT, NULL, split_svc_run_behavior, &behavior_run_payload), BT_GATT_DESCRIPTOR(BT_UUID_NUM_OF_DIGITALS, BT_GATT_PERM_READ, split_svc_num_of_positions, NULL, - &num_of_positions), ); + &num_of_positions), +#if ZMK_KEYMAP_HAS_SENSORS + BT_GATT_CHARACTERISTIC(BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_SENSOR_STATE_UUID), + BT_GATT_CHRC_READ | BT_GATT_CHRC_NOTIFY, BT_GATT_PERM_READ_ENCRYPT, + split_svc_sensor_state, NULL, &last_sensor_event), + BT_GATT_CCC(split_svc_sensor_state_ccc, BT_GATT_PERM_READ_ENCRYPT | BT_GATT_PERM_WRITE_ENCRYPT), +#endif /* ZMK_KEYMAP_HAS_SENSORS */ +); K_THREAD_STACK_DEFINE(service_q_stack, CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_STACK_SIZE); @@ -151,6 +175,58 @@ int zmk_split_bt_position_released(uint8_t position) { return send_position_state(); } +#if ZMK_KEYMAP_HAS_SENSORS +K_MSGQ_DEFINE(sensor_state_msgq, sizeof(struct sensor_event), + CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_POSITION_QUEUE_SIZE, 4); + +void send_sensor_state_callback(struct k_work *work) { + while (k_msgq_get(&sensor_state_msgq, &last_sensor_event, K_NO_WAIT) == 0) { + int err = bt_gatt_notify(NULL, &split_svc.attrs[8], &last_sensor_event, + sizeof(last_sensor_event)); + if (err) { + LOG_DBG("Error notifying %d", err); + } + } +}; + +K_WORK_DEFINE(service_sensor_notify_work, send_sensor_state_callback); + +int send_sensor_state(struct sensor_event ev) { + int err = k_msgq_put(&sensor_state_msgq, &ev, K_MSEC(100)); + if (err) { + // retry... + switch (err) { + case -EAGAIN: { + LOG_WRN("Sensor state message queue full, popping first message and queueing again"); + struct sensor_event discarded_state; + k_msgq_get(&sensor_state_msgq, &discarded_state, K_NO_WAIT); + return send_sensor_state(ev); + } + default: + LOG_WRN("Failed to queue sensor state to send (%d)", err); + return err; + } + } + + k_work_submit_to_queue(&service_work_q, &service_sensor_notify_work); + return 0; +} + +int zmk_split_bt_sensor_triggered(uint8_t sensor_index, + const struct zmk_sensor_channel_data channel_data[], + size_t channel_data_size) { + if (channel_data_size > ZMK_SENSOR_EVENT_MAX_CHANNELS) { + return -EINVAL; + } + + struct sensor_event ev = + (struct sensor_event){.sensor_index = sensor_index, .channel_data_size = channel_data_size}; + memcpy(ev.channel_data, channel_data, + channel_data_size * sizeof(struct zmk_sensor_channel_data)); + return send_sensor_state(ev); +} +#endif /* ZMK_KEYMAP_HAS_SENSORS */ + int service_init(const struct device *_arg) { static const struct k_work_queue_config queue_config = { .name = "Split Peripheral Notification Queue"}; diff --git a/app/src/split/bluetooth/split_listener.c b/app/src/split/bluetooth/split_listener.c index eb5398c42d6..9b680d2c89c 100644 --- a/app/src/split/bluetooth/split_listener.c +++ b/app/src/split/bluetooth/split_listener.c @@ -13,21 +13,35 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include +#include #include +#include #include int split_listener(const zmk_event_t *eh) { LOG_DBG(""); - const struct zmk_position_state_changed *ev = as_zmk_position_state_changed(eh); - if (ev != NULL) { - if (ev->state) { - return zmk_split_bt_position_pressed(ev->position); + const struct zmk_position_state_changed *pos_ev; + if ((pos_ev = as_zmk_position_state_changed(eh)) != NULL) { + if (pos_ev->state) { + return zmk_split_bt_position_pressed(pos_ev->position); } else { - return zmk_split_bt_position_released(ev->position); + return zmk_split_bt_position_released(pos_ev->position); } } + +#if ZMK_KEYMAP_HAS_SENSORS + const struct zmk_sensor_event *sensor_ev; + if ((sensor_ev = as_zmk_sensor_event(eh)) != NULL) { + return zmk_split_bt_sensor_triggered(sensor_ev->sensor_index, sensor_ev->channel_data, + sensor_ev->channel_data_size); + } +#endif /* ZMK_KEYMAP_HAS_SENSORS */ return ZMK_EV_EVENT_BUBBLE; } ZMK_LISTENER(split_listener, split_listener); -ZMK_SUBSCRIPTION(split_listener, zmk_position_state_changed); \ No newline at end of file +ZMK_SUBSCRIPTION(split_listener, zmk_position_state_changed); + +#if ZMK_KEYMAP_HAS_SENSORS +ZMK_SUBSCRIPTION(split_listener, zmk_sensor_event); +#endif /* ZMK_KEYMAP_HAS_SENSORS */ From dcb1f8f13528effc3e2ee3dadf9b385bf2394037 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Fri, 23 Jun 2023 07:28:27 +0000 Subject: [PATCH 02/26] fix(docs): Update docs about split encoder support --- docs/docs/features/encoders.md | 4 ---- docs/docs/intro.md | 9 ++++----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/docs/docs/features/encoders.md b/docs/docs/features/encoders.md index 29906c909de..0c493330cc6 100644 --- a/docs/docs/features/encoders.md +++ b/docs/docs/features/encoders.md @@ -5,10 +5,6 @@ sidebar_label: Encoders Existing support for encoders in ZMK is focused around the five pin EC11 rotary encoder with push button design used in the majority of current keyboard and macropad designs. -:::note -Encoders are currently only support on the left/central sides of splits. For progress on this, see [#728](https://github.com/zmkfirmware/zmk/pull/728). -::: - ## Enabling EC11 Encoders To enable encoders for boards that have existing encoder support, uncomment the `CONFIG_EC11=y` and `CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y` lines in your board's .conf file in your `zmk-config/config` folder. Save and push your changes, then download and flash the new firmware. diff --git a/docs/docs/intro.md b/docs/docs/intro.md index 142dcafc97e..d65ac46e405 100644 --- a/docs/docs/intro.md +++ b/docs/docs/intro.md @@ -23,11 +23,11 @@ ZMK is currently missing some features found in other popular firmware. This tab | Split Keyboard Support | ✅ | ✅ | ✅ | | [Keymaps and Layers](behaviors/layers.md) | ✅ | ✅ | ✅ | | [Hold-Tap](behaviors/hold-tap.md) (which includes [Mod-Tap](behaviors/mod-tap.md) and [Layer-Tap](behaviors/layers.md/#layer-tap)) | ✅ | ✅ | ✅ | -| [Tap-Dance](behaviors/tap-dance.md) | ✅ | ✅[^3] | ✅ | +| [Tap-Dance](behaviors/tap-dance.md) | ✅ | ✅[^2] | ✅ | | [Keyboard Codes](codes/index.mdx#keyboard) | ✅ | ✅ | ✅ | | [Media](codes/index.mdx#media-controls) & [Consumer](codes/index.mdx#consumer-controls) Codes | ✅ | ✅ | ✅ | -| [Encoders](features/encoders.md)[^1] | ✅ | ✅ | ✅ | -| [Display Support](features/displays.md)[^2] | 🚧 | 🚧 | ✅ | +| [Encoders](features/encoders.md) | ✅ | ✅ | ✅ | +| [Display Support](features/displays.md)[^1] | 🚧 | 🚧 | ✅ | | [RGB Underglow](features/underglow.md) | ✅ | ✅ | ✅ | | [Backlight](features/backlight.md) | ✅ | ✅ | ✅ | | One Shot Keys | ✅ | ✅ | ✅ | @@ -43,8 +43,7 @@ ZMK is currently missing some features found in other popular firmware. This tab | AVR/8 Bit | | | ✅ | | [Wide Range of ARM Chips Supported](https://docs.zephyrproject.org/latest/boards/index.html) | ✅ | | | -[^3]: Tap-Dances are limited to single and double-tap on BlueMicro -[^2]: Encoders are not currently supported on peripheral side splits. +[^2]: Tap-Dances are limited to single and double-tap on BlueMicro [^1]: OLEDs are currently proof of concept in ZMK. ## Code Of Conduct From a92a4967aa85f4ab19d36bcb81afc0420f2775d2 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Wed, 28 Jun 2023 19:26:33 +0000 Subject: [PATCH 03/26] fix(sensors): Only accept data once per behavior. * Don't accept data for the same behavior on multiple layers more than once, to avoid duplicate/extraneous triggers. --- app/include/zmk/keymap.h | 4 ++++ app/src/behaviors/behavior_sensor_rotate_common.c | 15 ++++++++------- app/src/behaviors/behavior_sensor_rotate_common.h | 5 +++-- app/src/keymap.c | 4 ---- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/app/include/zmk/keymap.h b/app/include/zmk/keymap.h index a47cd505643..9ce140bfa27 100644 --- a/app/include/zmk/keymap.h +++ b/app/include/zmk/keymap.h @@ -8,6 +8,10 @@ #include +#define ZMK_LAYER_CHILD_LEN_PLUS_ONE(node) 1 + +#define ZMK_KEYMAP_LAYERS_LEN \ + (DT_FOREACH_CHILD(DT_INST(0, zmk_keymap), ZMK_LAYER_CHILD_LEN_PLUS_ONE) 0) + typedef uint32_t zmk_keymap_layers_state_t; uint8_t zmk_keymap_layer_default(); diff --git a/app/src/behaviors/behavior_sensor_rotate_common.c b/app/src/behaviors/behavior_sensor_rotate_common.c index 586cac3fdf2..98b4aec1267 100644 --- a/app/src/behaviors/behavior_sensor_rotate_common.c +++ b/app/src/behaviors/behavior_sensor_rotate_common.c @@ -28,7 +28,7 @@ int zmk_behavior_sensor_rotate_common_accept_data( if (value.val1 == 0) { triggers = value.val2; } else { - struct sensor_value remainder = data->remainder[sensor_index]; + struct sensor_value remainder = data->remainder[sensor_index][event.layer]; remainder.val1 += value.val1; remainder.val2 += value.val2; @@ -42,15 +42,16 @@ int zmk_behavior_sensor_rotate_common_accept_data( triggers = remainder.val1 / trigger_degrees; remainder.val1 %= trigger_degrees; - data->remainder[sensor_index] = remainder; + data->remainder[sensor_index][event.layer] = remainder; } LOG_DBG( "val1: %d, val2: %d, remainder: %d/%d triggers: %d inc keycode 0x%02X dec keycode 0x%02X", - value.val1, value.val2, data->remainder[sensor_index].val1, - data->remainder[sensor_index].val2, triggers, binding->param1, binding->param2); + value.val1, value.val2, data->remainder[sensor_index][event.layer].val1, + data->remainder[sensor_index][event.layer].val2, triggers, binding->param1, + binding->param2); - data->triggers[sensor_index] = triggers; + data->triggers[sensor_index][event.layer] = triggers; return 0; } @@ -64,11 +65,11 @@ int zmk_behavior_sensor_rotate_common_process(struct zmk_behavior_binding *bindi const int sensor_index = ZMK_SENSOR_POSITION_FROM_VIRTUAL_KEY_POSITION(event.position); if (mode != BEHAVIOR_SENSOR_BINDING_PROCESS_MODE_TRIGGER) { - data->triggers[sensor_index] = 0; + data->triggers[sensor_index][event.layer] = 0; return ZMK_BEHAVIOR_TRANSPARENT; } - int triggers = data->triggers[sensor_index]; + int triggers = data->triggers[sensor_index][event.layer]; struct zmk_behavior_binding triggered_binding; if (triggers > 0) { diff --git a/app/src/behaviors/behavior_sensor_rotate_common.h b/app/src/behaviors/behavior_sensor_rotate_common.h index d354b67937c..c92ac3d5e5f 100644 --- a/app/src/behaviors/behavior_sensor_rotate_common.h +++ b/app/src/behaviors/behavior_sensor_rotate_common.h @@ -6,6 +6,7 @@ #include #include +#include #include struct behavior_sensor_rotate_config { @@ -16,8 +17,8 @@ struct behavior_sensor_rotate_config { }; struct behavior_sensor_rotate_data { - struct sensor_value remainder[ZMK_KEYMAP_SENSORS_LEN]; - int triggers[ZMK_KEYMAP_SENSORS_LEN]; + struct sensor_value remainder[ZMK_KEYMAP_SENSORS_LEN][ZMK_KEYMAP_LAYERS_LEN]; + int triggers[ZMK_KEYMAP_SENSORS_LEN][ZMK_KEYMAP_LAYERS_LEN]; }; int zmk_behavior_sensor_rotate_common_accept_data( diff --git a/app/src/keymap.c b/app/src/keymap.c index 020faf3f2be..bda694276c8 100644 --- a/app/src/keymap.c +++ b/app/src/keymap.c @@ -31,10 +31,6 @@ static uint8_t _zmk_keymap_layer_default = 0; #define DT_DRV_COMPAT zmk_keymap -#define LAYER_CHILD_LEN(node) 1 + -#define ZMK_KEYMAP_NODE DT_DRV_INST(0) -#define ZMK_KEYMAP_LAYERS_LEN (DT_INST_FOREACH_CHILD(0, LAYER_CHILD_LEN) 0) - #define BINDING_WITH_COMMA(idx, drv_inst) ZMK_KEYMAP_EXTRACT_BINDING(idx, drv_inst) #define TRANSFORMED_LAYER(node) \ From 185457bc1169176037aa281edb0a9bf485a70dbd Mon Sep 17 00:00:00 2001 From: Mikhail Stralenia Date: Tue, 29 Aug 2023 18:53:30 +0300 Subject: [PATCH 04/26] fix(shields): leeloo - proper encoder status for split encoders. --- app/boards/shields/leeloo/leeloo_common.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/boards/shields/leeloo/leeloo_common.dtsi b/app/boards/shields/leeloo/leeloo_common.dtsi index 6ce93504b2d..ef775cfbe61 100644 --- a/app/boards/shields/leeloo/leeloo_common.dtsi +++ b/app/boards/shields/leeloo/leeloo_common.dtsi @@ -51,6 +51,7 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; steps = <120>; + status = "disabled"; }; right_encoder: right_encoder { @@ -59,6 +60,7 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; steps = <120>; + status = "disabled"; }; sensors { @@ -87,4 +89,4 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) com-sequential; prechargep = <0x22>; }; -}; \ No newline at end of file +}; From fd4796583810b6fa42edcee7aa33fa9db4ba4a44 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Sat, 2 Sep 2023 13:49:18 -0700 Subject: [PATCH 05/26] fix(docs): Remove diode-direction from direct GPIO driver --- docs/docs/config/kscan.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/docs/docs/config/kscan.md b/docs/docs/config/kscan.md index 787d513661f..d240d79fe67 100644 --- a/docs/docs/config/kscan.md +++ b/docs/docs/config/kscan.md @@ -72,16 +72,15 @@ Applies to: `compatible = "zmk,kscan-gpio-direct"` Definition file: [zmk/app/drivers/zephyr/dts/bindings/kscan/zmk,kscan-gpio-direct.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/drivers/zephyr/dts/bindings/kscan/zmk%2Ckscan-gpio-direct.yaml) -| Property | Type | Description | Default | -| ------------------------- | ---------- | ----------------------------------------------------------------------------------------------------------- | ----------- | -| `label` | string | Unique label for the node | | -| `input-gpios` | GPIO array | Input GPIOs (one per key) | | -| `debounce-press-ms` | int | Debounce time for key press in milliseconds. Use 0 for eager debouncing. | 5 | -| `debounce-release-ms` | int | Debounce time for key release in milliseconds. | 5 | -| `debounce-scan-period-ms` | int | Time between reads in milliseconds when any key is pressed. | 1 | -| `diode-direction` | string | The direction of the matrix diodes | `"row2col"` | -| `poll-period-ms` | int | Time between reads in milliseconds when no key is pressed and `CONFIG_ZMK_KSCAN_DIRECT_POLLING` is enabled. | 10 | -| `toggle-mode` | bool | Use toggle switch mode. | n | +| Property | Type | Description | Default | +| ------------------------- | ---------- | ----------------------------------------------------------------------------------------------------------- | ------- | +| `label` | string | Unique label for the node | | +| `input-gpios` | GPIO array | Input GPIOs (one per key) | | +| `debounce-press-ms` | int | Debounce time for key press in milliseconds. Use 0 for eager debouncing. | 5 | +| `debounce-release-ms` | int | Debounce time for key release in milliseconds. | 5 | +| `debounce-scan-period-ms` | int | Time between reads in milliseconds when any key is pressed. | 1 | +| `poll-period-ms` | int | Time between reads in milliseconds when no key is pressed and `CONFIG_ZMK_KSCAN_DIRECT_POLLING` is enabled. | 10 | +| `toggle-mode` | bool | Use toggle switch mode. | n | By default, a switch will drain current through the internal pull up/down resistor whenever it is pressed. This is not ideal for a toggle switch, where the switch may be left in the "pressed" state for a long time. Enabling `toggle-mode` will make the driver flip between pull up and down as the switch is toggled to optimize for power. From 1e11e84d0d367a90d155df1d13824077f61bf158 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Sat, 2 Sep 2023 14:44:37 -0700 Subject: [PATCH 06/26] fix(docs): Fix row/col comments in matrix examples --- docs/docs/config/kscan.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/docs/docs/config/kscan.md b/docs/docs/config/kscan.md index d240d79fe67..5c70f4ba1b1 100644 --- a/docs/docs/config/kscan.md +++ b/docs/docs/config/kscan.md @@ -296,9 +296,7 @@ Any keyboard which is not a grid of 1 unit keys will likely have some unused pos kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - rows = <5>; - columns = <4>; - // define the matrix... + // define row-gpios with 5 elements and col-gpios with 4... }; default_transform: matrix_transform { @@ -358,9 +356,7 @@ Consider a keyboard with a [duplex matrix](https://wiki.ai03.com/books/pcb-desig kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - rows = <12>; - columns = <8>; - // define the matrix... + // define row-gpios with 12 elements and col-gpios with 8... }; default_transform: matrix_transform { From 3d938033b002c78ce24245e3cf37b7ba55876145 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Sat, 2 Sep 2023 14:45:25 -0700 Subject: [PATCH 07/26] feat(docs): Note GPIO flags and add examples --- docs/docs/config/kscan.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/docs/config/kscan.md b/docs/docs/config/kscan.md index 5c70f4ba1b1..296cb4a179c 100644 --- a/docs/docs/config/kscan.md +++ b/docs/docs/config/kscan.md @@ -86,6 +86,18 @@ By default, a switch will drain current through the internal pull up/down resist `toggle-mode` applies to all switches handled by the instance of the driver. To use a toggle switch with other, non-toggle, direct GPIO switches, create two instances of the direct GPIO driver, one with `toggle-mode` and the other without. Then, use a [composite driver](#composite-driver) to combine them. +Assuming the switches connect each GPIO pin to the ground, the [GPIO flags](https://docs.zephyrproject.org/3.2.0/hardware/peripherals/gpio.html#api-reference) for the elements in `input-gpios` should be `(GPIO_ACTIVE_LOW | GPIO_PULL_UP)`: + +```devicetree + kscan0: kscan { + compatible = "zmk,kscan-gpio-direct"; + input-gpios + = <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; + }; +``` + ## Matrix Driver Keyboard scan driver where keys are arranged on a matrix with one GPIO per row and column. @@ -122,6 +134,24 @@ The `diode-direction` property must be one of: | `"row2col"` | Diodes point from rows to columns (cathodes are connected to columns) | | `"col2row"` | Diodes point from columns to rows (cathodes are connected to rows) | +Given the `diode-direction`, the [GPIO flags](https://docs.zephyrproject.org/3.2.0/hardware/peripherals/gpio.html#api-reference) for the elements in `row-` and `col-gpios` should be set appropriately. +The output pins (e.g. columns for `col2row`) should have the flag `GPIO_ACTIVE_HIGH`, and input pins (e.g. rows for `col2row`) should have the flags `(GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)`: + +```devicetree + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + diode-direction = "col2row"; + col-gpios + = <&pro_micro 4 GPIO_ACTIVE_HIGH> + , <&pro_micro 5 GPIO_ACTIVE_HIGH> + ; + row-gpios + = <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + }; +``` + ## Composite Driver Keyboard scan driver which combines multiple other keyboard scan drivers. From 369c7c1721861c9a0e5e47c6b1090abe8cfb0566 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Sat, 2 Sep 2023 14:10:59 -0700 Subject: [PATCH 08/26] fix(docs): Correct default macro wait/tap ms --- docs/docs/behaviors/macros.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/docs/behaviors/macros.md b/docs/docs/behaviors/macros.md index 0757e735285..4836c205e41 100644 --- a/docs/docs/behaviors/macros.md +++ b/docs/docs/behaviors/macros.md @@ -111,7 +111,8 @@ bindings ### Wait Time -The wait time setting controls how long of a delay is introduced between behaviors in the `bindings` list. The initial wait time for a macro, 100ms by default, can +The wait time setting controls how long of a delay is introduced between behaviors in the `bindings` list. The initial wait time for a macro, +which is equal to the value of [`CONFIG_ZMK_MACRO_DEFAULT_WAIT_MS`](../config/behaviors.md#macro) by default, can be set by assigning a value to the `wait-ms` property of the macro, e.g. `wait-ms = <20>;`. If you want to update the wait time at any point in the macro bindings list, use `¯o_wait_time`, e.g. `¯o_wait_time 30`. A full example: @@ -126,7 +127,8 @@ bindings ### Tap Time -The tap time setting controls how long a tapped behavior is held in the `bindings` list. The initial tap time for a macro, 100ms by default, can +The tap time setting controls how long a tapped behavior is held in the `bindings` list. The initial tap time for a macro, +which is equal to the value of [`CONFIG_ZMK_MACRO_DEFAULT_TAP_MS`](../config/behaviors.md#macro) by default, can be set by assigning a value to the `tap-ms` property of the macro, e.g. `tap-ms = <20>;`. If you want to update the tap time at any point in a macro bindings list, use `¯o_tap_time`, e.g. `¯o_tap_time 30`. A full example: From b20d3178b9d681f2b959cc7980d7252cda415189 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Sat, 2 Sep 2023 14:11:30 -0700 Subject: [PATCH 09/26] feat(docs): Note devicetree limits re: macro bindings --- docs/docs/behaviors/macros.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/docs/behaviors/macros.md b/docs/docs/behaviors/macros.md index 4836c205e41..377ce7fecdb 100644 --- a/docs/docs/behaviors/macros.md +++ b/docs/docs/behaviors/macros.md @@ -147,6 +147,8 @@ Macros use an internal queue to invoke each behavior in the bindings list when t To prevent issues with longer macros, you can change the size of this queue via the `CONFIG_ZMK_BEHAVIORS_QUEUE_SIZE` setting in your configuration, [typically through your `.conf` file](../config/index.md). For example, `CONFIG_ZMK_BEHAVIORS_QUEUE_SIZE=512` would allow your macro to type about 256 characters. +Another limit worth noting is that the maximum number of bindings you can pass to a `bindings` field in the [Devicetree](../config/index.md#devicetree-files) is 256, which also constrains how many behaviors can be invoked by a macro. + ## Parameterized Macros Macros can also be "parameterized", allowing them to be bound in your keymap with unique values passed into them, e.g.: From 4e18b879bdeab047e901856cf6a0cbf3a4855adc Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Sat, 2 Sep 2023 15:26:00 -0700 Subject: [PATCH 10/26] feat(docs): Document persisted settings and debouncing --- docs/docs/behaviors/backlight.md | 6 ++++++ docs/docs/behaviors/bluetooth.md | 5 +++++ docs/docs/behaviors/outputs.md | 5 +++++ docs/docs/behaviors/power.md | 5 +++++ docs/docs/behaviors/underglow.md | 6 ++++++ 5 files changed, 27 insertions(+) diff --git a/docs/docs/behaviors/backlight.md b/docs/docs/behaviors/backlight.md index cb9a85a830e..8c613fe6bd1 100644 --- a/docs/docs/behaviors/backlight.md +++ b/docs/docs/behaviors/backlight.md @@ -36,6 +36,12 @@ Here is a table describing the action for each define: - Parameter #1: The backlight action define, e.g. `BL_TOG` or `BL_INC` - Parameter #2: Only applies to `BL_SET`and is the brightness value +:::note Backlight settings persistence +The backlight settings that are changed via the `&bl` behavior will be saved to flash storage and hence persist across restarts and firmware flashes. +They will also override the start values set by [`CONFIG_ZMK_BACKLIGHT_*_START` settings](../config/backlight.md#kconfig). +However the settings will only be saved after [`CONFIG_ZMK_SETTINGS_SAVE_DEBOUNCE`](../config/system.md#general) milliseconds in order to reduce potential wear on the flash memory. +::: + ### Examples 1. Toggle backlight on/off diff --git a/docs/docs/behaviors/bluetooth.md b/docs/docs/behaviors/bluetooth.md index 7c77c4ad2b7..89496948d50 100644 --- a/docs/docs/behaviors/bluetooth.md +++ b/docs/docs/behaviors/bluetooth.md @@ -35,6 +35,11 @@ Here is a table describing the command for each define: | `BT_PRV` | Switch to the previous profile, cycling through to the last one when the beginning is reached. | | `BT_SEL` | Select the 0-indexed profile by number. Please note: this definition must include a number as an argument in the keymap to work correctly. eg. `BT_SEL 0` | +:::note Selected profile persistence +The profile that is selected by the `BT_SEL`/`BT_PRV`/`BT_NXT` actions will be saved to flash storage and hence persist across restarts and firmware flashes. +However it will only be saved after [`CONFIG_ZMK_SETTINGS_SAVE_DEBOUNCE`](../config/system.md#general) milliseconds in order to reduce potential wear on the flash memory. +::: + ## Bluetooth Behavior The bluetooth behavior completes an bluetooth action given on press. diff --git a/docs/docs/behaviors/outputs.md b/docs/docs/behaviors/outputs.md index 198d9acc617..dad52be2ccb 100644 --- a/docs/docs/behaviors/outputs.md +++ b/docs/docs/behaviors/outputs.md @@ -44,6 +44,11 @@ The output selection behavior changes the preferred output on press. - Reference: `&out` - Parameter #1: Command, e.g. `OUT_BLE` +:::note External power state persistence +The endpoint that is selected by the `&out` behavior will be saved to flash storage and hence persist across restarts and firmware flashes. +However it will only be saved after [`CONFIG_ZMK_SETTINGS_SAVE_DEBOUNCE`](../config/system.md#general) milliseconds in order to reduce potential wear on the flash memory. +::: + ### Examples 1. Behavior binding to prefer sending keyboard output to USB diff --git a/docs/docs/behaviors/power.md b/docs/docs/behaviors/power.md index 805806095ac..11f920845a3 100644 --- a/docs/docs/behaviors/power.md +++ b/docs/docs/behaviors/power.md @@ -43,6 +43,11 @@ Here is a table describing the command for each define: - Reference: `&ext_power` - Parameter#1: Command, e.g `EP_ON` +:::note External power state persistence +The on/off state that is set by the `&ext_power` behavior will be saved to flash storage and hence persist across restarts and firmware flashes. +However it will only be saved after [`CONFIG_ZMK_SETTINGS_SAVE_DEBOUNCE`](../config/system.md#general) milliseconds in order to reduce potential wear on the flash memory. +::: + ### Example: 1. Behavior binding to enable the external power diff --git a/docs/docs/behaviors/underglow.md b/docs/docs/behaviors/underglow.md index 52429e69987..29f34c2ab0b 100644 --- a/docs/docs/behaviors/underglow.md +++ b/docs/docs/behaviors/underglow.md @@ -55,6 +55,12 @@ Value Limits: ::: +:::note RGB settings persistence +The RGB settings that are changed via the `&rgb_ug` behavior will be saved to flash storage and hence persist across restarts and firmware flashes. +They will also override the start values set by [`CONFIG_ZMK_RGB_*_START` settings](../config/underglow.md#kconfig). +However the settings will only be saved after [`CONFIG_ZMK_SETTINGS_SAVE_DEBOUNCE`](../config/system.md#general) milliseconds in order to reduce potential wear on the flash memory. +::: + ## Examples 1. Toggle underglow on/off From 544612c8c0929ff3089bcdb86f9ea8a2f77081eb Mon Sep 17 00:00:00 2001 From: Xudong Zheng <7pkvm5aw@slicealias.com> Date: Fri, 1 Sep 2023 23:32:17 -0400 Subject: [PATCH 11/26] fix(split): reserve peripheral slot before stopping scanning In the event that the peripheral MAC address does not match, this allows scanning to continue. --- app/src/split/bluetooth/central.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/app/src/split/bluetooth/central.c b/app/src/split/bluetooth/central.c index b70d79e3a3a..ccf1cc28ced 100644 --- a/app/src/split/bluetooth/central.c +++ b/app/src/split/bluetooth/central.c @@ -433,20 +433,22 @@ static int stop_scanning() { static bool split_central_eir_found(const bt_addr_le_t *addr) { LOG_DBG("Found the split service"); - // Stop scanning so we can connect to the peripheral device. - int err = stop_scanning(); - if (err < 0) { - return false; - } - + // Reserve peripheral slot. Once the central has bonded to its peripherals, + // the peripheral MAC addresses will be validated internally and the slot + // reservation will fail if there is a mismatch. int slot_idx = reserve_peripheral_slot(addr); if (slot_idx < 0) { - LOG_ERR("Failed to reserve peripheral slot (err %d)", slot_idx); + LOG_INF("Unable to reserve peripheral slot (err %d)", slot_idx); return false; } - struct peripheral_slot *slot = &peripherals[slot_idx]; + // Stop scanning so we can connect to the peripheral device. + int err = stop_scanning(); + if (err < 0) { + return false; + } + LOG_DBG("Initiating new connnection"); struct bt_le_conn_param *param = BT_LE_CONN_PARAM(CONFIG_ZMK_SPLIT_BLE_PREF_INT, CONFIG_ZMK_SPLIT_BLE_PREF_INT, From ac0691471f1adb8336fb7eb5d01f18c988c5bad8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=95=E3=82=A3=E3=83=AB=E3=82=BF=E3=83=BC=E3=83=9A?= =?UTF-8?q?=E3=83=BC=E3=83=91=E3=83=BC?= <76888457+filterpaper@users.noreply.github.com> Date: Thu, 3 Aug 2023 10:26:34 +0800 Subject: [PATCH 12/26] feat(shields): Add Bluetooth bindings to kyria keymaps Bluetooth bindings are useful for handling pairings with hosts. This change adds the header and a few default commands as template for new users to work with. --- app/boards/shields/kyria/kyria.keymap | 20 +++++++++++++++-- app/boards/shields/kyria/kyria_rev2.keymap | 20 +++++++++++++++-- app/boards/shields/kyria/kyria_rev3.keymap | 26 +++++++++++++++++----- 3 files changed, 57 insertions(+), 9 deletions(-) diff --git a/app/boards/shields/kyria/kyria.keymap b/app/boards/shields/kyria/kyria.keymap index 9a2163db549..a11c13259e1 100644 --- a/app/boards/shields/kyria/kyria.keymap +++ b/app/boards/shields/kyria/kyria.keymap @@ -5,6 +5,7 @@ */ #include +#include #include / { @@ -15,15 +16,30 @@ // --------------------------------------------------------------------------------------------------------------------------------- // | ESC | Q | W | E | R | T | | Y | U | I | O | P | \ | // | TAB | A | S | D | F | G | | H | J | K | L | ; | ' | -// | SHIFT | Z | X | C | V | B | L SHIFT | L SHIFT | | L SHIFT | L SHIFT | N | M | , | . | / | CTRL | +// | SHIFT | Z | X | C | V | B | L SHIFT | L SHIFT | | LAYER 1 | L SHIFT | N | M | , | . | / | CTRL | // | GUI | DEL | RET | SPACE | ESC | | RET | SPACE | TAB | BSPC | R-ALT | bindings = < &kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSLH &kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT - &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LSHFT &kp LSHFT &kp LSHFT &kp LSHFT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RCTRL + &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LSHFT &kp LSHFT &mo 1 &kp LSHFT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RCTRL &kp LGUI &kp DEL &kp RET &kp SPACE &kp ESC &kp RET &kp SPACE &kp TAB &kp BSPC &kp RALT >; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; + }; + function_layer { +// --------------------------------------------------------------------------------------------------------------------------------- +// | | |BT_CLR|BTSEL0|BTSEL1|BTSEL2| | | | | | | | +// | | | |BTSEL3|BTSEL4| | | | | | | | | +// | | | | | | | | | | | | | | | | | | | +// | | | | | | | | | | | | | + bindings = < + &trans &trans &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &trans &trans &trans &trans &trans &trans + &trans &trans &trans &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + >; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; }; }; diff --git a/app/boards/shields/kyria/kyria_rev2.keymap b/app/boards/shields/kyria/kyria_rev2.keymap index 9a2163db549..a11c13259e1 100644 --- a/app/boards/shields/kyria/kyria_rev2.keymap +++ b/app/boards/shields/kyria/kyria_rev2.keymap @@ -5,6 +5,7 @@ */ #include +#include #include / { @@ -15,15 +16,30 @@ // --------------------------------------------------------------------------------------------------------------------------------- // | ESC | Q | W | E | R | T | | Y | U | I | O | P | \ | // | TAB | A | S | D | F | G | | H | J | K | L | ; | ' | -// | SHIFT | Z | X | C | V | B | L SHIFT | L SHIFT | | L SHIFT | L SHIFT | N | M | , | . | / | CTRL | +// | SHIFT | Z | X | C | V | B | L SHIFT | L SHIFT | | LAYER 1 | L SHIFT | N | M | , | . | / | CTRL | // | GUI | DEL | RET | SPACE | ESC | | RET | SPACE | TAB | BSPC | R-ALT | bindings = < &kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSLH &kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT - &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LSHFT &kp LSHFT &kp LSHFT &kp LSHFT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RCTRL + &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LSHFT &kp LSHFT &mo 1 &kp LSHFT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RCTRL &kp LGUI &kp DEL &kp RET &kp SPACE &kp ESC &kp RET &kp SPACE &kp TAB &kp BSPC &kp RALT >; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; + }; + function_layer { +// --------------------------------------------------------------------------------------------------------------------------------- +// | | |BT_CLR|BTSEL0|BTSEL1|BTSEL2| | | | | | | | +// | | | |BTSEL3|BTSEL4| | | | | | | | | +// | | | | | | | | | | | | | | | | | | | +// | | | | | | | | | | | | | + bindings = < + &trans &trans &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &trans &trans &trans &trans &trans &trans + &trans &trans &trans &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + >; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; }; }; diff --git a/app/boards/shields/kyria/kyria_rev3.keymap b/app/boards/shields/kyria/kyria_rev3.keymap index d74757cad7d..ac2fc044e73 100644 --- a/app/boards/shields/kyria/kyria_rev3.keymap +++ b/app/boards/shields/kyria/kyria_rev3.keymap @@ -5,6 +5,7 @@ */ #include +#include #include /* Uncomment this block if using RGB @@ -23,13 +24,28 @@ // --------------------------------------------------------------------------------------------------------------------------------- // | ESC | Q | W | E | R | T | | Y | U | I | O | P | \ | // | TAB | A | S | D | F | G | | H | J | K | L | ; | ' | - // | SHIFT | Z | X | C | V | B | L SHIFT | L SHIFT | | L SHIFT | L SHIFT | N | M | , | . | / | CTRL | + // | SHIFT | Z | X | C | V | B | L SHIFT | L SHIFT | | LAYER 1 | L SHIFT | N | M | , | . | / | CTRL | // | GUI | DEL | RET | SPACE | ESC | | RET | SPACE | TAB | BSPC | R-ALT | bindings = < - &kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSLH - &kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT - &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LSHFT &kp LSHFT &kp LSHFT &kp LSHFT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RCTRL - &kp LGUI &kp DEL &kp RET &kp SPACE &kp ESC &kp RET &kp SPACE &kp TAB &kp BSPC &kp RALT + &kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSLH + &kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT + &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LSHFT &kp LSHFT &mo 1 &kp LSHFT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RCTRL + &kp LGUI &kp DEL &kp RET &kp SPACE &kp ESC &kp RET &kp SPACE &kp TAB &kp BSPC &kp RALT + >; + + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; + }; + function_layer { + // --------------------------------------------------------------------------------------------------------------------------------- + // | | |BT_CLR|BTSEL0|BTSEL1|BTSEL2| | | | | | | | + // | | | |BTSEL3|BTSEL4| | | | | | | | | + // | | | | | | | | | | | | | | | | | | | + // | | | | | | | | | | | | | + bindings = < + &trans &trans &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &trans &trans &trans &trans &trans &trans + &trans &trans &trans &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans >; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; From 3de23938d687badb346cd97f2e4003bc4357508c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Jul 2023 08:51:44 +0000 Subject: [PATCH 13/26] chore(deps): bump word-wrap from 1.2.3 to 1.2.4 in /docs Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4. - [Release notes](https://github.com/jonschlinkert/word-wrap/releases) - [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4) --- updated-dependencies: - dependency-name: word-wrap dependency-type: indirect ... Signed-off-by: dependabot[bot] --- docs/package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/package-lock.json b/docs/package-lock.json index b990f53c3dc..3aec8dd5014 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -15859,9 +15859,9 @@ "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==" }, "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", + "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", "devOptional": true, "engines": { "node": ">=0.10.0" @@ -27353,9 +27353,9 @@ "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==" }, "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", + "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", "devOptional": true }, "wrap-ansi": { From 8984e12f0d0442b15e6fd18dfd48666bc4cbceb2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Aug 2023 05:10:14 +0000 Subject: [PATCH 14/26] chore(deps-dev): bump json-schema-to-typescript in /docs Bumps [json-schema-to-typescript](https://github.com/bcherny/json-schema-to-typescript) from 12.0.0 to 13.1.1. - [Changelog](https://github.com/bcherny/json-schema-to-typescript/blob/master/CHANGELOG.md) - [Commits](https://github.com/bcherny/json-schema-to-typescript/commits) --- updated-dependencies: - dependency-name: json-schema-to-typescript dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- docs/package-lock.json | 14 +++++++------- docs/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/package-lock.json b/docs/package-lock.json index 3aec8dd5014..38eae2b7dc8 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -35,7 +35,7 @@ "eslint-config-prettier": "^8.8.0", "eslint-plugin-mdx": "^2.0.5", "eslint-plugin-react": "^7.32.2", - "json-schema-to-typescript": "^12.0.0", + "json-schema-to-typescript": "^13.1.1", "mustache": "^4.2.0", "null-loader": "^4.0.0", "prebuild-webpack-plugin": "^1.1.1", @@ -9163,9 +9163,9 @@ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" }, "node_modules/json-schema-to-typescript": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-12.0.0.tgz", - "integrity": "sha512-Uk/BDIAo8vqepPBhM86UhNMHgCv7JulicNj/BgnQPHE1fGCoej0UTtcEYzXU/uk6lSvbZCf7pccW+dnNMrr5rg==", + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-13.1.1.tgz", + "integrity": "sha512-F3CYhtA7F3yPbb8vF7sFchk/2dnr1/yTKf8RcvoNpjnh67ZS/ZMH1ElLt5KHAtf2/bymiejLQQszszPWEeTdSw==", "dev": true, "dependencies": { "@bcherny/json-schema-ref-parser": "10.0.5-fork", @@ -22663,9 +22663,9 @@ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" }, "json-schema-to-typescript": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-12.0.0.tgz", - "integrity": "sha512-Uk/BDIAo8vqepPBhM86UhNMHgCv7JulicNj/BgnQPHE1fGCoej0UTtcEYzXU/uk6lSvbZCf7pccW+dnNMrr5rg==", + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-13.1.1.tgz", + "integrity": "sha512-F3CYhtA7F3yPbb8vF7sFchk/2dnr1/yTKf8RcvoNpjnh67ZS/ZMH1ElLt5KHAtf2/bymiejLQQszszPWEeTdSw==", "dev": true, "requires": { "@bcherny/json-schema-ref-parser": "10.0.5-fork", diff --git a/docs/package.json b/docs/package.json index d82e54ec8c9..9b38bef8b67 100644 --- a/docs/package.json +++ b/docs/package.json @@ -54,7 +54,7 @@ "eslint-config-prettier": "^8.8.0", "eslint-plugin-mdx": "^2.0.5", "eslint-plugin-react": "^7.32.2", - "json-schema-to-typescript": "^12.0.0", + "json-schema-to-typescript": "^13.1.1", "mustache": "^4.2.0", "null-loader": "^4.0.0", "prebuild-webpack-plugin": "^1.1.1", From 647945d9f8c80b7de8df8f9dc54bdcf865d531ad Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Mon, 17 Jul 2023 07:20:45 -0700 Subject: [PATCH 15/26] feat(shields): Add splitkb.com Aurora Helix * Add new shield for splitkb.com Aurora Helix, supporting keys, encoder(s), displays, and RGB. --- .../splitkb_aurora_helix/Kconfig.defconfig | 53 ++++++++++ .../splitkb_aurora_helix/Kconfig.shield | 8 ++ .../boards/nice_nano.overlay | 46 +++++++++ .../boards/nice_nano_v2.overlay | 46 +++++++++ .../splitkb_aurora_helix.conf | 9 ++ .../splitkb_aurora_helix.dtsi | 79 +++++++++++++++ .../splitkb_aurora_helix.keymap | 96 +++++++++++++++++++ .../splitkb_aurora_helix.zmk.yml | 15 +++ .../splitkb_aurora_helix_left.overlay | 42 ++++++++ .../splitkb_aurora_helix_right.overlay | 46 +++++++++ 10 files changed, 440 insertions(+) create mode 100644 app/boards/shields/splitkb_aurora_helix/Kconfig.defconfig create mode 100644 app/boards/shields/splitkb_aurora_helix/Kconfig.shield create mode 100644 app/boards/shields/splitkb_aurora_helix/boards/nice_nano.overlay create mode 100644 app/boards/shields/splitkb_aurora_helix/boards/nice_nano_v2.overlay create mode 100644 app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.conf create mode 100644 app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.dtsi create mode 100644 app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.keymap create mode 100644 app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.zmk.yml create mode 100644 app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix_left.overlay create mode 100644 app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix_right.overlay diff --git a/app/boards/shields/splitkb_aurora_helix/Kconfig.defconfig b/app/boards/shields/splitkb_aurora_helix/Kconfig.defconfig new file mode 100644 index 00000000000..6d7a55691e2 --- /dev/null +++ b/app/boards/shields/splitkb_aurora_helix/Kconfig.defconfig @@ -0,0 +1,53 @@ +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT + +if SHIELD_SPLITKB_AURORA_HELIX_LEFT + +config ZMK_KEYBOARD_NAME + default "Aurora Helix" + +config ZMK_SPLIT_ROLE_CENTRAL + default y + +endif # SHIELD_SPLITKB_AURORA_HELIX_LEFT + +if SHIELD_SPLITKB_AURORA_HELIX_LEFT || SHIELD_SPLITKB_AURORA_HELIX_RIGHT + +config ZMK_SPLIT + default y + +config ZMK_RGB_UNDERGLOW + select WS2812_STRIP + select SPI + +if ZMK_DISPLAY + +config SSD1306 + default y + +config I2C + default y + +config SSD1306_REVERSE_MODE + default y + +endif # ZMK_DISPLAY + +if LVGL + +config LV_Z_VDB_SIZE + default 64 + +config LV_DPI_DEF + default 148 + +config LV_Z_BITS_PER_PIXEL + default 1 + +choice LV_COLOR_DEPTH + default LV_COLOR_DEPTH_1 +endchoice + +endif # LVGL + +endif # SHIELD_SPLITKB_AURORA_HELIX_LEFT || SHIELD_SPLITKB_AURORA_HELIX_RIGHT diff --git a/app/boards/shields/splitkb_aurora_helix/Kconfig.shield b/app/boards/shields/splitkb_aurora_helix/Kconfig.shield new file mode 100644 index 00000000000..c64ef8798e1 --- /dev/null +++ b/app/boards/shields/splitkb_aurora_helix/Kconfig.shield @@ -0,0 +1,8 @@ +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config SHIELD_SPLITKB_AURORA_HELIX_LEFT + def_bool $(shields_list_contains,splitkb_aurora_helix_left) + +config SHIELD_SPLITKB_AURORA_HELIX_RIGHT + def_bool $(shields_list_contains,splitkb_aurora_helix_right) diff --git a/app/boards/shields/splitkb_aurora_helix/boards/nice_nano.overlay b/app/boards/shields/splitkb_aurora_helix/boards/nice_nano.overlay new file mode 100644 index 00000000000..8f1629ced14 --- /dev/null +++ b/app/boards/shields/splitkb_aurora_helix/boards/nice_nano.overlay @@ -0,0 +1,46 @@ +#include + +&pinctrl { + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; + + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi3 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <6>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + color-mapping = ; + }; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; diff --git a/app/boards/shields/splitkb_aurora_helix/boards/nice_nano_v2.overlay b/app/boards/shields/splitkb_aurora_helix/boards/nice_nano_v2.overlay new file mode 100644 index 00000000000..8f1629ced14 --- /dev/null +++ b/app/boards/shields/splitkb_aurora_helix/boards/nice_nano_v2.overlay @@ -0,0 +1,46 @@ +#include + +&pinctrl { + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; + + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi3 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <6>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + color-mapping = ; + }; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; diff --git a/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.conf b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.conf new file mode 100644 index 00000000000..af482abcc4b --- /dev/null +++ b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.conf @@ -0,0 +1,9 @@ +# Uncomment these two line to add support for encoders to your firmware +# CONFIG_EC11=y +# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y + +# Uncomment the following line to enable the OLED Display +# CONFIG_ZMK_DISPLAY=y + +# Uncomment the following line to enable RGB underglow +# CONFIG_ZMK_RGB_UNDERGLOW=y diff --git a/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.dtsi b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.dtsi new file mode 100644 index 00000000000..e580e87daba --- /dev/null +++ b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.dtsi @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + + chosen { + zephyr,display = &oled; + zmk,matrix_transform = &default_transform; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <14>; + rows = <5>; + // | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | + // | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | + // | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | + // | SW19 | SW20 | SW21 | SW22 | SW23 | SW24 | SW25 | | SW25 | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | + // | SW26 | SW27 | SW28 | SW29 | SW30 | SW31 | SW32 | | SW32 | SW31 | SW30 | SW29 | SW28 | SW27 | SW26 | + map = < + RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) + RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) + RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) + RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,13) + RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,13) + >; + }; + + left_encoder: left_encoder { + compatible = "alps,ec11"; + label = "L_ENCODER"; + steps = <144>; + status = "disabled"; + + a-gpios = <&pro_micro 7 GPIO_PULL_UP>; + b-gpios = <&pro_micro 8 GPIO_PULL_UP>; + }; + + right_encoder: right_encoder { + compatible = "alps,ec11"; + label = "R_ENCODER"; + steps = <144>; + status = "disabled"; + + a-gpios = <&pro_micro 16 GPIO_PULL_UP>; + b-gpios = <&pro_micro 14 GPIO_PULL_UP>; + }; + + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&left_encoder &right_encoder>; + triggers-per-rotation = <36>; + }; +}; + +&pro_micro_i2c { + status = "okay"; + + oled: ssd1306@3c { + compatible = "solomon,ssd1306fb"; + reg = <0x3c>; + label = "DISPLAY"; + width = <128>; + height = <32>; + segment-offset = <0>; + page-offset = <0>; + display-offset = <0>; + multiplex-ratio = <31>; + segment-remap; + com-invdir; + com-sequential; + prechargep = <0x22>; + }; +}; diff --git a/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.keymap b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.keymap new file mode 100644 index 00000000000..edec8fec306 --- /dev/null +++ b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.keymap @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include +#include +#include + +#define DEFAULT 0 +#define LOWER 1 +#define RAISE 2 +#define ADJUST 3 + +/* Uncomment this block if using RGB +&led_strip { + chain-length = <6>; + // chain-length = <38>; // Uncomment if using both per-key and underglow LEDs + // chain-length = <32>; // Uncomment if using only per-key LEDs. +}; + */ + +/* NOTE: At the time of the creation of this keymap, there are no specified codes for 'eisuu' and 'kana' input in ZMK. +However, 'LANG1' and 'LANG2' are fully-functioning candidates for 'kana' and 'eisuu' input respectively. +As such, those are in use within the default layer at this time.*/ + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + // --------------------------------------------------------------------------------------------------------------------------------- + // | GRAVE | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | DEL | + // | TAB | Q | W | E | R | T | | Y | U | I | O | P | BSPC | + // | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' | + // | SHIFT | Z | X | C | V | B | LBKT | | RBKT | N | M | , | . | / | RET | + // | ADJUST | ESC | ALT | LGUI | EISUU | LOWER | SPACE | | SPACE | RAISE | KANA | LEFT | DOWN | UP | RIGHT | + bindings = < + &kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp DEL + &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC + &kp LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT + &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LBKT &kp RBKT &kp N &kp M &kp COMMA &kp PERIOD &kp SLASH &kp RET + &mo ADJUST &kp ESC &kp LALT &kp LGUI &kp LANG2 &mo LOWER &kp SPACE &kp SPACE &mo RAISE &kp LANG1 &kp LEFT &kp DOWN &kp UP &kp RIGHT + >; + }; + lower_layer { + // --------------------------------------------------------------------------------------------------------------------------------- + // | | | | | | | | | | | | | | + // | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + // | | | | | | | | | _ | + | { | } | PIPE | + // | | | | | | | ( | | ) | | | | HOME | END | | + // | | | | | | | | | | | | | | | | + bindings = < + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &kp TILDE &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp ASTRK &kp LPAR &kp RPAR &trans + &trans &trans &trans &trans &trans &trans &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE + &trans &trans &trans &trans &trans &trans &kp LPAR &kp RPAR &trans &trans &trans &kp HOME &kp END &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + >; + }; + raise_layer { + // --------------------------------------------------------------------------------------------------------------------------------- + // | | | | | | | | | | | | | | + // | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | DEL | + // | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | + // | | F7 | F8 | F9 | F10 | F11 | | | | F12 | | PSCRN | PG_DN | PG_UP | | + // | | | | | | | | | | | | NEXT | VOL- | VOL+ | PLAY | + bindings = < + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp DEL + &trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH + &trans &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &trans &trans &kp F12 &trans &kp PSCRN &kp PG_DN &kp PG_UP &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PP + >; + }; + adjust_layer { + // --------------------------------------------------------------------------------------------------------------------------------- + // | ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | EP TOG | + // | BT CLR | BT SEL0 | BT SEL1 | BT SEL2 | BGT SEL3 | BT SEL4 | | RGB EFF+ | RGB HUE+ | RGB SAT+ | RGB SPD+ | RGB BRI+ | RGB TOG | + // | BT NXT | OUT TOG | OUT USB | OUT BLE | | | | RGB EFF- | RGB HUE- | RGB SAT- | RGB SPD- | RGB BRI- | | + // | BT PRV | | | | | | { | | } | | | | | | | + // | | | | | | | | | | | | | | | | + bindings = < + &kp GRAVE &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp ASTRK &kp LPAR &kp RPAR &ext_power EP_TOG + &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &rgb_ug RGB_EFF &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_SPI &rgb_ug RGB_BRI &rgb_ug RGB_TOG + &bt BT_NXT &out OUT_TOG &out OUT_USB &out OUT_BLE &trans &trans &rgb_ug RGB_EFR &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_SPD &rgb_ug RGB_BRD &trans + &bt BT_PRV &trans &trans &trans &trans &trans &kp LBRC &kp RBRC &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + >; + }; + }; +}; diff --git a/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.zmk.yml b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.zmk.yml new file mode 100644 index 00000000000..d83c74ecca8 --- /dev/null +++ b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.zmk.yml @@ -0,0 +1,15 @@ +file_format: "1" +id: splitkb_aurora_helix +name: splitkb.com Aurora Helix +type: shield +url: https://splitkb.com/products/aurora-helix-pcb-kit +requires: [pro_micro] +exposes: [i2c_oled] +features: + - keys + - display + - encoder + - underglow +siblings: + - splitkb_aurora_helix_left + - splitkb_aurora_helix_right diff --git a/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix_left.overlay b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix_left.overlay new file mode 100644 index 00000000000..c9830658b00 --- /dev/null +++ b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix_left.overlay @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "splitkb_aurora_helix.dtsi" + +/ { + chosen { + zmk,kscan = &kscan; + }; + + kscan: kscan { + compatible = "zmk,kscan-gpio-matrix"; + + label = "KSCAN"; + diode-direction = "col2row"; + + row-gpios + = <&pro_micro 21 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 20 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 4 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 5 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 6 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + ; + + col-gpios + = <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 10 GPIO_ACTIVE_HIGH> + , <&pro_micro 9 GPIO_ACTIVE_HIGH> + ; + }; +}; + +&left_encoder { + status = "okay"; +}; diff --git a/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix_right.overlay b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix_right.overlay new file mode 100644 index 00000000000..48572de902d --- /dev/null +++ b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix_right.overlay @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "splitkb_aurora_helix.dtsi" + +/ { + chosen { + zmk,kscan = &kscan; + }; + + kscan: kscan { + compatible = "zmk,kscan-gpio-matrix"; + + label = "KSCAN"; + diode-direction = "col2row"; + + row-gpios + = <&pro_micro 21 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 20 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 19 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 18 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 15 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + ; + + col-gpios + = <&pro_micro 10 GPIO_ACTIVE_HIGH> + , <&pro_micro 9 GPIO_ACTIVE_HIGH> + , <&pro_micro 8 GPIO_ACTIVE_HIGH> + , <&pro_micro 7 GPIO_ACTIVE_HIGH> + , <&pro_micro 6 GPIO_ACTIVE_HIGH> + , <&pro_micro 5 GPIO_ACTIVE_HIGH> + , <&pro_micro 4 GPIO_ACTIVE_HIGH> + ; + }; +}; + +&right_encoder { + status = "okay"; +}; + +&default_transform { + col-offset = <7>; +}; From 3936298260699d88f8fb8c839991128ed0edfafa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Sep 2023 05:18:02 +0000 Subject: [PATCH 16/26] chore(deps-dev): bump eslint-plugin-react from 7.32.2 to 7.33.2 in /docs Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.32.2 to 7.33.2. - [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases) - [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md) - [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.32.2...v7.33.2) --- updated-dependencies: - dependency-name: eslint-plugin-react dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- docs/package-lock.json | 1004 ++++++++++++++++++++++++++++++++++++---- docs/package.json | 2 +- 2 files changed, 914 insertions(+), 92 deletions(-) diff --git a/docs/package-lock.json b/docs/package-lock.json index 38eae2b7dc8..ded7bf838cb 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -34,7 +34,7 @@ "eslint": "^8.39.0", "eslint-config-prettier": "^8.8.0", "eslint-plugin-mdx": "^2.0.5", - "eslint-plugin-react": "^7.32.2", + "eslint-plugin-react": "^7.33.2", "json-schema-to-typescript": "^13.1.1", "mustache": "^4.2.0", "null-loader": "^4.0.0", @@ -4172,6 +4172,19 @@ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array-flatten": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", @@ -4235,11 +4248,40 @@ "get-intrinsic": "^1.1.3" } }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.1.tgz", + "integrity": "sha512-09x0ZWFEjj4WD8PDbykUwo3t9arLn8NIzmmYEJFpYekOAQjpkGSyrQhNoRTcwwcFRu+ycWF78QZ63oWTqSjBcw==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "get-intrinsic": "^1.2.1", + "is-array-buffer": "^3.0.2", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==" }, + "node_modules/asynciterator.prototype": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/asynciterator.prototype/-/asynciterator.prototype-1.0.0.tgz", + "integrity": "sha512-wwHYEIS0Q80f5mosx3L/dfG5t5rjEa9Ft51GTaNt862EnpyGHpgz2RkZvLPp1oF5TnAiTohkEKVEu8pQPJI7Vg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.3" + } + }, "node_modules/at-least-node": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", @@ -4280,6 +4322,18 @@ "postcss": "^8.1.0" } }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/axios": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", @@ -5750,9 +5804,9 @@ } }, "node_modules/define-properties": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", - "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", "dependencies": { "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" @@ -6100,35 +6154,50 @@ } }, "node_modules/es-abstract": { - "version": "1.20.4", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.4.tgz", - "integrity": "sha512-0UtvRN79eMe2L+UNEF1BwRe364sj/DXhQ/k5FmivgoSdpM90b8Jc0mDzKMGo7QS0BVbOP/bTwBKNnDc9rNzaPA==", + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.1.tgz", + "integrity": "sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw==", "dev": true, "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "arraybuffer.prototype.slice": "^1.0.1", + "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.1.3", + "get-intrinsic": "^1.2.1", "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", "has": "^1.0.3", "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", "has-symbols": "^1.0.3", - "internal-slot": "^1.0.3", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", "is-callable": "^1.2.7", "is-negative-zero": "^2.0.2", "is-regex": "^1.1.4", "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", + "is-typed-array": "^1.1.10", "is-weakref": "^1.0.2", - "object-inspect": "^1.12.2", + "object-inspect": "^1.12.3", "object-keys": "^1.1.1", "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.4.3", + "regexp.prototype.flags": "^1.5.0", + "safe-array-concat": "^1.0.0", "safe-regex-test": "^1.0.0", - "string.prototype.trimend": "^1.0.5", - "string.prototype.trimstart": "^1.0.5", - "unbox-primitive": "^1.0.2" + "string.prototype.trim": "^1.2.7", + "string.prototype.trimend": "^1.0.6", + "string.prototype.trimstart": "^1.0.6", + "typed-array-buffer": "^1.0.0", + "typed-array-byte-length": "^1.0.0", + "typed-array-byte-offset": "^1.0.0", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.10" }, "engines": { "node": ">= 0.4" @@ -6137,11 +6206,47 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es-iterator-helpers": { + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.14.tgz", + "integrity": "sha512-JgtVnwiuoRuzLvqelrvN3Xu7H9bu2ap/kQ2CrM62iidP8SKuD99rWU3CJy++s7IVL2qb/AjXPGR/E7i9ngd/Cw==", + "dev": true, + "dependencies": { + "asynciterator.prototype": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-set-tostringtag": "^2.0.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.2.1", + "globalthis": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.5", + "iterator.prototype": "^1.1.0", + "safe-array-concat": "^1.0.0" + } + }, "node_modules/es-module-lexer": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.2.1.tgz", "integrity": "sha512-9978wrXM50Y4rTMmW5kXIC09ZdXQZqkE4mxhwkd8VbzsGkXGPgV4zWuqQJgCEzYngdo2dYDa0l8xhX4fkSwJSg==" }, + "node_modules/es-set-tostringtag": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", + "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-shim-unscopables": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", @@ -6754,15 +6859,16 @@ } }, "node_modules/eslint-plugin-react": { - "version": "7.32.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.32.2.tgz", - "integrity": "sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg==", + "version": "7.33.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.33.2.tgz", + "integrity": "sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw==", "dev": true, "dependencies": { "array-includes": "^3.1.6", "array.prototype.flatmap": "^1.3.1", "array.prototype.tosorted": "^1.1.1", "doctrine": "^2.1.0", + "es-iterator-helpers": "^1.0.12", "estraverse": "^5.3.0", "jsx-ast-utils": "^2.4.1 || ^3.0.0", "minimatch": "^3.1.2", @@ -6772,7 +6878,7 @@ "object.values": "^1.1.6", "prop-types": "^15.8.1", "resolve": "^2.0.0-next.4", - "semver": "^6.3.0", + "semver": "^6.3.1", "string.prototype.matchall": "^4.0.8" }, "engines": { @@ -7454,6 +7560,15 @@ } } }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, "node_modules/fork-ts-checker-webpack-plugin": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.5.2.tgz", @@ -7651,12 +7766,13 @@ } }, "node_modules/get-intrinsic": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", - "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "dependencies": { "function-bind": "^1.1.1", "has": "^1.0.3", + "has-proto": "^1.0.1", "has-symbols": "^1.0.3" }, "funding": { @@ -7831,6 +7947,21 @@ "node": ">=4" } }, + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/globalyzer": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz", @@ -7862,6 +7993,18 @@ "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==", "dev": true }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/got": { "version": "9.6.0", "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", @@ -7986,6 +8129,17 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", @@ -8553,12 +8707,12 @@ "integrity": "sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==" }, "node_modules/internal-slot": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", - "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", + "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", "dev": true, "dependencies": { - "get-intrinsic": "^1.1.0", + "get-intrinsic": "^1.2.0", "has": "^1.0.3", "side-channel": "^1.0.4" }, @@ -8612,11 +8766,40 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" }, + "node_modules/is-async-function": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.0.0.tgz", + "integrity": "sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-bigint": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", @@ -8771,6 +8954,18 @@ "node": ">=0.10.0" } }, + "node_modules/is-finalizationregistry": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.0.2.tgz", + "integrity": "sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -8779,6 +8974,21 @@ "node": ">=8" } }, + "node_modules/is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -8814,6 +9024,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", + "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-negative-zero": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", @@ -8941,6 +9160,15 @@ "node": ">=6" } }, + "node_modules/is-set": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz", + "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-shared-array-buffer": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", @@ -8994,11 +9222,35 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-typed-array": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", + "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "dev": true, + "dependencies": { + "which-typed-array": "^1.1.11" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" }, + "node_modules/is-weakmap": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz", + "integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-weakref": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", @@ -9011,6 +9263,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-weakset": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.2.tgz", + "integrity": "sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-whitespace-character": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.4.tgz", @@ -9063,6 +9328,18 @@ "node": ">=0.10.0" } }, + "node_modules/iterator.prototype": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.1.tgz", + "integrity": "sha512-9E+nePc8C9cnQldmNl6bgpTY6zI4OPRZd97fhJ/iVZ1GifIUDVV5F6x1nEDqpe8KaMEZGT4xgrwKQDxXnjOIZQ==", + "dev": true, + "dependencies": { + "define-properties": "^1.2.0", + "get-intrinsic": "^1.2.1", + "has-symbols": "^1.0.3", + "reflect.getprototypeof": "^1.0.3" + } + }, "node_modules/jest-util": { "version": "29.2.1", "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.2.1.tgz", @@ -11088,9 +11365,9 @@ } }, "node_modules/object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -12794,6 +13071,26 @@ "node": ">=6.0.0" } }, + "node_modules/reflect.getprototypeof": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.4.tgz", + "integrity": "sha512-ECkTw8TmJwW60lOTR+ZkODISW6RQ8+2CL3COqtiJKLd6MmB45hN51HprHFziKLGkAuTGQhBb91V8cy+KHlaCjw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", + "globalthis": "^1.0.3", + "which-builtin-type": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", @@ -12824,14 +13121,14 @@ } }, "node_modules/regexp.prototype.flags": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", - "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", + "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "functions-have-names": "^1.2.2" + "define-properties": "^1.2.0", + "functions-have-names": "^1.2.3" }, "engines": { "node": ">= 0.4" @@ -13424,6 +13721,30 @@ "node": ">=6" } }, + "node_modules/safe-array-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.0.tgz", + "integrity": "sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-array-concat/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -14063,29 +14384,46 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/string.prototype.trim": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", + "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/string.prototype.trimend": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", - "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", + "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", - "es-abstract": "^1.19.5" + "es-abstract": "^1.20.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/string.prototype.trimstart": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", - "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", + "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", - "es-abstract": "^1.19.5" + "es-abstract": "^1.20.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -14619,18 +14957,83 @@ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "engines": { - "node": ">= 0.6" + "node": ">= 0.6" + } + }, + "node_modules/type-is/node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typed-array-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", + "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", + "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", + "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/type-is/node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "node_modules/typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, "dependencies": { - "mime-db": "1.52.0" + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" }, - "engines": { - "node": ">= 0.6" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/typedarray-to-buffer": { @@ -15839,6 +16242,72 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/which-builtin-type": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.3.tgz", + "integrity": "sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==", + "dev": true, + "dependencies": { + "function.prototype.name": "^1.1.5", + "has-tostringtag": "^1.0.0", + "is-async-function": "^2.0.0", + "is-date-object": "^1.0.5", + "is-finalizationregistry": "^1.0.2", + "is-generator-function": "^1.0.10", + "is-regex": "^1.1.4", + "is-weakref": "^1.0.2", + "isarray": "^2.0.5", + "which-boxed-primitive": "^1.0.2", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.9" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-builtin-type/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, + "node_modules/which-collection": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz", + "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==", + "dev": true, + "dependencies": { + "is-map": "^2.0.1", + "is-set": "^2.0.1", + "is-weakmap": "^2.0.1", + "is-weakset": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz", + "integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/widest-line": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz", @@ -19070,6 +19539,16 @@ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, + "array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + } + }, "array-flatten": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", @@ -19118,11 +19597,34 @@ "get-intrinsic": "^1.1.3" } }, + "arraybuffer.prototype.slice": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.1.tgz", + "integrity": "sha512-09x0ZWFEjj4WD8PDbykUwo3t9arLn8NIzmmYEJFpYekOAQjpkGSyrQhNoRTcwwcFRu+ycWF78QZ63oWTqSjBcw==", + "dev": true, + "requires": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "get-intrinsic": "^1.2.1", + "is-array-buffer": "^3.0.2", + "is-shared-array-buffer": "^1.0.2" + } + }, "asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==" }, + "asynciterator.prototype": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/asynciterator.prototype/-/asynciterator.prototype-1.0.0.tgz", + "integrity": "sha512-wwHYEIS0Q80f5mosx3L/dfG5t5rjEa9Ft51GTaNt862EnpyGHpgz2RkZvLPp1oF5TnAiTohkEKVEu8pQPJI7Vg==", + "dev": true, + "requires": { + "has-symbols": "^1.0.3" + } + }, "at-least-node": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", @@ -19141,6 +19643,12 @@ "postcss-value-parser": "^4.2.0" } }, + "available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true + }, "axios": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", @@ -20186,9 +20694,9 @@ "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==" }, "define-properties": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", - "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", "requires": { "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" @@ -20448,35 +20956,72 @@ } }, "es-abstract": { - "version": "1.20.4", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.4.tgz", - "integrity": "sha512-0UtvRN79eMe2L+UNEF1BwRe364sj/DXhQ/k5FmivgoSdpM90b8Jc0mDzKMGo7QS0BVbOP/bTwBKNnDc9rNzaPA==", + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.1.tgz", + "integrity": "sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw==", "dev": true, "requires": { + "array-buffer-byte-length": "^1.0.0", + "arraybuffer.prototype.slice": "^1.0.1", + "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.1.3", + "get-intrinsic": "^1.2.1", "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", "has": "^1.0.3", "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", "has-symbols": "^1.0.3", - "internal-slot": "^1.0.3", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", "is-callable": "^1.2.7", "is-negative-zero": "^2.0.2", "is-regex": "^1.1.4", "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", + "is-typed-array": "^1.1.10", "is-weakref": "^1.0.2", - "object-inspect": "^1.12.2", + "object-inspect": "^1.12.3", "object-keys": "^1.1.1", "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.4.3", + "regexp.prototype.flags": "^1.5.0", + "safe-array-concat": "^1.0.0", "safe-regex-test": "^1.0.0", - "string.prototype.trimend": "^1.0.5", - "string.prototype.trimstart": "^1.0.5", - "unbox-primitive": "^1.0.2" + "string.prototype.trim": "^1.2.7", + "string.prototype.trimend": "^1.0.6", + "string.prototype.trimstart": "^1.0.6", + "typed-array-buffer": "^1.0.0", + "typed-array-byte-length": "^1.0.0", + "typed-array-byte-offset": "^1.0.0", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.10" + } + }, + "es-iterator-helpers": { + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.14.tgz", + "integrity": "sha512-JgtVnwiuoRuzLvqelrvN3Xu7H9bu2ap/kQ2CrM62iidP8SKuD99rWU3CJy++s7IVL2qb/AjXPGR/E7i9ngd/Cw==", + "dev": true, + "requires": { + "asynciterator.prototype": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-set-tostringtag": "^2.0.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.2.1", + "globalthis": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.5", + "iterator.prototype": "^1.1.0", + "safe-array-concat": "^1.0.0" } }, "es-module-lexer": { @@ -20484,6 +21029,17 @@ "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.2.1.tgz", "integrity": "sha512-9978wrXM50Y4rTMmW5kXIC09ZdXQZqkE4mxhwkd8VbzsGkXGPgV4zWuqQJgCEzYngdo2dYDa0l8xhX4fkSwJSg==" }, + "es-set-tostringtag": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", + "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "has-tostringtag": "^1.0.0" + } + }, "es-shim-unscopables": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", @@ -20956,15 +21512,16 @@ } }, "eslint-plugin-react": { - "version": "7.32.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.32.2.tgz", - "integrity": "sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg==", + "version": "7.33.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.33.2.tgz", + "integrity": "sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw==", "dev": true, "requires": { "array-includes": "^3.1.6", "array.prototype.flatmap": "^1.3.1", "array.prototype.tosorted": "^1.1.1", "doctrine": "^2.1.0", + "es-iterator-helpers": "^1.0.12", "estraverse": "^5.3.0", "jsx-ast-utils": "^2.4.1 || ^3.0.0", "minimatch": "^3.1.2", @@ -20974,7 +21531,7 @@ "object.values": "^1.1.6", "prop-types": "^15.8.1", "resolve": "^2.0.0-next.4", - "semver": "^6.3.0", + "semver": "^6.3.1", "string.prototype.matchall": "^4.0.8" }, "dependencies": { @@ -21457,6 +22014,15 @@ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" }, + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "requires": { + "is-callable": "^1.1.3" + } + }, "fork-ts-checker-webpack-plugin": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.5.2.tgz", @@ -21587,12 +22153,13 @@ "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==" }, "get-intrinsic": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", - "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "requires": { "function-bind": "^1.1.1", "has": "^1.0.3", + "has-proto": "^1.0.1", "has-symbols": "^1.0.3" } }, @@ -21713,6 +22280,15 @@ "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" }, + "globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3" + } + }, "globalyzer": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz", @@ -21738,6 +22314,15 @@ "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==", "dev": true }, + "gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.3" + } + }, "got": { "version": "9.6.0", "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", @@ -21837,6 +22422,11 @@ "get-intrinsic": "^1.1.1" } }, + "has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==" + }, "has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", @@ -22255,12 +22845,12 @@ "integrity": "sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==" }, "internal-slot": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", - "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", + "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", "dev": true, "requires": { - "get-intrinsic": "^1.1.0", + "get-intrinsic": "^1.2.0", "has": "^1.0.3", "side-channel": "^1.0.4" } @@ -22297,11 +22887,31 @@ "is-decimal": "^1.0.0" } }, + "is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + } + }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" }, + "is-async-function": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.0.0.tgz", + "integrity": "sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, "is-bigint": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", @@ -22392,11 +23002,29 @@ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==" }, + "is-finalizationregistry": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.0.2.tgz", + "integrity": "sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2" + } + }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, + "is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, "is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -22419,6 +23047,12 @@ "is-path-inside": "^3.0.2" } }, + "is-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", + "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==", + "dev": true + }, "is-negative-zero": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", @@ -22498,6 +23132,12 @@ "resolved": "https://registry.npmjs.org/is-root/-/is-root-2.1.0.tgz", "integrity": "sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg==" }, + "is-set": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz", + "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==", + "dev": true + }, "is-shared-array-buffer": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", @@ -22530,11 +23170,26 @@ "has-symbols": "^1.0.2" } }, + "is-typed-array": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", + "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "dev": true, + "requires": { + "which-typed-array": "^1.1.11" + } + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" }, + "is-weakmap": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz", + "integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==", + "dev": true + }, "is-weakref": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", @@ -22544,6 +23199,16 @@ "call-bind": "^1.0.2" } }, + "is-weakset": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.2.tgz", + "integrity": "sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + } + }, "is-whitespace-character": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.4.tgz", @@ -22582,6 +23247,18 @@ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==" }, + "iterator.prototype": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.1.tgz", + "integrity": "sha512-9E+nePc8C9cnQldmNl6bgpTY6zI4OPRZd97fhJ/iVZ1GifIUDVV5F6x1nEDqpe8KaMEZGT4xgrwKQDxXnjOIZQ==", + "dev": true, + "requires": { + "define-properties": "^1.2.0", + "get-intrinsic": "^1.2.1", + "has-symbols": "^1.0.3", + "reflect.getprototypeof": "^1.0.3" + } + }, "jest-util": { "version": "29.2.1", "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.2.1.tgz", @@ -23966,9 +24643,9 @@ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==" }, "object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==" + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==" }, "object-keys": { "version": "1.1.1", @@ -25142,6 +25819,20 @@ "minimatch": "^3.0.5" } }, + "reflect.getprototypeof": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.4.tgz", + "integrity": "sha512-ECkTw8TmJwW60lOTR+ZkODISW6RQ8+2CL3COqtiJKLd6MmB45hN51HprHFziKLGkAuTGQhBb91V8cy+KHlaCjw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", + "globalthis": "^1.0.3", + "which-builtin-type": "^1.1.3" + } + }, "regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", @@ -25169,14 +25860,14 @@ } }, "regexp.prototype.flags": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", - "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", + "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", "dev": true, "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "functions-have-names": "^1.2.2" + "define-properties": "^1.2.0", + "functions-have-names": "^1.2.3" } }, "regexpu-core": { @@ -25608,6 +26299,26 @@ "mri": "^1.1.0" } }, + "safe-array-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.0.tgz", + "integrity": "sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "dependencies": { + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + } + } + }, "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -26111,26 +26822,37 @@ "side-channel": "^1.0.4" } }, + "string.prototype.trim": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", + "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + } + }, "string.prototype.trimend": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", - "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", + "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", "dev": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", - "es-abstract": "^1.19.5" + "es-abstract": "^1.20.4" } }, "string.prototype.trimstart": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", - "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", + "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", "dev": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", - "es-abstract": "^1.19.5" + "es-abstract": "^1.20.4" } }, "stringify-entities": { @@ -26520,6 +27242,53 @@ } } }, + "typed-array-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", + "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "is-typed-array": "^1.1.10" + } + }, + "typed-array-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", + "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + } + }, + "typed-array-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", + "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "dev": true, + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + } + }, + "typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + } + }, "typedarray-to-buffer": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", @@ -27339,6 +28108,59 @@ "is-symbol": "^1.0.3" } }, + "which-builtin-type": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.3.tgz", + "integrity": "sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==", + "dev": true, + "requires": { + "function.prototype.name": "^1.1.5", + "has-tostringtag": "^1.0.0", + "is-async-function": "^2.0.0", + "is-date-object": "^1.0.5", + "is-finalizationregistry": "^1.0.2", + "is-generator-function": "^1.0.10", + "is-regex": "^1.1.4", + "is-weakref": "^1.0.2", + "isarray": "^2.0.5", + "which-boxed-primitive": "^1.0.2", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.9" + }, + "dependencies": { + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + } + } + }, + "which-collection": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz", + "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==", + "dev": true, + "requires": { + "is-map": "^2.0.1", + "is-set": "^2.0.1", + "is-weakmap": "^2.0.1", + "is-weakset": "^2.0.1" + } + }, + "which-typed-array": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz", + "integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==", + "dev": true, + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + } + }, "widest-line": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz", diff --git a/docs/package.json b/docs/package.json index 9b38bef8b67..a3c3481d672 100644 --- a/docs/package.json +++ b/docs/package.json @@ -53,7 +53,7 @@ "eslint": "^8.39.0", "eslint-config-prettier": "^8.8.0", "eslint-plugin-mdx": "^2.0.5", - "eslint-plugin-react": "^7.32.2", + "eslint-plugin-react": "^7.33.2", "json-schema-to-typescript": "^13.1.1", "mustache": "^4.2.0", "null-loader": "^4.0.0", From 718500543b6d087ce8aac00caac173030b75be16 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Sat, 2 Sep 2023 01:45:12 -0700 Subject: [PATCH 17/26] feat(split): Use directed advertising. * Split centrals to scan with their identity so they receive direct advertising packets. * Split peripherals to use direct advertising if they have an existing bond to a split central. --- app/src/split/bluetooth/Kconfig | 1 + app/src/split/bluetooth/central.c | 4 ++- app/src/split/bluetooth/peripheral.c | 44 ++++++++++++++++++++++++++-- 3 files changed, 45 insertions(+), 4 deletions(-) diff --git a/app/src/split/bluetooth/Kconfig b/app/src/split/bluetooth/Kconfig index 0610b667a26..5919010ba31 100644 --- a/app/src/split/bluetooth/Kconfig +++ b/app/src/split/bluetooth/Kconfig @@ -14,6 +14,7 @@ config ZMK_SPLIT_ROLE_CENTRAL select BT_CENTRAL select BT_GATT_CLIENT select BT_GATT_AUTO_DISCOVER_CCC + select BT_SCAN_WITH_IDENTITY if ZMK_SPLIT_ROLE_CENTRAL diff --git a/app/src/split/bluetooth/central.c b/app/src/split/bluetooth/central.c index ccf1cc28ced..860e89a5f3e 100644 --- a/app/src/split/bluetooth/central.c +++ b/app/src/split/bluetooth/central.c @@ -511,8 +511,10 @@ static void split_central_device_found(const bt_addr_le_t *addr, int8_t rssi, ui LOG_DBG("[DEVICE]: %s, AD evt type %u, AD data len %u, RSSI %i", dev, type, ad->len, rssi); /* We're only interested in connectable events */ - if (type == BT_GAP_ADV_TYPE_ADV_IND || type == BT_GAP_ADV_TYPE_ADV_DIRECT_IND) { + if (type == BT_GAP_ADV_TYPE_ADV_IND) { bt_data_parse(ad, split_central_eir_parse, (void *)addr); + } else if (type == BT_GAP_ADV_TYPE_ADV_DIRECT_IND) { + split_central_eir_found(addr); } } diff --git a/app/src/split/bluetooth/peripheral.c b/app/src/split/bluetooth/peripheral.c index e053db8a61a..1d649f71221 100644 --- a/app/src/split/bluetooth/peripheral.c +++ b/app/src/split/bluetooth/peripheral.c @@ -43,15 +43,49 @@ static const struct bt_data zmk_ble_ad[] = { static bool is_connected = false; -static int start_advertising() { - return bt_le_adv_start(BT_LE_ADV_CONN, zmk_ble_ad, ARRAY_SIZE(zmk_ble_ad), NULL, 0); +static void each_bond(const struct bt_bond_info *info, void *user_data) { + bt_addr_le_t *addr = (bt_addr_le_t *)user_data; + + if (bt_addr_le_cmp(&info->addr, BT_ADDR_LE_NONE) != 0) { + bt_addr_le_copy(addr, &info->addr); + } +} + +static int start_advertising(bool low_duty) { + bt_addr_le_t central_addr = bt_addr_le_none; + + bt_foreach_bond(BT_ID_DEFAULT, each_bond, ¢ral_addr); + + if (bt_addr_le_cmp(¢ral_addr, BT_ADDR_LE_NONE) != 0) { + struct bt_le_adv_param adv_param = low_duty ? *BT_LE_ADV_CONN_DIR_LOW_DUTY(¢ral_addr) + : *BT_LE_ADV_CONN_DIR(¢ral_addr); + return bt_le_adv_start(&adv_param, NULL, 0, NULL, 0); + } else { + return bt_le_adv_start(BT_LE_ADV_CONN, zmk_ble_ad, ARRAY_SIZE(zmk_ble_ad), NULL, 0); + } }; +static bool low_duty_advertising = false; + +static void advertising_cb(struct k_work *work) { + const int err = start_advertising(low_duty_advertising); + if (err < 0) { + LOG_ERR("Failed to start advertising (%d)", err); + } +} + +K_WORK_DEFINE(advertising_work, advertising_cb); + static void connected(struct bt_conn *conn, uint8_t err) { is_connected = (err == 0); ZMK_EVENT_RAISE(new_zmk_split_peripheral_status_changed( (struct zmk_split_peripheral_status_changed){.connected = is_connected})); + + if (err == BT_HCI_ERR_ADV_TIMEOUT) { + low_duty_advertising = true; + k_work_submit(&advertising_work); + } } static void disconnected(struct bt_conn *conn, uint8_t reason) { @@ -65,6 +99,9 @@ static void disconnected(struct bt_conn *conn, uint8_t reason) { ZMK_EVENT_RAISE(new_zmk_split_peripheral_status_changed( (struct zmk_split_peripheral_status_changed){.connected = is_connected})); + + low_duty_advertising = false; + k_work_submit(&advertising_work); } static void security_changed(struct bt_conn *conn, bt_security_t level, enum bt_security_err err) { @@ -119,7 +156,8 @@ static int zmk_peripheral_ble_init(const struct device *_arg) { #else bt_conn_cb_register(&conn_callbacks); - start_advertising(); + low_duty_advertising = false; + k_work_submit(&advertising_work); #endif return 0; From 693875675fec96b46c687540ef46a17fa4132779 Mon Sep 17 00:00:00 2001 From: Nate Eagleson Date: Mon, 4 Sep 2023 19:59:59 -0400 Subject: [PATCH 18/26] fix(docs): Fix typo in caps-word.md (#1924) --- docs/docs/behaviors/caps-word.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/behaviors/caps-word.md b/docs/docs/behaviors/caps-word.md index e85d7ecae98..e5d862d785b 100644 --- a/docs/docs/behaviors/caps-word.md +++ b/docs/docs/behaviors/caps-word.md @@ -7,7 +7,7 @@ sidebar_label: Caps Word The caps word behavior behaves similar to a caps lock, but will automatically deactivate when any key not in a continue list is pressed, or if the caps word key is pressed again. For smaller keyboards using [mod-taps](/docs/behaviors/mod-tap), this can help avoid repeated alternating holds when typing words in all caps. -The modifiers are applied only to to the alphabetic (`A` to `Z`) keycodes, to avoid automatically appliying them to numeric values, etc. +The modifiers are applied only to to the alphabetic (`A` to `Z`) keycodes, to avoid automatically applying them to numeric values, etc. ### Behavior Binding From 8087fa3b2b8bb0590e7cf5de6d22b03acd9411a4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Sep 2023 05:12:55 +0000 Subject: [PATCH 19/26] chore(deps): bump @fortawesome/fontawesome-svg-core in /docs Bumps [@fortawesome/fontawesome-svg-core](https://github.com/FortAwesome/Font-Awesome) from 6.4.0 to 6.4.2. - [Release notes](https://github.com/FortAwesome/Font-Awesome/releases) - [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/6.x/CHANGELOG.md) - [Commits](https://github.com/FortAwesome/Font-Awesome/compare/6.4.0...6.4.2) --- updated-dependencies: - dependency-name: "@fortawesome/fontawesome-svg-core" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- docs/package-lock.json | 34 +++++++++++++++++++++++++--------- docs/package.json | 2 +- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/docs/package-lock.json b/docs/package-lock.json index ded7bf838cb..f17adc4bde9 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -10,7 +10,7 @@ "dependencies": { "@docusaurus/core": "^2.4.0", "@docusaurus/preset-classic": "^2.4.0", - "@fortawesome/fontawesome-svg-core": "^6.4.0", + "@fortawesome/fontawesome-svg-core": "^6.4.2", "@fortawesome/free-solid-svg-icons": "^6.4.0", "@fortawesome/react-fontawesome": "^0.2.0", "@mdx-js/react": "^1.6.22", @@ -2704,17 +2704,26 @@ } }, "node_modules/@fortawesome/fontawesome-svg-core": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.4.0.tgz", - "integrity": "sha512-Bertv8xOiVELz5raB2FlXDPKt+m94MQ3JgDfsVbrqNpLU9+UE2E18GKjLKw+d3XbeYPqg1pzyQKGsrzbw+pPaw==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.4.2.tgz", + "integrity": "sha512-gjYDSKv3TrM2sLTOKBc5rH9ckje8Wrwgx1CxAPbN5N3Fm4prfi7NsJVWd1jklp7i5uSCVwhZS5qlhMXqLrpAIg==", "hasInstallScript": true, "dependencies": { - "@fortawesome/fontawesome-common-types": "6.4.0" + "@fortawesome/fontawesome-common-types": "6.4.2" }, "engines": { "node": ">=6" } }, + "node_modules/@fortawesome/fontawesome-svg-core/node_modules/@fortawesome/fontawesome-common-types": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.4.2.tgz", + "integrity": "sha512-1DgP7f+XQIJbLFCTX1V2QnxVmpLdKdzzo2k8EmvDOePfchaIGQ9eCHj2up3/jNEbZuBqel5OxiaOJf37TWauRA==", + "hasInstallScript": true, + "engines": { + "node": ">=6" + } + }, "node_modules/@fortawesome/free-solid-svg-icons": { "version": "6.4.0", "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.4.0.tgz", @@ -18363,11 +18372,18 @@ "integrity": "sha512-HNii132xfomg5QVZw0HwXXpN22s7VBHQBv9CeOu9tfJnhsWQNd2lmTNi8CSrnw5B+5YOmzu1UoPAyxaXsJ6RgQ==" }, "@fortawesome/fontawesome-svg-core": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.4.0.tgz", - "integrity": "sha512-Bertv8xOiVELz5raB2FlXDPKt+m94MQ3JgDfsVbrqNpLU9+UE2E18GKjLKw+d3XbeYPqg1pzyQKGsrzbw+pPaw==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.4.2.tgz", + "integrity": "sha512-gjYDSKv3TrM2sLTOKBc5rH9ckje8Wrwgx1CxAPbN5N3Fm4prfi7NsJVWd1jklp7i5uSCVwhZS5qlhMXqLrpAIg==", "requires": { - "@fortawesome/fontawesome-common-types": "6.4.0" + "@fortawesome/fontawesome-common-types": "6.4.2" + }, + "dependencies": { + "@fortawesome/fontawesome-common-types": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.4.2.tgz", + "integrity": "sha512-1DgP7f+XQIJbLFCTX1V2QnxVmpLdKdzzo2k8EmvDOePfchaIGQ9eCHj2up3/jNEbZuBqel5OxiaOJf37TWauRA==" + } } }, "@fortawesome/free-solid-svg-icons": { diff --git a/docs/package.json b/docs/package.json index a3c3481d672..aa48af24d3c 100644 --- a/docs/package.json +++ b/docs/package.json @@ -17,7 +17,7 @@ "dependencies": { "@docusaurus/core": "^2.4.0", "@docusaurus/preset-classic": "^2.4.0", - "@fortawesome/fontawesome-svg-core": "^6.4.0", + "@fortawesome/fontawesome-svg-core": "^6.4.2", "@fortawesome/free-solid-svg-icons": "^6.4.0", "@fortawesome/react-fontawesome": "^0.2.0", "@mdx-js/react": "^1.6.22", From f442776fe2bea2a3644d0767a2cf1e975c6d9b38 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Sat, 10 Jun 2023 17:41:22 -0700 Subject: [PATCH 20/26] feat(docs): Detail logging and note extra useful options --- docs/docs/development/usb-logging.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/docs/development/usb-logging.md b/docs/docs/development/usb-logging.md index 9a2980ae6c8..87cd0e7d853 100644 --- a/docs/docs/development/usb-logging.md +++ b/docs/docs/development/usb-logging.md @@ -20,13 +20,16 @@ It is recommended to only enable logging when needed, and not leaving it on by d ## Kconfig -The `CONFIG_ZMK_USB_LOGGING` KConfig value needs to be set, either by copy and pasting into the `app/prj.conf` file, or by running -`west build -t menuconfig` and manually enabling the setting in that UI at `ZMK -> Advanced -> USB Logging`. +The `CONFIG_ZMK_USB_LOGGING` Kconfig enables USB logging. This can be set at the keyboard level, typically in the `config/.conf` +file if you are using a [user config repository](user-setup.md). It can also be enabled at the ZMK level using the `app/prj.conf` file, or other +search locations described in the [configuration overview](config/index.md#config-file-locations). + +Logging can be further configured using Kconfig described in [the Zephyr documentation](https://docs.zephyrproject.org/3.2.0/services/logging/index.html). +For instance, setting `CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS` to a large value such as `8000` might help catch issues that happen near keyboard +boot, before you can connect to view the logs. :::note -If you are debugging your own keyboard in your [user config repository](user-setup.md), use -`config/boards/shields//.conf` instead of `app/prj.conf`. In Github -Actions, you can search the `Kconfig file` build log to verify the options above have been enabled +In Github Actions, you can check the ` Kconfig file` step output to verify the options above have been enabled for you successfully. ::: From 7f9e9f8c64f3128c2c3e7af3f22ced665fe1b873 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Tue, 5 Sep 2023 22:23:44 -0700 Subject: [PATCH 21/26] fix(boards): Disable QSPI for Xiao BLE The GD25Q16 flash connected via QSPI seems to be causing issues with excessive battery use and inability to sleep. Since ZMK doesn't use it, disable it. Resolves #1901 --- app/boards/seeeduino_xiao_ble.overlay | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/boards/seeeduino_xiao_ble.overlay b/app/boards/seeeduino_xiao_ble.overlay index 51671a803b4..e6a5b62c738 100644 --- a/app/boards/seeeduino_xiao_ble.overlay +++ b/app/boards/seeeduino_xiao_ble.overlay @@ -32,3 +32,6 @@ }; }; +&qspi { + status = "disabled"; +}; From eaeea4bdfa2d67c7faea8e5f77b638723ebfe5e9 Mon Sep 17 00:00:00 2001 From: Jeppe Klitgaard Date: Tue, 12 Sep 2023 08:32:09 +0200 Subject: [PATCH 22/26] feat(docs): Add missing `&kp` tip for `devicetree_unfixed.h` error --- docs/docs/troubleshooting.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/docs/troubleshooting.md b/docs/docs/troubleshooting.md index d47671bce36..1418f327feb 100644 --- a/docs/docs/troubleshooting.md +++ b/docs/docs/troubleshooting.md @@ -58,10 +58,14 @@ A `devicetree_unfixed.h` error that follows with an "undeclared here" string ind In this example, the error string `DT_N_S_keymap_S_symbol_layer_P_bindings_IDX_12_PH_P_label` indicates a problem with the key binding in position `12` in the `symbol_layer` of the keymap. -:::note +:::info Key positions are numbered starting from `0` at the top left key on the keymap, incrementing horizontally, row by row. ::: +:::tip +A common mistake that leads to this error is to use [key press keycodes](behaviors/key-press.md) without the leading `&kp` binding. That is, having entries such as `SPACE` that should have been `&kp SPACE`. +::: + ### Split Keyboard Halves Unable to Pair Split keyboard halves pairing issue can be resolved by flashing a settings reset firmware to both controllers. You will first need to acquire the reset UF2 image file with one of the following options: From 690bc1bb44b1b62228900906cb308dc6f1a05eb8 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Sat, 2 Sep 2023 20:07:31 -0700 Subject: [PATCH 23/26] refactor: Move drivers into properly module. * Align our driver module layout to properly match Zephyr conventions, allowing proper CMake setup to amend the library for each type of driver. --- app/CMakeLists.txt | 2 +- app/Kconfig | 10 +++++++--- app/drivers/CMakeLists.txt | 7 ------- app/drivers/display/CMakeLists.txt | 4 ---- app/include/dt-bindings/zmk/kscan-mock.h | 9 --------- app/module/CMakeLists.txt | 3 +++ app/module/Kconfig | 2 ++ app/module/drivers/CMakeLists.txt | 7 +++++++ app/{ => module}/drivers/Kconfig | 0 app/module/drivers/display/CMakeLists.txt | 6 ++++++ app/{ => module}/drivers/display/Kconfig | 6 +++++- app/{ => module}/drivers/display/Kconfig.il0323 | 0 app/{ => module}/drivers/display/il0323.c | 0 app/{ => module}/drivers/display/il0323_regs.h | 0 app/{ => module}/drivers/gpio/CMakeLists.txt | 3 +-- app/{ => module}/drivers/gpio/Kconfig | 6 ++++-- app/{ => module}/drivers/gpio/Kconfig.595 | 1 - app/{ => module}/drivers/gpio/Kconfig.max7318 | 1 - app/{ => module}/drivers/gpio/gpio_595.c | 0 app/{ => module}/drivers/gpio/gpio_max7318.c | 0 app/{ => module}/drivers/kscan/CMakeLists.txt | 3 +-- app/{ => module}/drivers/kscan/Kconfig | 14 +++++++++----- app/{ => module}/drivers/kscan/debounce.c | 0 app/{ => module}/drivers/kscan/debounce.h | 0 app/{ => module}/drivers/kscan/kscan_composite.c | 0 app/{ => module}/drivers/kscan/kscan_gpio.c | 0 app/{ => module}/drivers/kscan/kscan_gpio.h | 0 app/{ => module}/drivers/kscan/kscan_gpio_demux.c | 0 app/{ => module}/drivers/kscan/kscan_gpio_direct.c | 0 app/{ => module}/drivers/kscan/kscan_gpio_matrix.c | 0 app/{ => module}/drivers/kscan/kscan_mock.c | 0 app/{ => module}/drivers/sensor/CMakeLists.txt | 0 app/{ => module}/drivers/sensor/Kconfig | 6 +++++- .../drivers/sensor/battery/CMakeLists.txt | 0 app/{ => module}/drivers/sensor/battery/Kconfig | 0 .../drivers/sensor/battery/battery_common.c | 0 .../drivers/sensor/battery/battery_common.h | 0 .../drivers/sensor/battery/battery_nrf_vddh.c | 0 .../sensor/battery/battery_voltage_divider.c | 0 .../drivers/sensor/ec11/CMakeLists.txt | 0 app/{ => module}/drivers/sensor/ec11/Kconfig | 0 app/{ => module}/drivers/sensor/ec11/ec11.c | 0 app/{ => module}/drivers/sensor/ec11/ec11.h | 0 .../drivers/sensor/ec11/ec11_trigger.c | 0 .../dts/bindings/display/gooddisplay,il0323.yaml | 0 .../dts/bindings/gpio/maxim,max7318.yaml | 0 .../dts/bindings/gpio/zmk,gpio-595.yaml | 0 .../dts/bindings/kscan/zmk,kscan-gpio-demux.yaml | 0 .../dts/bindings/kscan/zmk,kscan-gpio-direct.yaml | 0 .../dts/bindings/kscan/zmk,kscan-gpio-matrix.yaml | 0 .../dts/bindings/sensor/alps,ec11.yaml | 0 .../dts/bindings/sensor/zmk,battery-nrf-vddh.yaml | 0 .../sensor/zmk,battery-voltage-divider.yaml | 0 .../include/dt-bindings/zmk/kscan_mock.h | 0 app/{drivers => module}/zephyr/module.yml | 2 ++ 55 files changed, 53 insertions(+), 39 deletions(-) delete mode 100644 app/drivers/CMakeLists.txt delete mode 100644 app/drivers/display/CMakeLists.txt delete mode 100644 app/include/dt-bindings/zmk/kscan-mock.h create mode 100644 app/module/CMakeLists.txt create mode 100644 app/module/Kconfig create mode 100644 app/module/drivers/CMakeLists.txt rename app/{ => module}/drivers/Kconfig (100%) create mode 100644 app/module/drivers/display/CMakeLists.txt rename app/{ => module}/drivers/display/Kconfig (58%) rename app/{ => module}/drivers/display/Kconfig.il0323 (100%) rename app/{ => module}/drivers/display/il0323.c (100%) rename app/{ => module}/drivers/display/il0323_regs.h (100%) rename app/{ => module}/drivers/gpio/CMakeLists.txt (65%) rename app/{ => module}/drivers/gpio/Kconfig (52%) rename app/{ => module}/drivers/gpio/Kconfig.595 (95%) rename app/{ => module}/drivers/gpio/Kconfig.max7318 (95%) rename app/{ => module}/drivers/gpio/gpio_595.c (100%) rename app/{ => module}/drivers/gpio/gpio_max7318.c (100%) rename app/{ => module}/drivers/kscan/CMakeLists.txt (85%) rename app/{ => module}/drivers/kscan/Kconfig (94%) rename app/{ => module}/drivers/kscan/debounce.c (100%) rename app/{ => module}/drivers/kscan/debounce.h (100%) rename app/{ => module}/drivers/kscan/kscan_composite.c (100%) rename app/{ => module}/drivers/kscan/kscan_gpio.c (100%) rename app/{ => module}/drivers/kscan/kscan_gpio.h (100%) rename app/{ => module}/drivers/kscan/kscan_gpio_demux.c (100%) rename app/{ => module}/drivers/kscan/kscan_gpio_direct.c (100%) rename app/{ => module}/drivers/kscan/kscan_gpio_matrix.c (100%) rename app/{ => module}/drivers/kscan/kscan_mock.c (100%) rename app/{ => module}/drivers/sensor/CMakeLists.txt (100%) rename app/{ => module}/drivers/sensor/Kconfig (67%) rename app/{ => module}/drivers/sensor/battery/CMakeLists.txt (100%) rename app/{ => module}/drivers/sensor/battery/Kconfig (100%) rename app/{ => module}/drivers/sensor/battery/battery_common.c (100%) rename app/{ => module}/drivers/sensor/battery/battery_common.h (100%) rename app/{ => module}/drivers/sensor/battery/battery_nrf_vddh.c (100%) rename app/{ => module}/drivers/sensor/battery/battery_voltage_divider.c (100%) rename app/{ => module}/drivers/sensor/ec11/CMakeLists.txt (100%) rename app/{ => module}/drivers/sensor/ec11/Kconfig (100%) rename app/{ => module}/drivers/sensor/ec11/ec11.c (100%) rename app/{ => module}/drivers/sensor/ec11/ec11.h (100%) rename app/{ => module}/drivers/sensor/ec11/ec11_trigger.c (100%) rename app/{ => module}/dts/bindings/display/gooddisplay,il0323.yaml (100%) rename app/{drivers/zephyr => module}/dts/bindings/gpio/maxim,max7318.yaml (100%) rename app/{drivers/zephyr => module}/dts/bindings/gpio/zmk,gpio-595.yaml (100%) rename app/{drivers/zephyr => module}/dts/bindings/kscan/zmk,kscan-gpio-demux.yaml (100%) rename app/{drivers/zephyr => module}/dts/bindings/kscan/zmk,kscan-gpio-direct.yaml (100%) rename app/{drivers/zephyr => module}/dts/bindings/kscan/zmk,kscan-gpio-matrix.yaml (100%) rename app/{drivers/zephyr => module}/dts/bindings/sensor/alps,ec11.yaml (100%) rename app/{drivers/zephyr => module}/dts/bindings/sensor/zmk,battery-nrf-vddh.yaml (100%) rename app/{drivers/zephyr => module}/dts/bindings/sensor/zmk,battery-voltage-divider.yaml (100%) rename app/{ => module}/include/dt-bindings/zmk/kscan_mock.h (100%) rename app/{drivers => module}/zephyr/module.yml (56%) diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index efa349052cf..29944753f80 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -8,7 +8,7 @@ list(APPEND DTS_ROOT ${CMAKE_SOURCE_DIR}/drivers/zephyr) set(ZephyrBuildConfiguration_ROOT ${CMAKE_SOURCE_DIR}/cmake) list(APPEND ZEPHYR_EXTRA_MODULES - ${CMAKE_CURRENT_SOURCE_DIR}/drivers + ${CMAKE_CURRENT_SOURCE_DIR}/module ) # Find Zephyr. This also loads Zephyr's build system. diff --git a/app/Kconfig b/app/Kconfig index 89a128b5a27..0dd9316a2a7 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -403,14 +403,18 @@ endif #Initialization Priorities endmenu -menu "KSCAN Settings" +menuconfig ZMK_KSCAN + bool "ZMK KScan Integration" + default y + select KSCAN + +if ZMK_KSCAN config ZMK_KSCAN_EVENT_QUEUE_SIZE int "Size of the event queue for KSCAN events to buffer events" default 4 -#KSCAN Settings -endmenu +endif # ZMK_KSCAN menu "Logging" diff --git a/app/drivers/CMakeLists.txt b/app/drivers/CMakeLists.txt deleted file mode 100644 index 44d69ac37a2..00000000000 --- a/app/drivers/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright (c) 2020 The ZMK Contributors -# SPDX-License-Identifier: MIT - -add_subdirectory_ifdef(CONFIG_ZMK_DRIVERS_GPIO gpio) -add_subdirectory(kscan) -add_subdirectory(sensor) -add_subdirectory(display) diff --git a/app/drivers/display/CMakeLists.txt b/app/drivers/display/CMakeLists.txt deleted file mode 100644 index d5e83c1dc4e..00000000000 --- a/app/drivers/display/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -# Copyright (c) 2021 The ZMK Contributors -# SPDX-License-Identifier: MIT - -zephyr_sources_ifdef(CONFIG_IL0323 il0323.c) \ No newline at end of file diff --git a/app/include/dt-bindings/zmk/kscan-mock.h b/app/include/dt-bindings/zmk/kscan-mock.h deleted file mode 100644 index 4ed666c61ca..00000000000 --- a/app/include/dt-bindings/zmk/kscan-mock.h +++ /dev/null @@ -1,9 +0,0 @@ -/* - * Copyright (c) 2020 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ - -#warning "kscan-mock.h has been deprecated and superseded by kscan_mock.h" - -#include "kscan_mock.h" \ No newline at end of file diff --git a/app/module/CMakeLists.txt b/app/module/CMakeLists.txt new file mode 100644 index 00000000000..1c140d33d4a --- /dev/null +++ b/app/module/CMakeLists.txt @@ -0,0 +1,3 @@ +zephyr_include_directories(include) + +add_subdirectory(drivers) \ No newline at end of file diff --git a/app/module/Kconfig b/app/module/Kconfig new file mode 100644 index 00000000000..cb2ae20cd7c --- /dev/null +++ b/app/module/Kconfig @@ -0,0 +1,2 @@ + +rsource "drivers/Kconfig" \ No newline at end of file diff --git a/app/module/drivers/CMakeLists.txt b/app/module/drivers/CMakeLists.txt new file mode 100644 index 00000000000..5281c3dcb21 --- /dev/null +++ b/app/module/drivers/CMakeLists.txt @@ -0,0 +1,7 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +add_subdirectory_ifdef(CONFIG_GPIO gpio) +add_subdirectory_ifdef(CONFIG_KSCAN kscan) +add_subdirectory_ifdef(CONFIG_SENSOR sensor) +add_subdirectory_ifdef(CONFIG_DISPLAY display) diff --git a/app/drivers/Kconfig b/app/module/drivers/Kconfig similarity index 100% rename from app/drivers/Kconfig rename to app/module/drivers/Kconfig diff --git a/app/module/drivers/display/CMakeLists.txt b/app/module/drivers/display/CMakeLists.txt new file mode 100644 index 00000000000..6fc98c95a9d --- /dev/null +++ b/app/module/drivers/display/CMakeLists.txt @@ -0,0 +1,6 @@ +# Copyright (c) 2021 The ZMK Contributors +# SPDX-License-Identifier: MIT + +zephyr_library_amend() + +zephyr_library_sources_ifdef(CONFIG_IL0323 il0323.c) \ No newline at end of file diff --git a/app/drivers/display/Kconfig b/app/module/drivers/display/Kconfig similarity index 58% rename from app/drivers/display/Kconfig rename to app/module/drivers/display/Kconfig index efa064d4f6b..d70aff7c40a 100644 --- a/app/drivers/display/Kconfig +++ b/app/module/drivers/display/Kconfig @@ -1,4 +1,8 @@ # Copyright (c) 2021 The ZMK Contributors # SPDX-License-Identifier: MIT -rsource "Kconfig.il0323" \ No newline at end of file +if DISPLAY + +rsource "Kconfig.il0323" + +endif # DISPLAY \ No newline at end of file diff --git a/app/drivers/display/Kconfig.il0323 b/app/module/drivers/display/Kconfig.il0323 similarity index 100% rename from app/drivers/display/Kconfig.il0323 rename to app/module/drivers/display/Kconfig.il0323 diff --git a/app/drivers/display/il0323.c b/app/module/drivers/display/il0323.c similarity index 100% rename from app/drivers/display/il0323.c rename to app/module/drivers/display/il0323.c diff --git a/app/drivers/display/il0323_regs.h b/app/module/drivers/display/il0323_regs.h similarity index 100% rename from app/drivers/display/il0323_regs.h rename to app/module/drivers/display/il0323_regs.h diff --git a/app/drivers/gpio/CMakeLists.txt b/app/module/drivers/gpio/CMakeLists.txt similarity index 65% rename from app/drivers/gpio/CMakeLists.txt rename to app/module/drivers/gpio/CMakeLists.txt index 0756ed386b4..b5647e87bd7 100644 --- a/app/drivers/gpio/CMakeLists.txt +++ b/app/module/drivers/gpio/CMakeLists.txt @@ -1,8 +1,7 @@ # Copyright (c) 2022 The ZMK Contributors # SPDX-License-Identifier: MIT -zephyr_library_named(zmk__drivers__gpio) -zephyr_library_include_directories(${CMAKE_SOURCE_DIR}/include) +zephyr_library_amend() zephyr_library_sources_ifdef(CONFIG_GPIO_595 gpio_595.c) zephyr_library_sources_ifdef(CONFIG_GPIO_MAX7318 gpio_max7318.c) diff --git a/app/drivers/gpio/Kconfig b/app/module/drivers/gpio/Kconfig similarity index 52% rename from app/drivers/gpio/Kconfig rename to app/module/drivers/gpio/Kconfig index 54b30590e1c..a6c7b4a19ef 100644 --- a/app/drivers/gpio/Kconfig +++ b/app/module/drivers/gpio/Kconfig @@ -1,5 +1,7 @@ -menuconfig ZMK_DRIVERS_GPIO - bool "GPIO" + +if GPIO rsource "Kconfig.max7318" rsource "Kconfig.595" + +endif # GPIO \ No newline at end of file diff --git a/app/drivers/gpio/Kconfig.595 b/app/module/drivers/gpio/Kconfig.595 similarity index 95% rename from app/drivers/gpio/Kconfig.595 rename to app/module/drivers/gpio/Kconfig.595 index b4b6bdcc2d8..7ebdc0cc54c 100644 --- a/app/drivers/gpio/Kconfig.595 +++ b/app/module/drivers/gpio/Kconfig.595 @@ -10,7 +10,6 @@ menuconfig GPIO_595 default $(dt_compat_enabled,$(DT_COMPAT_ZMK_GPIO_595)) depends on SPI select HAS_DTS_GPIO - select ZMK_DRIVERS_GPIO help Enable driver for 595 shift register chip using SPI. diff --git a/app/drivers/gpio/Kconfig.max7318 b/app/module/drivers/gpio/Kconfig.max7318 similarity index 95% rename from app/drivers/gpio/Kconfig.max7318 rename to app/module/drivers/gpio/Kconfig.max7318 index d572b97090f..b54e1dba465 100644 --- a/app/drivers/gpio/Kconfig.max7318 +++ b/app/module/drivers/gpio/Kconfig.max7318 @@ -10,7 +10,6 @@ menuconfig GPIO_MAX7318 default $(dt_compat_enabled,$(DT_COMPAT_MAXIM_MAX7318)) depends on I2C select HAS_DTS_GPIO - select ZMK_DRIVERS_GPIO help Enable driver for MAX7318 I2C-based GPIO chip. diff --git a/app/drivers/gpio/gpio_595.c b/app/module/drivers/gpio/gpio_595.c similarity index 100% rename from app/drivers/gpio/gpio_595.c rename to app/module/drivers/gpio/gpio_595.c diff --git a/app/drivers/gpio/gpio_max7318.c b/app/module/drivers/gpio/gpio_max7318.c similarity index 100% rename from app/drivers/gpio/gpio_max7318.c rename to app/module/drivers/gpio/gpio_max7318.c diff --git a/app/drivers/kscan/CMakeLists.txt b/app/module/drivers/kscan/CMakeLists.txt similarity index 85% rename from app/drivers/kscan/CMakeLists.txt rename to app/module/drivers/kscan/CMakeLists.txt index 8fc7ed58d50..0bdcd90ea72 100644 --- a/app/drivers/kscan/CMakeLists.txt +++ b/app/module/drivers/kscan/CMakeLists.txt @@ -1,8 +1,7 @@ # Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT -zephyr_library_named(zmk__drivers__kscan) -zephyr_library_include_directories(${CMAKE_SOURCE_DIR}/include) +zephyr_library_amend() zephyr_library_sources_ifdef(CONFIG_ZMK_KSCAN_GPIO_DRIVER debounce.c) zephyr_library_sources_ifdef(CONFIG_ZMK_KSCAN_GPIO_DRIVER kscan_gpio.c) diff --git a/app/drivers/kscan/Kconfig b/app/module/drivers/kscan/Kconfig similarity index 94% rename from app/drivers/kscan/Kconfig rename to app/module/drivers/kscan/Kconfig index 1d1656694dc..e67c9aa8894 100644 --- a/app/drivers/kscan/Kconfig +++ b/app/module/drivers/kscan/Kconfig @@ -7,6 +7,8 @@ DT_COMPAT_ZMK_KSCAN_GPIO_DIRECT := zmk,kscan-gpio-direct DT_COMPAT_ZMK_KSCAN_GPIO_MATRIX := zmk,kscan-gpio-matrix DT_COMPAT_ZMK_KSCAN_MOCK := zmk,kscan-mock +if KSCAN + config ZMK_KSCAN_COMPOSITE_DRIVER bool default $(dt_compat_enabled,$(DT_COMPAT_ZMK_KSCAN_COMPOSITE)) @@ -87,8 +89,10 @@ config ZMK_KSCAN_DEBOUNCE_RELEASE_MS endif -config ZMK_KSCAN_INIT_PRIORITY - int "Keyboard scan driver init priority" - default 40 - help - Keyboard scan device driver initialization priority. +# config ZMK_KSCAN_INIT_PRIORITY +# int "Keyboard scan driver init priority" +# default 40 +# help +# Keyboard scan device driver initialization priority. + +endif # KSCAN diff --git a/app/drivers/kscan/debounce.c b/app/module/drivers/kscan/debounce.c similarity index 100% rename from app/drivers/kscan/debounce.c rename to app/module/drivers/kscan/debounce.c diff --git a/app/drivers/kscan/debounce.h b/app/module/drivers/kscan/debounce.h similarity index 100% rename from app/drivers/kscan/debounce.h rename to app/module/drivers/kscan/debounce.h diff --git a/app/drivers/kscan/kscan_composite.c b/app/module/drivers/kscan/kscan_composite.c similarity index 100% rename from app/drivers/kscan/kscan_composite.c rename to app/module/drivers/kscan/kscan_composite.c diff --git a/app/drivers/kscan/kscan_gpio.c b/app/module/drivers/kscan/kscan_gpio.c similarity index 100% rename from app/drivers/kscan/kscan_gpio.c rename to app/module/drivers/kscan/kscan_gpio.c diff --git a/app/drivers/kscan/kscan_gpio.h b/app/module/drivers/kscan/kscan_gpio.h similarity index 100% rename from app/drivers/kscan/kscan_gpio.h rename to app/module/drivers/kscan/kscan_gpio.h diff --git a/app/drivers/kscan/kscan_gpio_demux.c b/app/module/drivers/kscan/kscan_gpio_demux.c similarity index 100% rename from app/drivers/kscan/kscan_gpio_demux.c rename to app/module/drivers/kscan/kscan_gpio_demux.c diff --git a/app/drivers/kscan/kscan_gpio_direct.c b/app/module/drivers/kscan/kscan_gpio_direct.c similarity index 100% rename from app/drivers/kscan/kscan_gpio_direct.c rename to app/module/drivers/kscan/kscan_gpio_direct.c diff --git a/app/drivers/kscan/kscan_gpio_matrix.c b/app/module/drivers/kscan/kscan_gpio_matrix.c similarity index 100% rename from app/drivers/kscan/kscan_gpio_matrix.c rename to app/module/drivers/kscan/kscan_gpio_matrix.c diff --git a/app/drivers/kscan/kscan_mock.c b/app/module/drivers/kscan/kscan_mock.c similarity index 100% rename from app/drivers/kscan/kscan_mock.c rename to app/module/drivers/kscan/kscan_mock.c diff --git a/app/drivers/sensor/CMakeLists.txt b/app/module/drivers/sensor/CMakeLists.txt similarity index 100% rename from app/drivers/sensor/CMakeLists.txt rename to app/module/drivers/sensor/CMakeLists.txt diff --git a/app/drivers/sensor/Kconfig b/app/module/drivers/sensor/Kconfig similarity index 67% rename from app/drivers/sensor/Kconfig rename to app/module/drivers/sensor/Kconfig index a828f6c63ab..6a8ac07ea3e 100644 --- a/app/drivers/sensor/Kconfig +++ b/app/module/drivers/sensor/Kconfig @@ -1,5 +1,9 @@ # Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT +if SENSOR + rsource "battery/Kconfig" -rsource "ec11/Kconfig" \ No newline at end of file +rsource "ec11/Kconfig" + +endif # SENSOR \ No newline at end of file diff --git a/app/drivers/sensor/battery/CMakeLists.txt b/app/module/drivers/sensor/battery/CMakeLists.txt similarity index 100% rename from app/drivers/sensor/battery/CMakeLists.txt rename to app/module/drivers/sensor/battery/CMakeLists.txt diff --git a/app/drivers/sensor/battery/Kconfig b/app/module/drivers/sensor/battery/Kconfig similarity index 100% rename from app/drivers/sensor/battery/Kconfig rename to app/module/drivers/sensor/battery/Kconfig diff --git a/app/drivers/sensor/battery/battery_common.c b/app/module/drivers/sensor/battery/battery_common.c similarity index 100% rename from app/drivers/sensor/battery/battery_common.c rename to app/module/drivers/sensor/battery/battery_common.c diff --git a/app/drivers/sensor/battery/battery_common.h b/app/module/drivers/sensor/battery/battery_common.h similarity index 100% rename from app/drivers/sensor/battery/battery_common.h rename to app/module/drivers/sensor/battery/battery_common.h diff --git a/app/drivers/sensor/battery/battery_nrf_vddh.c b/app/module/drivers/sensor/battery/battery_nrf_vddh.c similarity index 100% rename from app/drivers/sensor/battery/battery_nrf_vddh.c rename to app/module/drivers/sensor/battery/battery_nrf_vddh.c diff --git a/app/drivers/sensor/battery/battery_voltage_divider.c b/app/module/drivers/sensor/battery/battery_voltage_divider.c similarity index 100% rename from app/drivers/sensor/battery/battery_voltage_divider.c rename to app/module/drivers/sensor/battery/battery_voltage_divider.c diff --git a/app/drivers/sensor/ec11/CMakeLists.txt b/app/module/drivers/sensor/ec11/CMakeLists.txt similarity index 100% rename from app/drivers/sensor/ec11/CMakeLists.txt rename to app/module/drivers/sensor/ec11/CMakeLists.txt diff --git a/app/drivers/sensor/ec11/Kconfig b/app/module/drivers/sensor/ec11/Kconfig similarity index 100% rename from app/drivers/sensor/ec11/Kconfig rename to app/module/drivers/sensor/ec11/Kconfig diff --git a/app/drivers/sensor/ec11/ec11.c b/app/module/drivers/sensor/ec11/ec11.c similarity index 100% rename from app/drivers/sensor/ec11/ec11.c rename to app/module/drivers/sensor/ec11/ec11.c diff --git a/app/drivers/sensor/ec11/ec11.h b/app/module/drivers/sensor/ec11/ec11.h similarity index 100% rename from app/drivers/sensor/ec11/ec11.h rename to app/module/drivers/sensor/ec11/ec11.h diff --git a/app/drivers/sensor/ec11/ec11_trigger.c b/app/module/drivers/sensor/ec11/ec11_trigger.c similarity index 100% rename from app/drivers/sensor/ec11/ec11_trigger.c rename to app/module/drivers/sensor/ec11/ec11_trigger.c diff --git a/app/dts/bindings/display/gooddisplay,il0323.yaml b/app/module/dts/bindings/display/gooddisplay,il0323.yaml similarity index 100% rename from app/dts/bindings/display/gooddisplay,il0323.yaml rename to app/module/dts/bindings/display/gooddisplay,il0323.yaml diff --git a/app/drivers/zephyr/dts/bindings/gpio/maxim,max7318.yaml b/app/module/dts/bindings/gpio/maxim,max7318.yaml similarity index 100% rename from app/drivers/zephyr/dts/bindings/gpio/maxim,max7318.yaml rename to app/module/dts/bindings/gpio/maxim,max7318.yaml diff --git a/app/drivers/zephyr/dts/bindings/gpio/zmk,gpio-595.yaml b/app/module/dts/bindings/gpio/zmk,gpio-595.yaml similarity index 100% rename from app/drivers/zephyr/dts/bindings/gpio/zmk,gpio-595.yaml rename to app/module/dts/bindings/gpio/zmk,gpio-595.yaml diff --git a/app/drivers/zephyr/dts/bindings/kscan/zmk,kscan-gpio-demux.yaml b/app/module/dts/bindings/kscan/zmk,kscan-gpio-demux.yaml similarity index 100% rename from app/drivers/zephyr/dts/bindings/kscan/zmk,kscan-gpio-demux.yaml rename to app/module/dts/bindings/kscan/zmk,kscan-gpio-demux.yaml diff --git a/app/drivers/zephyr/dts/bindings/kscan/zmk,kscan-gpio-direct.yaml b/app/module/dts/bindings/kscan/zmk,kscan-gpio-direct.yaml similarity index 100% rename from app/drivers/zephyr/dts/bindings/kscan/zmk,kscan-gpio-direct.yaml rename to app/module/dts/bindings/kscan/zmk,kscan-gpio-direct.yaml diff --git a/app/drivers/zephyr/dts/bindings/kscan/zmk,kscan-gpio-matrix.yaml b/app/module/dts/bindings/kscan/zmk,kscan-gpio-matrix.yaml similarity index 100% rename from app/drivers/zephyr/dts/bindings/kscan/zmk,kscan-gpio-matrix.yaml rename to app/module/dts/bindings/kscan/zmk,kscan-gpio-matrix.yaml diff --git a/app/drivers/zephyr/dts/bindings/sensor/alps,ec11.yaml b/app/module/dts/bindings/sensor/alps,ec11.yaml similarity index 100% rename from app/drivers/zephyr/dts/bindings/sensor/alps,ec11.yaml rename to app/module/dts/bindings/sensor/alps,ec11.yaml diff --git a/app/drivers/zephyr/dts/bindings/sensor/zmk,battery-nrf-vddh.yaml b/app/module/dts/bindings/sensor/zmk,battery-nrf-vddh.yaml similarity index 100% rename from app/drivers/zephyr/dts/bindings/sensor/zmk,battery-nrf-vddh.yaml rename to app/module/dts/bindings/sensor/zmk,battery-nrf-vddh.yaml diff --git a/app/drivers/zephyr/dts/bindings/sensor/zmk,battery-voltage-divider.yaml b/app/module/dts/bindings/sensor/zmk,battery-voltage-divider.yaml similarity index 100% rename from app/drivers/zephyr/dts/bindings/sensor/zmk,battery-voltage-divider.yaml rename to app/module/dts/bindings/sensor/zmk,battery-voltage-divider.yaml diff --git a/app/include/dt-bindings/zmk/kscan_mock.h b/app/module/include/dt-bindings/zmk/kscan_mock.h similarity index 100% rename from app/include/dt-bindings/zmk/kscan_mock.h rename to app/module/include/dt-bindings/zmk/kscan_mock.h diff --git a/app/drivers/zephyr/module.yml b/app/module/zephyr/module.yml similarity index 56% rename from app/drivers/zephyr/module.yml rename to app/module/zephyr/module.yml index 0b6605945e5..219b2cfd201 100644 --- a/app/drivers/zephyr/module.yml +++ b/app/module/zephyr/module.yml @@ -1,3 +1,5 @@ build: cmake: . kconfig: Kconfig + settings: + dts_root: . From c28ef1b61e9feb748ff0823f7f226d67e14fd3aa Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Sat, 2 Sep 2023 20:28:47 -0700 Subject: [PATCH 24/26] refactor(drivers): Use proper init stage/priority. * Avoid APPLICATION stage and use the proper earlier stage for kscan drivers. --- app/module/drivers/kscan/Kconfig | 6 ------ app/module/drivers/kscan/kscan_composite.c | 2 +- app/module/drivers/kscan/kscan_gpio_demux.c | 2 +- app/module/drivers/kscan/kscan_gpio_direct.c | 2 +- app/module/drivers/kscan/kscan_gpio_matrix.c | 2 +- app/module/drivers/kscan/kscan_mock.c | 4 ++-- 6 files changed, 6 insertions(+), 12 deletions(-) diff --git a/app/module/drivers/kscan/Kconfig b/app/module/drivers/kscan/Kconfig index e67c9aa8894..60b5df3b6ad 100644 --- a/app/module/drivers/kscan/Kconfig +++ b/app/module/drivers/kscan/Kconfig @@ -89,10 +89,4 @@ config ZMK_KSCAN_DEBOUNCE_RELEASE_MS endif -# config ZMK_KSCAN_INIT_PRIORITY -# int "Keyboard scan driver init priority" -# default 40 -# help -# Keyboard scan device driver initialization priority. - endif # KSCAN diff --git a/app/module/drivers/kscan/kscan_composite.c b/app/module/drivers/kscan/kscan_composite.c index 9909a4cfcfa..97311ef8e52 100644 --- a/app/module/drivers/kscan/kscan_composite.c +++ b/app/module/drivers/kscan/kscan_composite.c @@ -109,4 +109,4 @@ static const struct kscan_composite_config kscan_composite_config = {}; static struct kscan_composite_data kscan_composite_data; DEVICE_DT_INST_DEFINE(0, kscan_composite_init, NULL, &kscan_composite_data, &kscan_composite_config, - APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &mock_driver_api); + POST_KERNEL, CONFIG_KSCAN_INIT_PRIORITY, &mock_driver_api); diff --git a/app/module/drivers/kscan/kscan_gpio_demux.c b/app/module/drivers/kscan/kscan_gpio_demux.c index 812a899d89c..2cbe116d9f2 100644 --- a/app/module/drivers/kscan/kscan_gpio_demux.c +++ b/app/module/drivers/kscan/kscan_gpio_demux.c @@ -201,7 +201,7 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); }; \ \ DEVICE_DT_INST_DEFINE(n, kscan_gpio_init_##n, NULL, &kscan_gpio_data_##n, \ - &kscan_gpio_config_##n, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY, \ + &kscan_gpio_config_##n, POST_KERNEL, CONFIG_KSCAN_INIT_PRIORITY, \ &gpio_driver_api_##n); DT_INST_FOREACH_STATUS_OKAY(GPIO_INST_INIT) diff --git a/app/module/drivers/kscan/kscan_gpio_direct.c b/app/module/drivers/kscan/kscan_gpio_direct.c index d43d716bf64..c0990887083 100644 --- a/app/module/drivers/kscan/kscan_gpio_direct.c +++ b/app/module/drivers/kscan/kscan_gpio_direct.c @@ -354,7 +354,7 @@ static const struct kscan_driver_api kscan_direct_api = { }; \ \ DEVICE_DT_INST_DEFINE(n, &kscan_direct_init, NULL, &kscan_direct_data_##n, \ - &kscan_direct_config_##n, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY, \ + &kscan_direct_config_##n, POST_KERNEL, CONFIG_KSCAN_INIT_PRIORITY, \ &kscan_direct_api); DT_INST_FOREACH_STATUS_OKAY(KSCAN_DIRECT_INIT); diff --git a/app/module/drivers/kscan/kscan_gpio_matrix.c b/app/module/drivers/kscan/kscan_gpio_matrix.c index b8e72044928..309da204b13 100644 --- a/app/module/drivers/kscan/kscan_gpio_matrix.c +++ b/app/module/drivers/kscan/kscan_gpio_matrix.c @@ -465,7 +465,7 @@ static const struct kscan_driver_api kscan_matrix_api = { }; \ \ DEVICE_DT_INST_DEFINE(n, &kscan_matrix_init, NULL, &kscan_matrix_data_##n, \ - &kscan_matrix_config_##n, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY, \ + &kscan_matrix_config_##n, POST_KERNEL, CONFIG_KSCAN_INIT_PRIORITY, \ &kscan_matrix_api); DT_INST_FOREACH_STATUS_OKAY(KSCAN_MATRIX_INIT); diff --git a/app/module/drivers/kscan/kscan_mock.c b/app/module/drivers/kscan/kscan_mock.c index 57862b0d6f4..604e164cbc5 100644 --- a/app/module/drivers/kscan/kscan_mock.c +++ b/app/module/drivers/kscan/kscan_mock.c @@ -89,7 +89,7 @@ static int kscan_mock_configure(const struct device *dev, kscan_callback_t callb static const struct kscan_mock_config_##n kscan_mock_config_##n = { \ .events = DT_INST_PROP(n, events), .exit_after = DT_INST_PROP(n, exit_after)}; \ DEVICE_DT_INST_DEFINE(n, kscan_mock_init_##n, NULL, &kscan_mock_data_##n, \ - &kscan_mock_config_##n, APPLICATION, \ - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &mock_driver_api_##n); + &kscan_mock_config_##n, POST_KERNEL, CONFIG_KSCAN_INIT_PRIORITY, \ + &mock_driver_api_##n); DT_INST_FOREACH_STATUS_OKAY(MOCK_INST_INIT) From 0ca7f69b6d21f0e24555d635a017459a8ed0fe43 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Mon, 11 Sep 2023 21:56:37 -0700 Subject: [PATCH 25/26] refactor: Promote debounce to exposed mod lib. * Promote previously local debounce code from kscan drivers to exposed module lib, for use with other drivers as needed. * Refactor existing kscan driver to new "public" API. --- app/module/CMakeLists.txt | 3 ++- app/module/Kconfig | 3 ++- app/module/drivers/kscan/CMakeLists.txt | 1 - app/module/drivers/kscan/Kconfig | 1 + app/module/drivers/kscan/kscan_gpio_direct.c | 21 ++++++++++--------- app/module/drivers/kscan/kscan_gpio_matrix.c | 21 ++++++++++--------- .../{drivers/kscan => include/zmk}/debounce.h | 14 ++++++------- app/module/lib/CMakeLists.txt | 2 ++ app/module/lib/Kconfig | 2 ++ app/module/lib/zmk_debounce/CMakeLists.txt | 3 +++ app/module/lib/zmk_debounce/Kconfig | 3 +++ .../kscan => lib/zmk_debounce}/debounce.c | 20 +++++++++--------- 12 files changed, 54 insertions(+), 40 deletions(-) rename app/module/{drivers/kscan => include/zmk}/debounce.h (73%) create mode 100644 app/module/lib/CMakeLists.txt create mode 100644 app/module/lib/Kconfig create mode 100644 app/module/lib/zmk_debounce/CMakeLists.txt create mode 100644 app/module/lib/zmk_debounce/Kconfig rename app/module/{drivers/kscan => lib/zmk_debounce}/debounce.c (62%) diff --git a/app/module/CMakeLists.txt b/app/module/CMakeLists.txt index 1c140d33d4a..db886ac6987 100644 --- a/app/module/CMakeLists.txt +++ b/app/module/CMakeLists.txt @@ -1,3 +1,4 @@ zephyr_include_directories(include) -add_subdirectory(drivers) \ No newline at end of file +add_subdirectory(drivers) +add_subdirectory(lib) \ No newline at end of file diff --git a/app/module/Kconfig b/app/module/Kconfig index cb2ae20cd7c..52c013151a9 100644 --- a/app/module/Kconfig +++ b/app/module/Kconfig @@ -1,2 +1,3 @@ -rsource "drivers/Kconfig" \ No newline at end of file +rsource "drivers/Kconfig" +rsource "lib/Kconfig" \ No newline at end of file diff --git a/app/module/drivers/kscan/CMakeLists.txt b/app/module/drivers/kscan/CMakeLists.txt index 0bdcd90ea72..7ae9524c75f 100644 --- a/app/module/drivers/kscan/CMakeLists.txt +++ b/app/module/drivers/kscan/CMakeLists.txt @@ -3,7 +3,6 @@ zephyr_library_amend() -zephyr_library_sources_ifdef(CONFIG_ZMK_KSCAN_GPIO_DRIVER debounce.c) zephyr_library_sources_ifdef(CONFIG_ZMK_KSCAN_GPIO_DRIVER kscan_gpio.c) zephyr_library_sources_ifdef(CONFIG_ZMK_KSCAN_GPIO_MATRIX kscan_gpio_matrix.c) zephyr_library_sources_ifdef(CONFIG_ZMK_KSCAN_GPIO_DIRECT kscan_gpio_direct.c) diff --git a/app/module/drivers/kscan/Kconfig b/app/module/drivers/kscan/Kconfig index 60b5df3b6ad..6f60b3f919f 100644 --- a/app/module/drivers/kscan/Kconfig +++ b/app/module/drivers/kscan/Kconfig @@ -16,6 +16,7 @@ config ZMK_KSCAN_COMPOSITE_DRIVER config ZMK_KSCAN_GPIO_DRIVER bool select GPIO + select ZMK_DEBOUNCE config ZMK_KSCAN_GPIO_DEMUX bool diff --git a/app/module/drivers/kscan/kscan_gpio_direct.c b/app/module/drivers/kscan/kscan_gpio_direct.c index c0990887083..5b227784dad 100644 --- a/app/module/drivers/kscan/kscan_gpio_direct.c +++ b/app/module/drivers/kscan/kscan_gpio_direct.c @@ -4,7 +4,6 @@ * SPDX-License-Identifier: MIT */ -#include "debounce.h" #include "kscan_gpio.h" #include @@ -15,6 +14,8 @@ #include #include +#include + LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #define DT_DRV_COMPAT zmk_kscan_gpio_direct @@ -61,11 +62,11 @@ struct kscan_direct_data { /** Timestamp of the current or scheduled scan. */ int64_t scan_time; /** Current state of the inputs as an array of length config->inputs.len */ - struct debounce_state *pin_state; + struct zmk_debounce_state *pin_state; }; struct kscan_direct_config { - struct debounce_config debounce_config; + struct zmk_debounce_config debounce_config; int32_t debounce_scan_period_ms; int32_t poll_period_ms; bool toggle_mode; @@ -182,8 +183,8 @@ static int kscan_direct_read(const struct device *dev) { return active; } - debounce_update(&data->pin_state[gpio->index], active, config->debounce_scan_period_ms, - &config->debounce_config); + zmk_debounce_update(&data->pin_state[gpio->index], active, config->debounce_scan_period_ms, + &config->debounce_config); } // Process the new state. @@ -191,10 +192,10 @@ static int kscan_direct_read(const struct device *dev) { for (int i = 0; i < data->inputs.len; i++) { const struct kscan_gpio *gpio = &data->inputs.gpios[i]; - struct debounce_state *state = &data->pin_state[gpio->index]; + struct zmk_debounce_state *state = &data->pin_state[gpio->index]; - if (debounce_get_changed(state)) { - const bool pressed = debounce_is_pressed(state); + if (zmk_debounce_get_changed(state)) { + const bool pressed = zmk_debounce_is_pressed(state); LOG_DBG("Sending event at 0,%i state %s", gpio->index, pressed ? "on" : "off"); data->callback(dev, 0, gpio->index, pressed); @@ -203,7 +204,7 @@ static int kscan_direct_read(const struct device *dev) { } } - continue_scan = continue_scan || debounce_is_active(state); + continue_scan = continue_scan || zmk_debounce_is_active(state); } if (continue_scan) { @@ -332,7 +333,7 @@ static const struct kscan_driver_api kscan_direct_api = { static struct kscan_gpio kscan_direct_inputs_##n[] = { \ LISTIFY(INST_INPUTS_LEN(n), KSCAN_DIRECT_INPUT_CFG_INIT, (, ), n)}; \ \ - static struct debounce_state kscan_direct_state_##n[INST_INPUTS_LEN(n)]; \ + static struct zmk_debounce_state kscan_direct_state_##n[INST_INPUTS_LEN(n)]; \ \ COND_INTERRUPTS( \ (static struct kscan_direct_irq_callback kscan_direct_irqs_##n[INST_INPUTS_LEN(n)];)) \ diff --git a/app/module/drivers/kscan/kscan_gpio_matrix.c b/app/module/drivers/kscan/kscan_gpio_matrix.c index 309da204b13..0d8a3190659 100644 --- a/app/module/drivers/kscan/kscan_gpio_matrix.c +++ b/app/module/drivers/kscan/kscan_gpio_matrix.c @@ -4,7 +4,6 @@ * SPDX-License-Identifier: MIT */ -#include "debounce.h" #include "kscan_gpio.h" #include @@ -16,6 +15,8 @@ #include #include +#include + LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #define DT_DRV_COMPAT zmk_kscan_gpio_matrix @@ -80,12 +81,12 @@ struct kscan_matrix_data { * Current state of the matrix as a flattened 2D array of length * (config->rows * config->cols) */ - struct debounce_state *matrix_state; + struct zmk_debounce_state *matrix_state; }; struct kscan_matrix_config { struct kscan_gpio_list outputs; - struct debounce_config debounce_config; + struct zmk_debounce_config debounce_config; size_t rows; size_t cols; int32_t debounce_scan_period_ms; @@ -242,8 +243,8 @@ static int kscan_matrix_read(const struct device *dev) { return active; } - debounce_update(&data->matrix_state[index], active, config->debounce_scan_period_ms, - &config->debounce_config); + zmk_debounce_update(&data->matrix_state[index], active, config->debounce_scan_period_ms, + &config->debounce_config); } err = gpio_pin_set_dt(&out_gpio->spec, 0); @@ -263,16 +264,16 @@ static int kscan_matrix_read(const struct device *dev) { for (int r = 0; r < config->rows; r++) { for (int c = 0; c < config->cols; c++) { const int index = state_index_rc(config, r, c); - struct debounce_state *state = &data->matrix_state[index]; + struct zmk_debounce_state *state = &data->matrix_state[index]; - if (debounce_get_changed(state)) { - const bool pressed = debounce_is_pressed(state); + if (zmk_debounce_get_changed(state)) { + const bool pressed = zmk_debounce_is_pressed(state); LOG_DBG("Sending event at %i,%i state %s", r, c, pressed ? "on" : "off"); data->callback(dev, r, c, pressed); } - continue_scan = continue_scan || debounce_is_active(state); + continue_scan = continue_scan || zmk_debounce_is_active(state); } } @@ -438,7 +439,7 @@ static const struct kscan_driver_api kscan_matrix_api = { static struct kscan_gpio kscan_matrix_cols_##n[] = { \ LISTIFY(INST_COLS_LEN(n), KSCAN_GPIO_COL_CFG_INIT, (, ), n)}; \ \ - static struct debounce_state kscan_matrix_state_##n[INST_MATRIX_LEN(n)]; \ + static struct zmk_debounce_state kscan_matrix_state_##n[INST_MATRIX_LEN(n)]; \ \ COND_INTERRUPTS( \ (static struct kscan_matrix_irq_callback kscan_matrix_irqs_##n[INST_INPUTS_LEN(n)];)) \ diff --git a/app/module/drivers/kscan/debounce.h b/app/module/include/zmk/debounce.h similarity index 73% rename from app/module/drivers/kscan/debounce.h rename to app/module/include/zmk/debounce.h index 6e9faa66818..afa775a023d 100644 --- a/app/module/drivers/kscan/debounce.h +++ b/app/module/include/zmk/debounce.h @@ -13,13 +13,13 @@ #define DEBOUNCE_COUNTER_BITS 14 #define DEBOUNCE_COUNTER_MAX BIT_MASK(DEBOUNCE_COUNTER_BITS) -struct debounce_state { +struct zmk_debounce_state { bool pressed : 1; bool changed : 1; uint16_t counter : DEBOUNCE_COUNTER_BITS; }; -struct debounce_config { +struct zmk_debounce_config { /** Duration a switch must be pressed to latch as pressed. */ uint32_t debounce_press_ms; /** Duration a switch must be released to latch as released. */ @@ -34,23 +34,23 @@ struct debounce_config { * @param elapsed_ms Time elapsed since the previous update in milliseconds. * @param config Debounce settings. */ -void debounce_update(struct debounce_state *state, const bool active, const int elapsed_ms, - const struct debounce_config *config); +void zmk_debounce_update(struct zmk_debounce_state *state, const bool active, const int elapsed_ms, + const struct zmk_debounce_config *config); /** * @returns whether the switch is either latched as pressed or it is potentially * pressed but the debouncer has not yet made a decision. If this returns true, * the kscan driver should continue to poll quickly. */ -bool debounce_is_active(const struct debounce_state *state); +bool zmk_debounce_is_active(const struct zmk_debounce_state *state); /** * @returns whether the switch is latched as pressed. */ -bool debounce_is_pressed(const struct debounce_state *state); +bool zmk_debounce_is_pressed(const struct zmk_debounce_state *state); /** * @returns whether the pressed state of the switch changed in the last call to * debounce_update. */ -bool debounce_get_changed(const struct debounce_state *state); +bool zmk_debounce_get_changed(const struct zmk_debounce_state *state); diff --git a/app/module/lib/CMakeLists.txt b/app/module/lib/CMakeLists.txt new file mode 100644 index 00000000000..146b3637b68 --- /dev/null +++ b/app/module/lib/CMakeLists.txt @@ -0,0 +1,2 @@ + +add_subdirectory_ifdef(CONFIG_ZMK_DEBOUNCE zmk_debounce) \ No newline at end of file diff --git a/app/module/lib/Kconfig b/app/module/lib/Kconfig new file mode 100644 index 00000000000..8f2f06017d3 --- /dev/null +++ b/app/module/lib/Kconfig @@ -0,0 +1,2 @@ + +rsource "zmk_debounce/Kconfig" \ No newline at end of file diff --git a/app/module/lib/zmk_debounce/CMakeLists.txt b/app/module/lib/zmk_debounce/CMakeLists.txt new file mode 100644 index 00000000000..0a65dde1109 --- /dev/null +++ b/app/module/lib/zmk_debounce/CMakeLists.txt @@ -0,0 +1,3 @@ + +zephyr_library() +zephyr_library_sources(debounce.c) \ No newline at end of file diff --git a/app/module/lib/zmk_debounce/Kconfig b/app/module/lib/zmk_debounce/Kconfig new file mode 100644 index 00000000000..cd0321e8569 --- /dev/null +++ b/app/module/lib/zmk_debounce/Kconfig @@ -0,0 +1,3 @@ + +config ZMK_DEBOUNCE + bool "Debounce Support" \ No newline at end of file diff --git a/app/module/drivers/kscan/debounce.c b/app/module/lib/zmk_debounce/debounce.c similarity index 62% rename from app/module/drivers/kscan/debounce.c rename to app/module/lib/zmk_debounce/debounce.c index b38782267e8..6f4885b745c 100644 --- a/app/module/drivers/kscan/debounce.c +++ b/app/module/lib/zmk_debounce/debounce.c @@ -4,14 +4,14 @@ * SPDX-License-Identifier: MIT */ -#include "debounce.h" +#include -static uint32_t get_threshold(const struct debounce_state *state, - const struct debounce_config *config) { +static uint32_t get_threshold(const struct zmk_debounce_state *state, + const struct zmk_debounce_config *config) { return state->pressed ? config->debounce_release_ms : config->debounce_press_ms; } -static void increment_counter(struct debounce_state *state, const int elapsed_ms) { +static void increment_counter(struct zmk_debounce_state *state, const int elapsed_ms) { if (state->counter + elapsed_ms > DEBOUNCE_COUNTER_MAX) { state->counter = DEBOUNCE_COUNTER_MAX; } else { @@ -19,7 +19,7 @@ static void increment_counter(struct debounce_state *state, const int elapsed_ms } } -static void decrement_counter(struct debounce_state *state, const int elapsed_ms) { +static void decrement_counter(struct zmk_debounce_state *state, const int elapsed_ms) { if (state->counter < elapsed_ms) { state->counter = 0; } else { @@ -27,8 +27,8 @@ static void decrement_counter(struct debounce_state *state, const int elapsed_ms } } -void debounce_update(struct debounce_state *state, const bool active, const int elapsed_ms, - const struct debounce_config *config) { +void zmk_debounce_update(struct zmk_debounce_state *state, const bool active, const int elapsed_ms, + const struct zmk_debounce_config *config) { // This uses a variation of the integrator debouncing described at // https://www.kennethkuhn.com/electronics/debounce.c // Every update where "active" does not match the current state, we increment @@ -53,10 +53,10 @@ void debounce_update(struct debounce_state *state, const bool active, const int state->changed = true; } -bool debounce_is_active(const struct debounce_state *state) { +bool zmk_debounce_is_active(const struct zmk_debounce_state *state) { return state->pressed || state->counter > 0; } -bool debounce_is_pressed(const struct debounce_state *state) { return state->pressed; } +bool zmk_debounce_is_pressed(const struct zmk_debounce_state *state) { return state->pressed; } -bool debounce_get_changed(const struct debounce_state *state) { return state->changed; } \ No newline at end of file +bool zmk_debounce_get_changed(const struct zmk_debounce_state *state) { return state->changed; } \ No newline at end of file From 28ce23d4891eee3a1ef0a0d8187afe233d05cf81 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Thu, 14 Sep 2023 23:43:47 -0700 Subject: [PATCH 26/26] chore(tests): Move to proper header name. --- app/tests/combo/combos-and-holdtaps-0/native_posix_64.keymap | 2 +- app/tests/combo/combos-and-holdtaps-1/native_posix_64.keymap | 2 +- app/tests/combo/combos-and-holdtaps-2/native_posix_64.keymap | 2 +- app/tests/combo/combos-and-holdtaps-3/native_posix_64.keymap | 2 +- app/tests/combo/combos-and-holdtaps-4/native_posix_64.keymap | 2 +- app/tests/combo/layer-filter-0/native_posix_64.keymap | 2 +- app/tests/combo/layer-filter-1/native_posix_64.keymap | 2 +- app/tests/combo/multiple-timeouts/native_posix_64.keymap | 2 +- app/tests/combo/overlapping-combos-0/native_posix_64.keymap | 2 +- app/tests/combo/overlapping-combos-1/native_posix_64.keymap | 2 +- app/tests/combo/overlapping-combos-2/native_posix_64.keymap | 2 +- app/tests/combo/overlapping-combos-3/native_posix_64.keymap | 2 +- .../combo/partially-overlapping-combos/native_posix_64.keymap | 2 +- .../press-release-long-combo-complete/native_posix_64.keymap | 2 +- .../press-release-long-combo-incomplete/native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 2 +- app/tests/combo/press-release/native_posix_64.keymap | 2 +- app/tests/combo/press-timeout/native_posix_64.keymap | 2 +- .../press1-press2-release1-release2/native_posix_64.keymap | 2 +- .../press1-press2-release2-release1/native_posix_64.keymap | 2 +- .../press1-release1-press2-release2/native_posix_64.keymap | 2 +- app/tests/combo/slowrelease-disabled/native_posix_64.keymap | 2 +- app/tests/combo/slowrelease-enabled/native_posix_64.keymap | 2 +- app/tests/gresc/gresc-press-release/native_posix_64.keymap | 2 +- app/tests/gresc/gresc-two-instances/native_posix_64.keymap | 2 +- .../kp-hyper-dn-a-dn-a-up-hyper-up/native_posix_64.keymap | 2 +- app/tests/sticky-keys/10-sl-sl-kp/native_posix_64.keymap | 2 +- .../sticky-keys/2-sl-dn-up-kcdn-kcup/native_posix_64.keymap | 2 +- app/tests/to-layer/behavior_keymap.dtsi | 2 +- app/tests/to-layer/normal/native_posix_64.keymap | 2 +- 30 files changed, 30 insertions(+), 30 deletions(-) diff --git a/app/tests/combo/combos-and-holdtaps-0/native_posix_64.keymap b/app/tests/combo/combos-and-holdtaps-0/native_posix_64.keymap index e6754b71128..3438f9bc77d 100644 --- a/app/tests/combo/combos-and-holdtaps-0/native_posix_64.keymap +++ b/app/tests/combo/combos-and-holdtaps-0/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include &mt { flavor = "hold-preferred"; diff --git a/app/tests/combo/combos-and-holdtaps-1/native_posix_64.keymap b/app/tests/combo/combos-and-holdtaps-1/native_posix_64.keymap index 9538243291c..9120e8c3b4a 100644 --- a/app/tests/combo/combos-and-holdtaps-1/native_posix_64.keymap +++ b/app/tests/combo/combos-and-holdtaps-1/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include &mt { flavor = "hold-preferred"; diff --git a/app/tests/combo/combos-and-holdtaps-2/native_posix_64.keymap b/app/tests/combo/combos-and-holdtaps-2/native_posix_64.keymap index d6d187e2046..a227fe4c91f 100644 --- a/app/tests/combo/combos-and-holdtaps-2/native_posix_64.keymap +++ b/app/tests/combo/combos-and-holdtaps-2/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include &mt { flavor = "hold-preferred"; diff --git a/app/tests/combo/combos-and-holdtaps-3/native_posix_64.keymap b/app/tests/combo/combos-and-holdtaps-3/native_posix_64.keymap index f1c7eee7087..4fbf24071e6 100644 --- a/app/tests/combo/combos-and-holdtaps-3/native_posix_64.keymap +++ b/app/tests/combo/combos-and-holdtaps-3/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include &mt { flavor = "hold-preferred"; diff --git a/app/tests/combo/combos-and-holdtaps-4/native_posix_64.keymap b/app/tests/combo/combos-and-holdtaps-4/native_posix_64.keymap index 134b77dfa34..59f4391f288 100644 --- a/app/tests/combo/combos-and-holdtaps-4/native_posix_64.keymap +++ b/app/tests/combo/combos-and-holdtaps-4/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include #define ZMK_COMBO(name, combo_bindings, keypos, combo_term) \ diff --git a/app/tests/combo/layer-filter-0/native_posix_64.keymap b/app/tests/combo/layer-filter-0/native_posix_64.keymap index 8d94872b658..68077849a34 100644 --- a/app/tests/combo/layer-filter-0/native_posix_64.keymap +++ b/app/tests/combo/layer-filter-0/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include /* it is useful to set timeout to a large value when attaching a debugger. */ #define TIMEOUT (60*60*1000) diff --git a/app/tests/combo/layer-filter-1/native_posix_64.keymap b/app/tests/combo/layer-filter-1/native_posix_64.keymap index 96eccea4ea8..a11b86ad4d9 100644 --- a/app/tests/combo/layer-filter-1/native_posix_64.keymap +++ b/app/tests/combo/layer-filter-1/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include /* it is useful to set timeout to a large value when attaching a debugger. */ #define TIMEOUT (60*60*1000) diff --git a/app/tests/combo/multiple-timeouts/native_posix_64.keymap b/app/tests/combo/multiple-timeouts/native_posix_64.keymap index d2176390403..a2edc32fcc3 100644 --- a/app/tests/combo/multiple-timeouts/native_posix_64.keymap +++ b/app/tests/combo/multiple-timeouts/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include / { combos { diff --git a/app/tests/combo/overlapping-combos-0/native_posix_64.keymap b/app/tests/combo/overlapping-combos-0/native_posix_64.keymap index e82846652d3..e89a3f22d33 100644 --- a/app/tests/combo/overlapping-combos-0/native_posix_64.keymap +++ b/app/tests/combo/overlapping-combos-0/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include /* combo 0 timeout inf diff --git a/app/tests/combo/overlapping-combos-1/native_posix_64.keymap b/app/tests/combo/overlapping-combos-1/native_posix_64.keymap index a695a388c66..4b0166bee15 100644 --- a/app/tests/combo/overlapping-combos-1/native_posix_64.keymap +++ b/app/tests/combo/overlapping-combos-1/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include /* combo 01 timeout 50 diff --git a/app/tests/combo/overlapping-combos-2/native_posix_64.keymap b/app/tests/combo/overlapping-combos-2/native_posix_64.keymap index 6bf0e7100cd..5c38bcfc403 100644 --- a/app/tests/combo/overlapping-combos-2/native_posix_64.keymap +++ b/app/tests/combo/overlapping-combos-2/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include /* combo 01 timeout 100 diff --git a/app/tests/combo/overlapping-combos-3/native_posix_64.keymap b/app/tests/combo/overlapping-combos-3/native_posix_64.keymap index 0a2f5ee137f..48e3397f4a6 100644 --- a/app/tests/combo/overlapping-combos-3/native_posix_64.keymap +++ b/app/tests/combo/overlapping-combos-3/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include /* combo 12 timeout 100 diff --git a/app/tests/combo/partially-overlapping-combos/native_posix_64.keymap b/app/tests/combo/partially-overlapping-combos/native_posix_64.keymap index 900c4af3f1e..55e8f1e77b6 100644 --- a/app/tests/combo/partially-overlapping-combos/native_posix_64.keymap +++ b/app/tests/combo/partially-overlapping-combos/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include / { combos { diff --git a/app/tests/combo/press-release-long-combo-complete/native_posix_64.keymap b/app/tests/combo/press-release-long-combo-complete/native_posix_64.keymap index dac0bd5ca4c..da2e9483ff7 100644 --- a/app/tests/combo/press-release-long-combo-complete/native_posix_64.keymap +++ b/app/tests/combo/press-release-long-combo-complete/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include / { combos { diff --git a/app/tests/combo/press-release-long-combo-incomplete/native_posix_64.keymap b/app/tests/combo/press-release-long-combo-incomplete/native_posix_64.keymap index 19bad1d0d1d..b1494cecf20 100644 --- a/app/tests/combo/press-release-long-combo-incomplete/native_posix_64.keymap +++ b/app/tests/combo/press-release-long-combo-incomplete/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include / { combos { diff --git a/app/tests/combo/press-release-long-combo-wrong-last-key/native_posix_64.keymap b/app/tests/combo/press-release-long-combo-wrong-last-key/native_posix_64.keymap index 2eb6271e2f0..8769286413b 100644 --- a/app/tests/combo/press-release-long-combo-wrong-last-key/native_posix_64.keymap +++ b/app/tests/combo/press-release-long-combo-wrong-last-key/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include / { combos { diff --git a/app/tests/combo/press-release/native_posix_64.keymap b/app/tests/combo/press-release/native_posix_64.keymap index 6bd432f9c86..26cd241b0bb 100644 --- a/app/tests/combo/press-release/native_posix_64.keymap +++ b/app/tests/combo/press-release/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include / { combos { diff --git a/app/tests/combo/press-timeout/native_posix_64.keymap b/app/tests/combo/press-timeout/native_posix_64.keymap index 6ca6487ba93..a71de45a7d2 100644 --- a/app/tests/combo/press-timeout/native_posix_64.keymap +++ b/app/tests/combo/press-timeout/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include / { combos { diff --git a/app/tests/combo/press1-press2-release1-release2/native_posix_64.keymap b/app/tests/combo/press1-press2-release1-release2/native_posix_64.keymap index 9a395a41468..2e0a67a3e7f 100644 --- a/app/tests/combo/press1-press2-release1-release2/native_posix_64.keymap +++ b/app/tests/combo/press1-press2-release1-release2/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include / { combos { diff --git a/app/tests/combo/press1-press2-release2-release1/native_posix_64.keymap b/app/tests/combo/press1-press2-release2-release1/native_posix_64.keymap index 86ca3931dce..8d4838eb511 100644 --- a/app/tests/combo/press1-press2-release2-release1/native_posix_64.keymap +++ b/app/tests/combo/press1-press2-release2-release1/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include / { combos { diff --git a/app/tests/combo/press1-release1-press2-release2/native_posix_64.keymap b/app/tests/combo/press1-release1-press2-release2/native_posix_64.keymap index 650895784ae..9c75e5705b1 100644 --- a/app/tests/combo/press1-release1-press2-release2/native_posix_64.keymap +++ b/app/tests/combo/press1-release1-press2-release2/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include / { combos { diff --git a/app/tests/combo/slowrelease-disabled/native_posix_64.keymap b/app/tests/combo/slowrelease-disabled/native_posix_64.keymap index 832e9705897..46b35be02ee 100644 --- a/app/tests/combo/slowrelease-disabled/native_posix_64.keymap +++ b/app/tests/combo/slowrelease-disabled/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include / { combos { diff --git a/app/tests/combo/slowrelease-enabled/native_posix_64.keymap b/app/tests/combo/slowrelease-enabled/native_posix_64.keymap index 7fdb012ed15..d64876da557 100644 --- a/app/tests/combo/slowrelease-enabled/native_posix_64.keymap +++ b/app/tests/combo/slowrelease-enabled/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include / { combos { diff --git a/app/tests/gresc/gresc-press-release/native_posix_64.keymap b/app/tests/gresc/gresc-press-release/native_posix_64.keymap index 5e3fac42c72..c472dd6d4ad 100644 --- a/app/tests/gresc/gresc-press-release/native_posix_64.keymap +++ b/app/tests/gresc/gresc-press-release/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include / { keymap { diff --git a/app/tests/gresc/gresc-two-instances/native_posix_64.keymap b/app/tests/gresc/gresc-two-instances/native_posix_64.keymap index 18f94da5771..14adcf45c8e 100644 --- a/app/tests/gresc/gresc-two-instances/native_posix_64.keymap +++ b/app/tests/gresc/gresc-two-instances/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include /* This test checks nothing breaks if two grave-escapes are pressed at the same time. diff --git a/app/tests/modifiers/explicit/kp-hyper-dn-a-dn-a-up-hyper-up/native_posix_64.keymap b/app/tests/modifiers/explicit/kp-hyper-dn-a-dn-a-up-hyper-up/native_posix_64.keymap index 621945a8218..72b218f510f 100644 --- a/app/tests/modifiers/explicit/kp-hyper-dn-a-dn-a-up-hyper-up/native_posix_64.keymap +++ b/app/tests/modifiers/explicit/kp-hyper-dn-a-dn-a-up-hyper-up/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include &kscan { diff --git a/app/tests/sticky-keys/10-sl-sl-kp/native_posix_64.keymap b/app/tests/sticky-keys/10-sl-sl-kp/native_posix_64.keymap index 23ceeeb6161..bafdbe38d39 100644 --- a/app/tests/sticky-keys/10-sl-sl-kp/native_posix_64.keymap +++ b/app/tests/sticky-keys/10-sl-sl-kp/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include /* sticky layers should quick-release. diff --git a/app/tests/sticky-keys/2-sl-dn-up-kcdn-kcup/native_posix_64.keymap b/app/tests/sticky-keys/2-sl-dn-up-kcdn-kcup/native_posix_64.keymap index 390207515dd..38c8fb4c91c 100644 --- a/app/tests/sticky-keys/2-sl-dn-up-kcdn-kcup/native_posix_64.keymap +++ b/app/tests/sticky-keys/2-sl-dn-up-kcdn-kcup/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include /* sticky layers should quick-release. diff --git a/app/tests/to-layer/behavior_keymap.dtsi b/app/tests/to-layer/behavior_keymap.dtsi index 663e897d74b..7dc857fe143 100644 --- a/app/tests/to-layer/behavior_keymap.dtsi +++ b/app/tests/to-layer/behavior_keymap.dtsi @@ -1,6 +1,6 @@ #include #include -#include +#include / { keymap { diff --git a/app/tests/to-layer/normal/native_posix_64.keymap b/app/tests/to-layer/normal/native_posix_64.keymap index 4cb23809452..6ccc9088bb2 100644 --- a/app/tests/to-layer/normal/native_posix_64.keymap +++ b/app/tests/to-layer/normal/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include #include "../behavior_keymap.dtsi" // Press key A