Skip to content

Commit

Permalink
hana dongle
Browse files Browse the repository at this point in the history
  • Loading branch information
numToStr committed Jun 10, 2024
1 parent d65a924 commit 4a143c2
Show file tree
Hide file tree
Showing 16 changed files with 110 additions and 11 deletions.
13 changes: 10 additions & 3 deletions boards/shields/hana/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if SHIELD_HANA_LEFT
if SHIELD_HANA_CENTRAL_DONGLE || SHIELD_HANA_CENTRAL_LEFT

config ZMK_KEYBOARD_NAME
default "hana"
Expand All @@ -8,14 +8,21 @@ config ZMK_SPLIT_ROLE_CENTRAL

endif

if SHIELD_HANA_RIGHT
if SHIELD_HANA_PERIPHERAL_LEFT

config ZMK_KEYBOARD_NAME
default "hana.left"

endif

if SHIELD_HANA_PERIPHERAL_RIGHT

config ZMK_KEYBOARD_NAME
default "hana.right"

endif

if SHIELD_HANA_LEFT || SHIELD_HANA_RIGHT
if SHIELD_HANA_CENTRAL_DONGLE || SHIELD_HANA_CENTRAL_LEFT || SHIELD_HANA_PERIPHERAL_LEFT || SHIELD_HANA_PERIPHERAL_RIGHT

config ZMK_SPLIT
default y
Expand Down
17 changes: 13 additions & 4 deletions boards/shields/hana/Kconfig.shield
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
config SHIELD_HANA_LEFT
def_bool $(shields_list_contains,hana_left)
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT

config SHIELD_HANA_RIGHT
def_bool $(shields_list_contains,hana_right)
config SHIELD_HANA_CENTRAL_DONGLE
def_bool $(shields_list_contains,hana_central_dongle)

config SHIELD_HANA_CENTRAL_LEFT
def_bool $(shields_list_contains,hana_central_left)

config SHIELD_HANA_PERIPHERAL_LEFT
def_bool $(shields_list_contains,hana_peripheral_left)

config SHIELD_HANA_PERIPHERAL_RIGHT
def_bool $(shields_list_contains,hana_peripheral_right)
1 change: 0 additions & 1 deletion boards/shields/hana/hana.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
chosen {
zmk,kscan = &kscan0;
zmk,matrix_transform = &default_transform;
// zmk,split-uart = &uart0;
};

kscan0: kscan {
Expand Down
6 changes: 4 additions & 2 deletions boards/shields/hana/hana.zmk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ url: https://github.com/keeb-it/hana
requires: [seeeduino_xiao_ble, seeeduino_xiao_rp2040]
exposes: [i2c_oled, spi_oled]
siblings:
- hana_left
- hana_right
- hana_central_dongle
- hana_central_left
- hana_peripheral_left
- hana_peripheral_right
features:
- keys
- encoder
Expand Down
22 changes: 22 additions & 0 deletions boards/shields/hana/hana_central_dongle.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# better range
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y

# 3 profiles (n+2)
CONFIG_BT_MAX_CONN=5
CONFIG_BT_MAX_PAIRED=5

# combo config
CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=7

# dongle mode
CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS=2

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

# Turn on logging, and set ZMK logging to debug output
# CONFIG_ZMK_USB_LOGGING=y
CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS=8000
34 changes: 34 additions & 0 deletions boards/shields/hana/hana_central_dongle.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#include "hana.dtsi"

&xiao_i2c {
status = "okay";

oled: ssd1306@3c {
compatible = "solomon,ssd1306fb";
reg = <0x3c>;
width = <128>;
height = <64>;
segment-offset = <0>;
page-offset = <0>;
display-offset = <0>;
multiplex-ratio = <63>;
segment-remap;
com-invdir;
inversion-on;
prechargep = <0x22>;
};
};

/ {
chosen {
zmk,kscan = &mock_kscan;
zephyr,display = &oled;
};

mock_kscan: kscan_0 {
compatible = "zmk,kscan-mock";
columns = <0>;
rows = <0>;
events = <0>;
};
};
17 changes: 17 additions & 0 deletions boards/shields/hana/hana_central_left.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# better range
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y

# 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

# Turn on logging, and set ZMK logging to debug output
# CONFIG_ZMK_USB_LOGGING=y
CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS=8000
1 change: 1 addition & 0 deletions boards/shields/hana/hana_central_left.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "hana_left.dtsi"
Empty file removed boards/shields/hana/hana_left.conf
Empty file.
File renamed without changes.
1 change: 1 addition & 0 deletions boards/shields/hana/hana_peripheral_left.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
1 change: 1 addition & 0 deletions boards/shields/hana/hana_peripheral_left.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "hana_left.dtsi"
1 change: 1 addition & 0 deletions boards/shields/hana/hana_peripheral_right.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
File renamed without changes.
Empty file.
7 changes: 6 additions & 1 deletion build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@
---
# board: [seeeduino_xiao, seeeduino_xiao_ble, seeeduino_xiao_rp2040]
board: [seeeduino_xiao_ble]
shield: [hammer40, hana_left, hana_right]
shield:
- hammer40
- hana_central_dongle
- hana_central_left
- hana_peripheral_left
- hana_peripheral_right
include:
- board: seeeduino_xiao_ble
shield: settings_reset
Expand Down

0 comments on commit 4a143c2

Please sign in to comment.