Skip to content

Commit 5f54e9c

Browse files
committed
lily
0 parents  commit 5f54e9c

91 files changed

Lines changed: 2665 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
on: [push, pull_request, workflow_dispatch]
2+
3+
jobs:
4+
build:
5+
uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@main

boards/arm/blelu/CMakeLists.txt

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
if(CONFIG_ZMK_DISPLAY)
2+
target_sources_ifdef(CONFIG_CUSTOM_WIDGET_BATTERY_STATUS app PRIVATE widgets/battery_status.c)
3+
target_sources_ifdef(CONFIG_CUSTOM_WIDGET_OUTPUT_STATUS app PRIVATE widgets/output_status.c)
4+
target_sources_ifdef(CONFIG_CUSTOM_WIDGET_LAYER_STATUS app PRIVATE widgets/layer_status.c)
5+
target_sources_ifdef(CONFIG_CUSTOM_WIDGET_PERIPHERAL_STATUS app PRIVATE widgets/peripheral_status.c)
6+
7+
add_subdirectory_ifdef(CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM widgets/icons)
8+
endif()
9+
10+
zephyr_library()
11+
12+
if(CONFIG_ZMK_DISPLAY)
13+
if(CONFIG_CUSTOM_WIDGET_BATTERY_STATUS)
14+
zephyr_library_sources(widgets/icons/batt_100.c)
15+
zephyr_library_sources(widgets/icons/batt_100_chg.c)
16+
zephyr_library_sources(widgets/icons/batt_75.c)
17+
zephyr_library_sources(widgets/icons/batt_75_chg.c)
18+
zephyr_library_sources(widgets/icons/batt_50.c)
19+
zephyr_library_sources(widgets/icons/batt_50_chg.c)
20+
zephyr_library_sources(widgets/icons/batt_25.c)
21+
zephyr_library_sources(widgets/icons/batt_25_chg.c)
22+
zephyr_library_sources(widgets/icons/batt_5.c)
23+
zephyr_library_sources(widgets/icons/batt_5_chg.c)
24+
zephyr_library_sources(widgets/icons/batt_0.c)
25+
zephyr_library_sources(widgets/icons/batt_0_chg.c)
26+
endif()
27+
if(CONFIG_CUSTOM_WIDGET_PERIPHERAL_STATUS)
28+
zephyr_library_sources(widgets/icons/bluetooth_advertising.c)
29+
zephyr_library_sources(widgets/icons/bluetooth_connected_right.c)
30+
zephyr_library_sources(widgets/icons/bluetooth_disconnected_right.c)
31+
endif()
32+
if(CONFIG_CUSTOM_WIDGET_OUTPUT_STATUS)
33+
zephyr_library_sources(widgets/icons/USB_connected.c)
34+
zephyr_library_sources(widgets/icons/bluetooth_connected_1.c)
35+
zephyr_library_sources(widgets/icons/bluetooth_connected_2.c)
36+
zephyr_library_sources(widgets/icons/bluetooth_connected_3.c)
37+
zephyr_library_sources(widgets/icons/bluetooth_connected_4.c)
38+
zephyr_library_sources(widgets/icons/bluetooth_connected_5.c)
39+
zephyr_library_sources(widgets/icons/bluetooth_advertising_1.c)
40+
zephyr_library_sources(widgets/icons/bluetooth_advertising_2.c)
41+
zephyr_library_sources(widgets/icons/bluetooth_advertising_3.c)
42+
zephyr_library_sources(widgets/icons/bluetooth_advertising_4.c)
43+
zephyr_library_sources(widgets/icons/bluetooth_advertising_5.c)
44+
zephyr_library_sources(widgets/icons/bluetooth_disconnected_right.c)
45+
endif()
46+
if(CONFIG_CUSTOM_WIDGET_LAYER_STATUS)
47+
zephyr_library_sources(widgets/icons/layers.c)
48+
zephyr_library_sources(widgets/icons/layers2.c)
49+
endif()
50+
if(NOT CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
51+
zephyr_library_sources(widgets/icons/zenlogo.c)
52+
endif()
53+
endif()
54+
55+
zephyr_library_include_directories(${ZEPHYR_LVGL_MODULE_DIR})
56+
zephyr_library_include_directories(${ZEPHYR_BASE}/lib/gui/lvgl/)
57+
zephyr_library_sources_ifdef(CONFIG_ZMK_DISPLAY custom_status_screen.c)
58+
zephyr_library_sources(${ZEPHYR_BASE}/misc/empty_file.c)
59+
zephyr_library_include_directories(${CMAKE_SOURCE_DIR}/include)
60+
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

boards/arm/blelu/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#
2+
# Copyright (c) 2022 The ZMK Contributors
3+
# SPDX-License-Identifier: MIT
4+
#
5+
6+
config BOARD_BLELUE_LEFT
7+
bool
8+
9+
config BOARD_BLELUE_RIGHT
10+
bool

boards/arm/blelu/Kconfig.board

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#
2+
# Copyright (c) 2024 Kyle Brown
3+
# SPDX-License-Identifier: MIT
4+
#
5+
6+
config BOARD_BLELUE_LEFT
7+
bool "blelu left"
8+
depends on SOC_NRF52840_QIAA
9+
10+
config BOARD_BLELUE_RIGHT
11+
bool "blelu right"
12+
depends on SOC_NRF52840_QIAA

boards/arm/blelu/Kconfig.defconfig

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
#
2+
# Copyright (c) 2024 Kyle Brown
3+
# SPDX-License-Identifier: MIT
4+
#
5+
6+
if BOARD_BLELUE_LEFT
7+
8+
config ZMK_KEYBOARD_NAME
9+
default "BLELUE"
10+
11+
config ZMK_SPLIT_ROLE_CENTRAL
12+
default y
13+
14+
endif # BOARD_BLELUE_LEFT
15+
16+
17+
if BOARD_BLELUE_LEFT || BOARD_BLELUE_RIGHT
18+
19+
config BOARD
20+
default "blelu"
21+
22+
config ZMK_SPLIT
23+
default y
24+
25+
config BT_CTLR
26+
default BT
27+
28+
if USB
29+
30+
config USB_NRFX
31+
default y
32+
33+
config USB_DEVICE_STACK
34+
default y
35+
36+
endif # USB
37+
38+
config ZMK_DISPLAY
39+
select LV_USE_CONT
40+
select LV_FONT_MONTSERRAT_26
41+
select LV_FONT_MONTSERRAT_16
42+
select LV_USE_LABEL
43+
select LV_USE_IMG
44+
45+
choice ZMK_DISPLAY_STATUS_SCREEN
46+
default ZMK_DISPLAY_STATUS_SCREEN_CUSTOM
47+
endchoice
48+
49+
if ZMK_DISPLAY
50+
51+
config SPI
52+
default y
53+
54+
config IL0323
55+
default y
56+
57+
config ZMK_DISPLAY_BLANK_ON_IDLE
58+
default n
59+
60+
# Needed for the IL0323 driver which allocs memory to clear the display
61+
config HEAP_MEM_POOL_SIZE
62+
default 1024
63+
64+
config LV_Z_MEM_POOL_SIZE
65+
default 4096
66+
67+
endif # ZMK_DISPLAY
68+
69+
menuconfig CUSTOM_WIDGET_BATTERY_STATUS
70+
bool "custom battery status widget"
71+
72+
menuconfig CUSTOM_WIDGET_OUTPUT_STATUS
73+
bool "custom output status widget"
74+
75+
menuconfig CUSTOM_WIDGET_LAYER_STATUS
76+
bool "custom layer status widget"
77+
78+
menuconfig CUSTOM_WIDGET_PERIPHERAL_STATUS
79+
bool "custom peripheral status widget"
80+
81+
endif # BOARD_BLELUE_LEFT || BOARD_BLELUE_RIGHT

boards/arm/blelu/blelu.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Go to sleep after one hour (1*60*60*1000ms)
2+
CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=3600000
3+
4+
# Turn on logging, and set ZMK logging to debug output
5+
# CONFIG_ZMK_USB_LOGGING=y

boards/arm/blelu/blelu.dtsi

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
/*
2+
*
3+
* Copyright (c) 2024 Kyle Brown
4+
* SPDX-License-Identifier: MIT
5+
*
6+
*/
7+
8+
/dts-v1/;
9+
#include <nordic/nrf52840_qiaa.dtsi>
10+
11+
#include <dt-bindings/zmk/matrix_transform.h>
12+
#include <layouts/kata0510/lily58.dtsi>
13+
14+
15+
16+
/ {
17+
model = "BLELUE";
18+
compatible = "blelu";
19+
20+
chosen {
21+
zephyr,code-partition = &code_partition;
22+
zephyr,sram = &sram0;
23+
zephyr,flash = &flash0;
24+
zmk,kscan = &kscan0;
25+
zmk,display = &epd;
26+
zephyr,console = &cdc_acm_uart;
27+
zmk,matrix-transform = &default_transform;
28+
};
29+
30+
default_transform: keymap_transform_0 {
31+
compatible = "zmk,matrix-transform";
32+
columns = <16>;
33+
rows = <5>;
34+
// | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 |
35+
// | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 |
36+
// | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 |
37+
// | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | SW25 | | SW25 | SW19 | SW20 | SW21 | SW22 | SW23 | SW24 |
38+
// | SW29 | SW28 | SW27 | SW26 | | SW26 | SW27 | SW28 | SW29 |
39+
map = <
40+
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)
41+
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)
42+
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)
43+
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11)
44+
RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,7) RC(4,8) RC(4,9) RC(4,10)
45+
>;
46+
};
47+
};
48+
&kata0510_lily58_layout {
49+
transform = <&default_transform>;
50+
kscan = <&kscan0>;
51+
};
52+
53+
&adc {
54+
status = "okay";
55+
};
56+
57+
&gpiote {
58+
status = "okay";
59+
};
60+
61+
&gpio0 {
62+
status = "okay";
63+
};
64+
65+
&gpio1 {
66+
status = "okay";
67+
};
68+
69+
&usbd {
70+
status = "okay";
71+
cdc_acm_uart: cdc_acm_uart {
72+
compatible = "zephyr,cdc-acm-uart";
73+
};
74+
};
75+
76+
&flash0 {
77+
/*
78+
* For more information, see:
79+
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
80+
*/
81+
partitions {
82+
compatible = "fixed-partitions";
83+
#address-cells = <1>;
84+
#size-cells = <1>;
85+
86+
sd_partition: partition@0 {
87+
label = "mbr";
88+
reg = <0x00000000 0x00001000>;
89+
};
90+
code_partition: partition@1000 {
91+
label = "code_partition";
92+
reg = <0x00001000 0x000d3000>;
93+
};
94+
95+
storage_partition: partition@d4000 {
96+
label = "storage";
97+
reg = <0x000d4000 0x00020000>;
98+
};
99+
100+
boot_partition: partition@f4000 {
101+
label = "adafruit_boot";
102+
reg = <0x000f4000 0x0000c000>;
103+
};
104+
};
105+
};

