Skip to content

Commit

Permalink
added dongle
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-seiler committed Nov 29, 2024
1 parent 61ba021 commit 4946a0e
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 4 deletions.
21 changes: 19 additions & 2 deletions config/boards/shields/discipline/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
if DISCIPLINE
if DISCIPLINE_DONGLE

config ZMK_KEYBOARD_NAME
default "discipline"
default "discipline dongle"

config ZMK_SPLIT_BLE_ROLE_CENTRAL
default y

config ZMK_USB
default y

endif


if DISCIPLINE_BOARD

config ZMK_KEYBOARD_NAME
default "discipline board"

config ZMK_BLE
default y

endif
7 changes: 5 additions & 2 deletions config/boards/shields/discipline/Kconfig.shield
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
config DISCIPLINE
def_bool $(shields_list_contains, discipline)
config DISCIPLINE_DONGLE
def_bool $(shields_list_contains, discipline_dongle)

config DISCIPLINE_BOARD
def_bool $(shields_list_contains, discipline_board)
9 changes: 9 additions & 0 deletions config/boards/shields/discipline/discipline.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CONFIG_ZMK_SLEEP=y
CONFIG_PM_DEVICE=y
CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000
CONFIG_ZMK_EXT_POWER=y


CONFIG_ZMK_KEYBOARD_NAME="Enki42"

CONFIG_BT_CTLR_TX_PWR_PLUS_8=n
3 changes: 3 additions & 0 deletions config/boards/shields/discipline/discipline.zmk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ url: https://github.com/coseyfannitutti/discipline
requires: [nice_nano_v2]
features:
- keys
siblings:
- discipline_dongle
- discipline_board
4 changes: 4 additions & 0 deletions config/boards/shields/discipline/discipline_board.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CONFIG_ZMK_SLEEP=y
CONFIG_PM_DEVICE=y
CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000
CONFIG_ZMK_EXT_POWER=y
6 changes: 6 additions & 0 deletions config/boards/shields/discipline/discipline_dongle.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS=1
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y

CONFIG_ZMK_SLEEP=n
CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000
CONFIG_ZMK_EXT_POWER=y
41 changes: 41 additions & 0 deletions config/boards/shields/discipline/discipline_dongle.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/ {
chosen {
zmk,kscan = &kscan0;
};

kscan0: kscan {
compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN";
diode-direction = "col2row";
debounce-press-ms = <5>;
debounce-release-ms = <5>;
debounce-scan-period-ms = <1>;
poll-period-ms = <10>;

col-gpios
= <&gpio0 2 GPIO_ACTIVE_HIGH>
, <&gpio0 10 GPIO_ACTIVE_HIGH>
, <&gpio1 4 GPIO_ACTIVE_HIGH>
, <&gpio0 9 GPIO_ACTIVE_HIGH>
, <&gpio1 6 GPIO_ACTIVE_HIGH>
, <&gpio0 31 GPIO_ACTIVE_HIGH>
, <&gpio0 29 GPIO_ACTIVE_HIGH>
, <&gpio0 24 GPIO_ACTIVE_HIGH>
, <&gpio0 22 GPIO_ACTIVE_HIGH>
, <&gpio0 20 GPIO_ACTIVE_HIGH>
, <&gpio0 17 GPIO_ACTIVE_HIGH>
, <&gpio0 11 GPIO_ACTIVE_HIGH>
, <&gpio1 0 GPIO_ACTIVE_HIGH>
, <&gpio0 8 GPIO_ACTIVE_HIGH>
, <&gpio0 6 GPIO_ACTIVE_HIGH>
;

row-gpios
= <&gpio1 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 13 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;
};
};

0 comments on commit 4946a0e

Please sign in to comment.