Browse Source

feat(shields): add bfo9000 shield

PR: #472
xmkb
pbz 4 years ago committed by GitHub
parent
commit
dcd665999a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .github/workflows/build.yml
  2. 26
      app/boards/shields/bfo9000/Kconfig.defconfig
  3. 8
      app/boards/shields/bfo9000/Kconfig.shield
  4. 0
      app/boards/shields/bfo9000/bfo9000.conf
  5. 44
      app/boards/shields/bfo9000/bfo9000.dtsi
  6. 55
      app/boards/shields/bfo9000/bfo9000.keymap
  7. 0
      app/boards/shields/bfo9000/bfo9000_left.conf
  8. 21
      app/boards/shields/bfo9000/bfo9000_left.overlay
  9. 0
      app/boards/shields/bfo9000/bfo9000_right.conf
  10. 25
      app/boards/shields/bfo9000/bfo9000_right.overlay
  11. 13
      app/boards/shields/bfo9000/readme.md
  12. 1
      docs/docs/hardware.md
  13. 6
      docs/static/setup.ps1
  14. 3
      docs/static/setup.sh

2
.github/workflows/build.yml

@ -23,6 +23,8 @@ jobs:
- nrfmicro_13 - nrfmicro_13
- proton_c - proton_c
shield: shield:
- bfo9000_left
- bfo9000_right
- boardsource3x4 - boardsource3x4
- corne_left - corne_left
- corne_right - corne_right

26
app/boards/shields/bfo9000/Kconfig.defconfig

@ -0,0 +1,26 @@
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
if SHIELD_BFO9000_LEFT
config ZMK_SPLIT_BLE_ROLE_CENTRAL
default y
config ZMK_KEYBOARD_NAME
default "BFO9000 Left"
endif
if SHIELD_BFO9000_RIGHT
config ZMK_KEYBOARD_NAME
default "BFO9000 Right"
endif
if SHIELD_BFO9000_LEFT || SHIELD_BFO9000_RIGHT
config ZMK_SPLIT
default y
endif

8
app/boards/shields/bfo9000/Kconfig.shield

@ -0,0 +1,8 @@
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
config SHIELD_BFO9000_LEFT
def_bool $(shields_list_contains,bfo9000_left)
config SHIELD_BFO9000_RIGHT
def_bool $(shields_list_contains,bfo9000_right)

0
app/boards/shields/bfo9000/bfo9000.conf

44
app/boards/shields/bfo9000/bfo9000.dtsi

@ -0,0 +1,44 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* 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 = <18>;
rows = <6>;
map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,15) RC(0,16) RC(0,17)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,14) RC(1,15) RC(1,16) RC(1,17)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) RC(2,14) RC(2,15) RC(2,16) RC(2,17)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,13) RC(3,14) RC(3,15) RC(3,16) RC(3,17)
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,14) RC(4,15) RC(4,16) RC(4,17)
RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(5,5) RC(5,6) RC(5,7) RC(5,8) RC(5,9) RC(5,10) RC(5,11) RC(5,12) RC(5,13) RC(5,14) RC(5,15) RC(5,16) RC(5,17)
>;
};
kscan0: kscan {
compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN";
diode-direction = "col2row";
row-gpios
= <&pro_micro_d 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;
};
};

55
app/boards/shields/bfo9000/bfo9000.keymap