boards/arm/blelu/blelu.keymap

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/*
2+
* Copyright (c) 2020 The ZMK Contributors
3+
*
4+
* SPDX-License-Identifier: MIT
5+
*/
6+
7+
8+
#include <behaviors.dtsi>
9+
#include <dt-bindings/zmk/keys.h>
10+
#include <dt-bindings/zmk/bt.h>
11+
#include <dt-bindings/zmk/ext_power.h>
12+
13+
/ {
14+
keymap {
15+
compatible = "zmk,keymap";
16+
17+
default_layer {
18+
// ------------------------------------------------------------------------------------------------------------
19+
// | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` |
20+
// | TAB | Q | W | E | R | T | | Y | U | I | O | P | - |
21+
// | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' |
22+
// | SHIFT | Z | X | C | V | B | "[" | | "]" | N | M | , | . | / | SHIFT |
23+
// | ALT | GUI | LOWER| SPACE | | ENTER | RAISE| BSPC | GUI |
24+
bindings = <
25+
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp GRAVE
26+
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp MINUS
27+
&kp LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
28+
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LBKT &kp RBKT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
29+
&kp LALT &kp LGUI &mo 1 &kp SPACE &kp RET &mo 2 &kp BSPC &kp RGUI
30+
>;
31+
};
32+
lower_layer {
33+
// ------------------------------------------------------------------------------------------------------------
34+
// | BTCLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | |
35+
// | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |
36+
// | ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | ~ |
37+
// | | | | | | | | | | | _ | + | { | } | "|" |
38+
// | | | | | | | | | |
39+
bindings = <
40+
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &trans
41+
&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12
42+
&kp GRAVE &kp EXCL &kp AT &kp HASH &kp DOLLAR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp TILDE
43+
&trans &ext_power EP_ON &ext_power EP_OFF &ext_power EP_TOG &trans &trans &trans &trans &trans &kp MINUS &kp KP_PLUS &kp LBRC &kp RBRC &kp PIPE
44+
&trans &trans &trans &trans &trans &trans &trans &trans
45+
>;
46+
};
47+
48+
raise_layer {
49+
// ------------------------------------------------------------------------------------------------------------
50+
// | | | | | | | | | | | | | |
51+
// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | |
52+
// | F1 | F2 | F3 | F4 | F5 | F6 | | | <- | v | ^ | -> | |
53+
// | F7 | F8 | F9 | F10 | F11 | F12 | | | | + | - | = | [ | ] | \ |
54+
// | | | | | | | | | |
55+
bindings = <
56+
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
57+
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &trans
58+
&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &trans &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans
59+
&kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &trans &trans &kp KP_PLUS &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH
60+
&trans &trans &trans &trans &trans &trans &trans &trans
61+
>;
62+
};
63+
};
64+
};

boards/arm/blelu/blelu.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
identifier: blelu
2+
name: BLELUE
3+
url:
4+
type: mcu
5+
arch: arm
6+
toolchain:
7+
- zephyr
8+
- gnuarmemb
9+
- xtools
10+
ram: 40
11+
supported:
12+
- adc
13+
- usb_device
14+
- ble
15+
- ieee802154
16+
- pwm
17+
- watchdog
18+
- gpio
19+
- i2c
20+
- spi

boards/arm/blelu/blelu.zmk.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
file_format: "1"
2+
id: blelu
3+
name: BLELUE
4+
url:
5+
type: board
6+
arch: arm
7+
features:
8+
- keys
9+
- display
10+
- studio
11+
outputs:
12+
- usb
13+
- ble
14+
siblings:
15+
- blelu_left
16+
- blelu_right

0 commit comments

Comments
 (0)