Skip to content

Commit

Permalink
feat(shields): Add Zephirum.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cedric Vincent authored and cdc-mkb committed Oct 23, 2021
1 parent 55193f4 commit 9d764c1
Show file tree
Hide file tree
Showing 7 changed files with 220 additions and 0 deletions.
45 changes: 45 additions & 0 deletions app/boards/shields/zephirum/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Copyright (c) 2021 The ZMK Contributors
# SPDX-License-Identifier: MIT

if SHIELD_ZEPHIRUM

config ZMK_KEYBOARD_NAME
default "Zephirum"

if ZMK_DISPLAY

config I2C
default y

config SSD1306
default y

config SSD1306_REVERSE_MODE
default y

endif # ZMK_DISPLAY

if LVGL

config LVGL_HOR_RES_MAX
default 128

config LVGL_VER_RES_MAX
default 32

config LVGL_VDB_SIZE
default 64

config LVGL_DPI
default 148

config LVGL_BITS_PER_PIXEL
default 1

choice LVGL_COLOR_DEPTH
default LVGL_COLOR_DEPTH_1
endchoice

endif # LVGL

endif
8 changes: 8 additions & 0 deletions app/boards/shields/zephirum/Kconfig.shield
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#
# Copyright (c) 2021 The ZMK Contributors
#
# SPDX-License-Identifier: MIT
#

config SHIELD_ZEPHIRUM
def_bool $(shields_list_contains,zephirum)
27 changes: 27 additions & 0 deletions app/boards/shields/zephirum/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# [Zephirum](http://zephirum.tuxfamily.org)

## Description

Despite having a look similar to many other ergo monoblock angled
keyboards, this build has a couple of unique features:

- it has been designed with [LibrePCB](https://librepcb.org/). This EDA
tool deserves more love, so I published the project & library files
under CC0 1.0 licence.

- its MCU board is a Nucleo STM32WB55CG USB dongle (MB1293); it is
surface mounted on the top to showcase it ☺

Regarding the other features, they are more classic:

- it has been designed for Kailh Choc switches with MBK keycaps
(L=17.5mm × H=16.5mm)

- it is powered by ZMK; only USB HID is supported so far.

- it features an I²C 128x32 OLED screen (SSD1306)


## Resources

<https://git.tuxfamily.org/zephirum>
2 changes: 2 additions & 0 deletions app/boards/shields/zephirum/zephirum.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Uncomment the following line to enable OLED display.
# CONFIG_ZMK_DISPLAY=y
60 changes: 60 additions & 0 deletions app/boards/shields/zephirum/zephirum.keymap
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
* Copyright (c) 2021 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>

#define DEFAULT 0
#define SYMBOLS 1
#define NUM_NAV 2
#define COMPOSE 3
#define COMPOSE_CAP 4

#define COMP CAPS

/ {
keymap {
compatible = "zmk,keymap";

default_layer {
label ="Base";

bindings = <
&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp SQT
&kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp ENTER
&sk LGUI &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp SLASH &kp MINUS
&sl SYMBOLS &kp BSPC &sk LCTRL &sl NUM_NAV &sl COMPOSE &sk LALT &kp SPACE &sk RSHIFT
>;
};

symbols_layer {
label ="Symbols";
bindings = <
&kp COMP &none &kp LT &kp EQUAL &kp GT &kp MINUS &kp TILDE &kp LBKT &kp UNDER &kp RBKT &none &none
&none &kp HASH &kp LPAR &kp DLLR &kp RPAR &kp EXCL &kp AT &kp LBRC &kp STAR &kp RBRC &kp COLON &none
&trans &kp CARET &kp PRCNT &kp PIPE &kp BSLH &kp PLUS &kp AMPS &kp GRAVE &kp DQT &kp SQT &kp QMARK &none
&trans &kp DEL &trans &trans &trans &trans &trans &trans
>;
};

num_nav_layer {
label ="Num/Nav";
bindings = <
&kp COMP &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &none
&none &none &kp HOME &kp PG_UP &kp END &none &none &kp LEFT &kp UP &kp RIGHT &none &none
&trans &none &none &kp PG_DN &none &none &none &none &kp DOWN &none &none &none
&trans &trans &trans &trans &trans &trans &trans &trans
>;
};

compose_layer {
label ="Compose";
bindings = <&none>;
};
};
};
68 changes: 68 additions & 0 deletions app/boards/shields/zephirum/zephirum.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
* Copyright (c) 2021 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 = <12>;
rows = <4>;
map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(3,5) RC(3,4) RC(3,3) RC(3,2) RC(3,1) RC(3,0)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(4,5) RC(4,4) RC(4,3) RC(4,2) RC(4,1) RC(4,0)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(5,5) RC(5,4) RC(5,3) RC(5,2) RC(5,1) RC(5,0)
RC(2,6) RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(6,4) RC(6,5) RC(5,6)
>;
};

kscan0: kscan_0 {
compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN";
diode-direction = "col2row";

col-gpios = <&gpioa 5 GPIO_ACTIVE_HIGH>,
<&gpioa 6 GPIO_ACTIVE_HIGH>,
<&gpioa 7 GPIO_ACTIVE_HIGH>,
<&gpioa 1 GPIO_ACTIVE_HIGH>,
<&gpioa 8 GPIO_ACTIVE_HIGH>,
<&gpioa 9 GPIO_ACTIVE_HIGH>,
<&gpiob 2 GPIO_ACTIVE_HIGH>;

row-gpios = <&gpiob 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>,
<&gpioa 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>,
<&gpioa 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>,
<&gpiob 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>,
<&gpioa 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>,
<&gpioa 13 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>,
<&gpioa 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
};
};

&i2c1 {
status = "okay";

oled: ssd1306@3c {
compatible = "solomon,ssd1306fb";
reg = <0x3c>;
label = "DISPLAY";
width = <128>;
height = <32>;
segment-offset = <0>;
page-offset = <0>;
display-offset = <0>;
multiplex-ratio = <31>;
segment-remap;
com-invdir;
com-sequential;
prechargep = <0x22>;
};
};
10 changes: 10 additions & 0 deletions app/boards/shields/zephirum/zephirum.zmk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
file_format: "1"
id: zephirum
name: Zephirum
type: shield
url: http://zephirum.tuxfamily.org/
requires: [nucleo_wb55cg_dongle]
exposes: [i2c_oled]
features:
- keys
- display

0 comments on commit 9d764c1

Please sign in to comment.