@ -0,0 +1,55 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/outputs.h>
#include <dt-bindings/zmk/ext_power.h>
#include <dt-bindings/zmk/rgb.h>
#define DEFAULT 0
#define LOWER 1
/ {
keymap {
compatible = "zmk,keymap";
default_layer {
// | Esc | Vol Up | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Del |
// | Home | Vol Dn | ` | 1 | 2 | 3 | 4 | 5 | 6 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bk Spc |
// | End | Tab | Tab | Q | W | E | R | T | Y | T | Y | U | I | O | P | [ | ] | \ |
// | Pg Up | Caps | Ctrl | A | S | D | F | G | H | G | H | J | K | L | ; | ' | Enter | Enter |
// | Pg Dn | Up | Shift | Z | X | C | V | B | N | B | N | M | , | . | / | Shift | Up | |
// | Left | Dn | Right | Ctrl | Alt | Win | Spc | Spc | Enter | Bk Spc | Spc | Spc | Win | Alt | Ctrl | Left | Dn | Right |
bindings = <
&kp ESC &kp C_VOL_UP &kp ESC &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL
&kp HOME &kp C_VOL_DN &kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC
&kp END &kp TAB &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH
&kp PG_UP &kp CAPS &kp LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp APOS &kp ENTER &kp ENTER
&kp PG_DN &kp UP &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp B &kp N &kp M &kp COMMA &kp DOT &kp SLASH &kp RSHFT &kp UP &mo LOWER
&kp LEFT &kp DOWN &kp RIGHT &kp LCTRL &kp LALT &kp LMETA &kp SPACE &kp SPACE &kp ENTER &kp BSPC &kp SPACE &kp SPACE &kp RMETA &kp RALT &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
>;
};
lower_layer {
// | | | | | | | | | | | | | | | | | | |
// | | | | | | | | | | | | | | | | | | |
// | | | | | | | | | | | | | | | | | | |
// | | | | | | | | | | | | | | | | | | |
// | | | | | | | | | | | | | | | | | | |
// | | | | | | | | | | | | | | | | | | |
bindings = <
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 5 &bt BT_SEL 6 &bt BT_SEL 7 &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 5 &bt BT_SEL 6 &bt BT_SEL 7
&out OUT_USB &out OUT_BLE &trans &trans &trans &trans &trans &trans &trans &out OUT_USB &out OUT_BLE &trans &trans &trans &trans &trans &trans &trans
&ext_power EP_ON &ext_power EP_OFF &trans &trans &trans &trans &trans &trans &trans &ext_power EP_ON &ext_power EP_OFF &trans &trans &trans &trans &trans &trans &trans
&reset &bootloader &trans &trans &trans &trans &trans &trans &trans &reset &bootloader &trans &trans &trans &trans &trans &trans &trans
&rgb_ug RGB_TOG &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &rgb_ug RGB_SPI &rgb_ug RGB_EFF &trans &trans &trans &rgb_ug RGB_TOG &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &rgb_ug RGB_SPI &rgb_ug RGB_EFF &trans &trans &trans
&trans &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &rgb_ug RGB_SPD &rgb_ug RGB_EFR &trans &trans &trans &trans &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &rgb_ug RGB_SPD &rgb_ug RGB_EFR &trans &trans &trans
>;
};
};
};

0
app/boards/shields/bfo9000/bfo9000_left.conf

21
app/boards/shields/bfo9000/bfo9000_left.overlay

@ -0,0 +1,21 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include "bfo9000.dtsi"
&kscan0 {
col-gpios
= <&pro_micro_d 9 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 10 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 16 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 14 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 15 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 0 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 1 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 2 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 3 GPIO_ACTIVE_HIGH>
;
};

0
app/boards/shields/bfo9000/bfo9000_right.conf

25
app/boards/shields/bfo9000/bfo9000_right.overlay

@ -0,0 +1,25 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include "bfo9000.dtsi"
&default_transform {
col-offset = <9>;
};
&kscan0 {
col-gpios
= <&pro_micro_d 9 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 10 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 16 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 14 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 15 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 0 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 1 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 2 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 3 GPIO_ACTIVE_HIGH>
;
};

13
app/boards/shields/bfo9000/readme.md

