-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
141 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Copyright (c) 2022 Dan Bostian | ||
# SPDX-License-Identifier: MIT | ||
|
||
if SHIELD_BANANA_SPLIT | ||
|
||
config ZMK_KEYBOARD_NAME | ||
default "Banana Split" | ||
|
||
endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Copyright (c) 2022 Dan Bostian | ||
# SPDX-License-Identifier: MIT | ||
|
||
config SHIELD_BANANA_SPLIT | ||
def_bool $(shields_list_contains,banana_split) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Uncomment the following lines to enable the RGB Underglow | ||
# CONFIG_ZMK_RGB_UNDERGLOW=y | ||
# CONFIG_WS2812_STRIP=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright (c) 2022 Dan Bostian | ||
* SPDX-License-Identifier: MIT | ||
*/ | ||
|
||
#include <behaviors.dtsi> | ||
#include <dt-bindings/zmk/keys.h> | ||
#include <dt-bindings/zmk/bt.h> | ||
#include <dt-bindings/zmk/ext_power.h> | ||
#include <dt-bindings/zmk/outputs.h> | ||
|
||
/ { | ||
// https://github.com/dbostian/bananasplit | ||
macros { | ||
bananasplit: bananasplit { | ||
label = "bananasplit"; | ||
compatible = "zmk,behavior-macro"; | ||
#binding-cells = <0>; | ||
tap-ms = <0>; | ||
bindings | ||
= <&kp G &kp I &kp T &kp H &kp U &kp B &kp DOT &kp C &kp O &kp M &kp SLASH> | ||
, <&kp D &kp B &kp O &kp S &kp T &kp I &kp A &kp N &kp SLASH> | ||
, <&kp B &kp A &kp N &kp A &kp N &kp A &kp S &kp P &kp L &kp I &kp T> | ||
; | ||
}; | ||
}; | ||
|
||
keymap { | ||
compatible = "zmk,keymap" ; | ||
|
||
default_layer { | ||
bindings = < | ||
< 1 LG(LC(Q)) &bananasplit &kp LG(LS(N3)) &kp LG(LS(N4)) &kp LG(LA(LEFT)) &kp LC(LEFT) &kp LC(RIGHT) &kp LG(LA(RIGHT)) | ||
>; | ||
}; | ||
|
||
lower { | ||
bindings = < | ||
&trans &none &none &none &none &none &none &bootloader | ||
>; | ||
}; | ||
|
||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright (c) 2022 Dan Bostian | ||
* SPDX-License-Identifier: MIT | ||
*/ | ||
|
||
#include <dt-bindings/zmk/matrix_transform.h> | ||
|
||
/ { | ||
chosen { | ||
zmk,kscan = &kscan0; | ||
zmk,matrix_transform = &default_transform; | ||
}; | ||
|
||
default_transform: keymap_transform_0 { | ||
compatible = "zmk,matrix-transform"; | ||
columns = <4>; | ||
rows = <2>; | ||
|
||
map = < | ||
RC(0,0) RC(1,0) RC(0,1) RC(1,1) RC(0,2) RC(1,2) RC(0,3) RC(1,3) | ||
>; | ||
}; | ||
|
||
kscan0: kscan_0 { | ||
compatible = "zmk,kscan-gpio-matrix"; | ||
label = "KSCAN"; | ||
diode-direction = "col2row"; | ||
|
||
col-gpios | ||
= <&pro_micro 4 GPIO_ACTIVE_HIGH> | ||
, <&pro_micro 5 GPIO_ACTIVE_HIGH> | ||
, <&pro_micro 6 GPIO_ACTIVE_HIGH> | ||
, <&pro_micro 7 GPIO_ACTIVE_HIGH> | ||
; | ||
|
||
row-gpios | ||
= <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> | ||
, <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> | ||
; | ||
}; | ||
}; |
38 changes: 38 additions & 0 deletions
38
config/boards/shields/banana_split/boards/nice_nano.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright (c) 2021 The ZMK Contributors | ||
* | ||
* SPDX-License-Identifier: MIT | ||
*/ | ||
|
||
#include <dt-bindings/led/led.h> | ||
|
||
&spi1 { | ||
compatible = "nordic,nrf-spim"; | ||
status = "okay"; | ||
mosi-pin = <6>; | ||
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. | ||
sck-pin = <5>; | ||
miso-pin = <7>; | ||
|
||
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 = <5>; /* number of LEDs */ | ||
spi-one-frame = <0x70>; | ||
spi-zero-frame = <0x40>; | ||
|
||
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>; | ||
}; | ||
}; | ||
|
||
/ { | ||
chosen { | ||
zmk,underglow = &led_strip; | ||
}; | ||
}; |