Skip to content

Commit

Permalink
Add common config snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
englmaxi authored Sep 20, 2024
1 parent 6d043ee commit 5080357
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 46 deletions.
6 changes: 0 additions & 6 deletions boards/shields/akohekohe/akohekohe.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,10 @@
CONFIG_BT_MAX_CONN=3
CONFIG_BT_MAX_PAIRED=3

# combo config
CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=7

# battery reporting
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING=y
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_PROXY=y

# sleep timeout to 30 min
CONFIG_ZMK_SLEEP=y
CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=1800000

# studio
CONFIG_ZMK_STUDIO=y
6 changes: 0 additions & 6 deletions boards/shields/rommana/rommana_dongle.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,8 @@ CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS=2
CONFIG_BT_MAX_CONN=5
CONFIG_BT_MAX_PAIRED=5

# combo config
CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=7

# display
CONFIG_ZMK_DISPLAY=y
CONFIG_ZMK_IDLE_TIMEOUT=60000
CONFIG_BT_BAS=n
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING=y

# studio
CONFIG_ZMK_STUDIO=y
10 changes: 0 additions & 10 deletions boards/shields/rommana/rommana_left.conf
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
# 3 profiles (n+1)
CONFIG_BT_MAX_CONN=4
CONFIG_BT_MAX_PAIRED=4

# combo config
CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=7

# battery reporting
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING=y
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_PROXY=y

# studio
CONFIG_ZMK_STUDIO=y
6 changes: 0 additions & 6 deletions boards/shields/sweep/sweep_dongle.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,8 @@ CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS=2
CONFIG_BT_MAX_CONN=5
CONFIG_BT_MAX_PAIRED=5

# combo config
CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=7

# display
CONFIG_ZMK_DISPLAY=y
CONFIG_ZMK_IDLE_TIMEOUT=60000
CONFIG_BT_BAS=n
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING=y

# studio
CONFIG_ZMK_STUDIO=y
10 changes: 0 additions & 10 deletions boards/shields/sweep/sweep_left.conf
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
# 3 profiles (n+1)
CONFIG_BT_MAX_CONN=4
CONFIG_BT_MAX_PAIRED=4

# combo config
CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=7

# battery reporting
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING=y
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_PROXY=y

# studio
CONFIG_ZMK_STUDIO=y
20 changes: 12 additions & 8 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,58 +4,62 @@ include:
# akohekohe
- board: seeeduino_xiao_ble
shield: akohekohe rgbled_adapter
snippet: studio-rpc-usb-uart
snippet: common-config studio-rpc-usb-uart
artifact-name: akohekohe

- board: seeeduino_xiao_ble
shield: akohekohe rgbled_adapter
snippet: zmk-usb-logging studio-rpc-usb-uart
snippet: common-config zmk-usb-logging studio-rpc-usb-uart
cmake-args: -DCONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS=8000
artifact-name: akohekohe_with_logging

# rommana
- board: seeeduino_xiao_ble
shield: rommana_dongle dongle_display
snippet: studio-rpc-usb-uart
snippet: common-config studio-rpc-usb-uart
artifact-name: rommana_central_dongle
- board: seeeduino_xiao_ble
shield: rommana_left rgbled_adapter
snippet: studio-rpc-usb-uart
snippet: common-config studio-rpc-usb-uart
artifact-name: rommana_central_left
- board: seeeduino_xiao_ble
shield: rommana_left rgbled_adapter
snippet: common-config
cmake-args: -DCONFIG_ZMK_SPLIT_ROLE_CENTRAL=n
artifact-name: rommana_peripheral_left
- board: seeeduino_xiao_ble
shield: rommana_right rgbled_adapter
snippet: common-config
artifact-name: rommana_peripheral_right

- board: seeeduino_xiao_ble
shield: rommana_dongle dongle_display
snippet: zmk-usb-logging studio-rpc-usb-uart
snippet: common-config zmk-usb-logging studio-rpc-usb-uart
cmake-args: -DCONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS=8000
artifact-name: rommana_central_dongle_with_logging

# sweep
- board: seeeduino_xiao_ble
shield: sweep_dongle dongle_display
snippet: studio-rpc-usb-uart
snippet: common-config studio-rpc-usb-uart
artifact-name: sweep_central_dongle
- board: nice_nano_v2
shield: sweep_left led_indicator
snippet: studio-rpc-usb-uart
snippet: common-config studio-rpc-usb-uart
artifact-name: sweep_central_left
- board: nice_nano_v2
shield: sweep_left led_indicator
snippet: common-config
cmake-args: -DCONFIG_ZMK_SPLIT_ROLE_CENTRAL=n
artifact-name: sweep_peripheral_left
- board: nice_nano_v2
shield: sweep_right led_indicator
snippet: common-config
artifact-name: sweep_peripheral_right

- board: nice_nano_v2
shield: sweep_left led_indicator
snippet: zmk-usb-logging studio-rpc-usb-uart
snippet: common-config zmk-usb-logging studio-rpc-usb-uart
cmake-args: -DCONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS=8000
artifact-name: sweep_central_left_with_logging

Expand Down
13 changes: 13 additions & 0 deletions snippets/common-config/common-config.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# studio
CONFIG_ZMK_STUDIO=y
CONFIG_ZMK_STUDIO_LOCKING=n

# combo config
CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=7

# battery reporting
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING=y
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_PROXY=y

# soft-off
CONFIG_ZMK_PM_SOFT_OFF=y
Empty file.
4 changes: 4 additions & 0 deletions snippets/common-config/snippet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name: common-config
append:
EXTRA_DTC_OVERLAY_FILE: common-config.overlay
EXTRA_CONF_FILE: common-config.conf
1 change: 1 addition & 0 deletions zephyr/module.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
build:
settings:
board_root: .
snippet_root: .

0 comments on commit 5080357

Please sign in to comment.