@ -0,0 +1,13 @@
# [BFO-9000](https://keeb.io/products/bfo-9000-keyboard-customizable-full-size-split-ortholinear)
Customizable full-size split ortholinear.
## Features
* Compatible with MX-compatible, Alps-compatible, and Kailh Low-Profile Choc switches.
* Breakoff pieces to allow for 4 to 6 rows and 7 to 9 columns.
* RGB LED connections
## Hardware Notes
[Included default keymap](http://www.keyboard-layout-editor.com/#/gists/51293c31afcd5f1765e8f413a46bfcf8)

1
docs/docs/hardware.md

@ -38,6 +38,7 @@ That being said, there are currently only a few specific [boards](/docs/faq#what
- [CRBN](https://keygem.store/collections/group-buys/products/group-buy-featherlight-40-kit) (`crbn`) - [CRBN](https://keygem.store/collections/group-buys/products/group-buy-featherlight-40-kit) (`crbn`)
- [tidbit](https://nullbits.co/tidbit/) (`tidbit`) - [tidbit](https://nullbits.co/tidbit/) (`tidbit`)
- [Eek!](https://www.cbkbd.com/product/eek-keyboard) (`eek`) - [Eek!](https://www.cbkbd.com/product/eek-keyboard) (`eek`)
- [BFO-9000](https://keeb.io/products/bfo-9000-keyboard-customizable-full-size-split-ortholinear) (`bfo9000_left` and `bfo9000_right`)
## Other Hardware ## Other Hardware

6
docs/static/setup.ps1 vendored

@ -91,9 +91,9 @@ Write-Host "Keyboard Shield Selection:"
$prompt = "Pick a keyboard" $prompt = "Pick a keyboard"
# TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos. # TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos.
$options = "Kyria", "Lily58", "Corne", "Splitreus62", "Sofle", "Iris", "Reviung41", "RoMac", "RoMac+", "makerdiary M60", "Microdox", "TG4X", "QAZ", "NIBBLE", "Jorne", "Jian", "CRBN", "Tidbit", "Eek!" $options = "Kyria", "Lily58", "Corne", "Splitreus62", "Sofle", "Iris", "Reviung41", "RoMac", "RoMac+", "makerdiary M60", "Microdox", "TG4X", "QAZ", "NIBBLE", "Jorne", "Jian", "CRBN", "Tidbit", "Eek!", "BFO-9000"
$names = "kyria", "lily58", "corne", "splitreus62", "sofle", "iris", "reviung41", "romac", "romac_plus", "m60", "microdox", "tg4x", "qaz", "nibble", "jorne", "jian", "crbn", "tidbit", "eek" $names = "kyria", "lily58", "corne", "splitreus62", "sofle", "iris", "reviung41", "romac", "romac_plus", "m60", "microdox", "tg4x", "qaz", "nibble", "jorne", "jian", "crbn", "tidbit", "eek", "bfo9000"
$splits = "y", "y", "y", "y", "y", "y", "n", "n", "n", "n", "y", "n", "n", "n", "y", "y", "n", "n", "n" $splits = "y", "y", "y", "y", "y", "y", "n", "n", "n", "n", "y", "n", "n", "n", "y", "y", "n", "n", "n", "n"
$choice = Get-Choice-From-Options -Options $options -Prompt $prompt $choice = Get-Choice-From-Options -Options $options -Prompt $prompt
$shield_title = $($options[$choice]) $shield_title = $($options[$choice])

3
docs/static/setup.sh vendored

@ -92,7 +92,7 @@ echo ""
echo "Keyboard Shield Selection:" echo "Keyboard Shield Selection:"
prompt="Pick an keyboard:" prompt="Pick an keyboard:"
options=("Kyria" "Lily58" "Corne" "Splitreus62" "Sofle" "Iris" "Reviung41" "RoMac" "RoMac+" "makerdiary M60" "Microdox" "TG4X" "QAZ" "Jorne" "Jian" "CRBN" "Tidbit" "Eek!") options=("Kyria" "Lily58" "Corne" "Splitreus62" "Sofle" "Iris" "Reviung41" "RoMac" "RoMac+" "makerdiary M60" "Microdox" "TG4X" "QAZ" "Jorne" "Jian" "CRBN" "Tidbit" "Eek!" "BF0-9000")
PS3="$prompt " PS3="$prompt "
# TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos. # TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos.
@ -120,6 +120,7 @@ select opt in "${options[@]}" "Quit"; do
17 ) shield_title="CRBN" shield="crbn"; split="n"; break;; 17 ) shield_title="CRBN" shield="crbn"; split="n"; break;;
18 ) shield_title="Tidbit" shield="tidbit"; split="n" break;; 18 ) shield_title="Tidbit" shield="tidbit"; split="n" break;;
19 ) shield_title="Eek!" shield="eek"; split="n" break;; 19 ) shield_title="Eek!" shield="eek"; split="n" break;;
17 ) shield_title="BFO-9000" shield="bfo9000"; split="y"; break;;
# Add link to docs on adding your own custom shield in your ZMK config! # Add link to docs on adding your own custom shield in your ZMK config!
# $(( ${#options[@]}+1 )) ) echo "Other!"; break;; # $(( ${#options[@]}+1 )) ) echo "Other!"; break;;

Loading…
Cancel
Save