Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
nekoewen authored Dec 12, 2024
1 parent 19a7b38 commit ced1286
Show file tree
Hide file tree
Showing 6 changed files with 141 additions and 0 deletions.
10 changes: 10 additions & 0 deletions config/boards/shields/banana_split/Kconfig.defconfig
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

5 changes: 5 additions & 0 deletions config/boards/shields/banana_split/Kconfig.shield
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)
3 changes: 3 additions & 0 deletions config/boards/shields/banana_split/banana_split.conf
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
44 changes: 44 additions & 0 deletions config/boards/shields/banana_split/banana_split.keymap
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 = <
&lt 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
>;
};

};
};
41 changes: 41 additions & 0 deletions config/boards/shields/banana_split/banana_split.overlay
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 config/boards/shields/banana_split/boards/nice_nano.overlay
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;
};
};

0 comments on commit ced1286

Please sign in to comment.