This commit is contained in:
laidbackhacker 2022-12-28 12:43:02 +00:00
commit f39d671c93
133 changed files with 4213 additions and 173 deletions
app
Kconfig
boards
arm
blackpill_f401ce.confblackpill_f401ce.overlayblackpill_f411ce.confblackpill_f411ce.overlay
interconnects
nrf52840dk_nrf52840.confnrf5340dk_nrf5340_cpuapp.confnrf5340dk_nrf5340_cpuapp.overlay
shields

View file

@ -355,6 +355,14 @@ config ZMK_BEHAVIOR_KEY_TOGGLE
bool
default $(dt_compat_enabled,$(DT_COMPAT_ZMK_BEHAVIOR_KEY_TOGGLE))
config ZMK_MACRO_DEFAULT_WAIT_MS
int "Default time to wait (in milliseconds) before triggering the next behavior in macros"
default 15
config ZMK_MACRO_DEFAULT_TAP_MS
int "Default time to wait (in milliseconds) between the press and release events of a tapped behavior in macros"
default 30
endmenu
menu "Advanced"

View file

@ -1,5 +1,9 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
# Uncomment these lines below to enable encoders.
# CONFIG_EC11=y
# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
# Uncomment the line below to enable RGB.
# CONFIG_ZMK_RGB_UNDERGLOW=y

View file

@ -0,0 +1,9 @@
file_format: "1"
id: blackpill_f401ce
name: BlackPill F401CE
type: board
arch: arm
outputs:
- usb
url: https://github.com/WeActStudio/WeActStudio.MiniSTM32F4x1
exposes: [blackpill]

View file

@ -0,0 +1,9 @@
file_format: "1"
id: blackpill_f411ce
name: BlackPill F411CE
type: board
arch: arm
outputs:
- usb
url: https://github.com/WeActStudio/WeActStudio.MiniSTM32F4x1
exposes: [blackpill]

View file

@ -0,0 +1,60 @@
if(CONFIG_ZMK_DISPLAY)
target_sources_ifdef(CONFIG_CUSTOM_WIDGET_BATTERY_STATUS app PRIVATE widgets/battery_status.c)
target_sources_ifdef(CONFIG_CUSTOM_WIDGET_OUTPUT_STATUS app PRIVATE widgets/output_status.c)
target_sources_ifdef(CONFIG_CUSTOM_WIDGET_LAYER_STATUS app PRIVATE widgets/layer_status.c)
target_sources_ifdef(CONFIG_CUSTOM_WIDGET_PERIPHERAL_STATUS app PRIVATE widgets/peripheral_status.c)
add_subdirectory_ifdef(CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM widgets/icons)
endif()
zephyr_library()
if(CONFIG_ZMK_DISPLAY)
if(CONFIG_CUSTOM_WIDGET_BATTERY_STATUS)
zephyr_library_sources(widgets/icons/batt_100.c)
zephyr_library_sources(widgets/icons/batt_100_chg.c)
zephyr_library_sources(widgets/icons/batt_75.c)
zephyr_library_sources(widgets/icons/batt_75_chg.c)
zephyr_library_sources(widgets/icons/batt_50.c)
zephyr_library_sources(widgets/icons/batt_50_chg.c)
zephyr_library_sources(widgets/icons/batt_25.c)
zephyr_library_sources(widgets/icons/batt_25_chg.c)
zephyr_library_sources(widgets/icons/batt_5.c)
zephyr_library_sources(widgets/icons/batt_5_chg.c)
zephyr_library_sources(widgets/icons/batt_0.c)
zephyr_library_sources(widgets/icons/batt_0_chg.c)
endif()
if(CONFIG_CUSTOM_WIDGET_PERIPHERAL_STATUS)
zephyr_library_sources(widgets/icons/bluetooth_advertising.c)
zephyr_library_sources(widgets/icons/bluetooth_connected_right.c)
zephyr_library_sources(widgets/icons/bluetooth_disconnected_right.c)
endif()
if(CONFIG_CUSTOM_WIDGET_OUTPUT_STATUS)
zephyr_library_sources(widgets/icons/USB_connected.c)
zephyr_library_sources(widgets/icons/bluetooth_connected_1.c)
zephyr_library_sources(widgets/icons/bluetooth_connected_2.c)
zephyr_library_sources(widgets/icons/bluetooth_connected_3.c)
zephyr_library_sources(widgets/icons/bluetooth_connected_4.c)
zephyr_library_sources(widgets/icons/bluetooth_connected_5.c)
zephyr_library_sources(widgets/icons/bluetooth_advertising_1.c)
zephyr_library_sources(widgets/icons/bluetooth_advertising_2.c)
zephyr_library_sources(widgets/icons/bluetooth_advertising_3.c)
zephyr_library_sources(widgets/icons/bluetooth_advertising_4.c)
zephyr_library_sources(widgets/icons/bluetooth_advertising_5.c)
zephyr_library_sources(widgets/icons/bluetooth_disconnected_right.c)
endif()
if(CONFIG_CUSTOM_WIDGET_LAYER_STATUS)
zephyr_library_sources(widgets/icons/layers.c)
zephyr_library_sources(widgets/icons/layers2.c)
endif()
if(CONFIG_BOARD_CORNEISH_ZEN_V2_RIGHT)
zephyr_library_sources(widgets/icons/zenlogo.c)
endif()
endif()
zephyr_library_include_directories(${ZEPHYR_LVGL_MODULE_DIR})
zephyr_library_include_directories(${ZEPHYR_BASE}/lib/gui/lvgl/)
zephyr_library_sources_ifdef(CONFIG_ZMK_DISPLAY custom_status_screen.c)
zephyr_library_sources(${ZEPHYR_BASE}/misc/empty_file.c)
zephyr_library_include_directories(${CMAKE_SOURCE_DIR}/include)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -0,0 +1,12 @@
#
# Copyright (c) 2022 Darryl deHaan
# SPDX-License-Identifier: MIT
#
config BOARD_CORNEISH_ZEN_V2_LEFT
bool "corneish zen left v2"
depends on SOC_NRF52840_QIAA
config BOARD_CORNEISH_ZEN_V2_RIGHT
bool "corneish zen right v2"
depends on SOC_NRF52840_QIAA

View file

@ -0,0 +1,81 @@
#
# Copyright (c) 2022 Darryl deHaan
# SPDX-License-Identifier: MIT
#
if BOARD_CORNEISH_ZEN_V2_LEFT
config ZMK_KEYBOARD_NAME
default "Corne-ish Zen"
config ZMK_SPLIT_ROLE_CENTRAL
default y
endif # BOARD_CORNEISH_ZEN_V2_LEFT
if BOARD_CORNEISH_ZEN_V2_LEFT || BOARD_CORNEISH_ZEN_V2_RIGHT
config BOARD
default "corneish_zen"
config ZMK_SPLIT
default y
config BT_CTLR
default BT
config ZMK_BLE
default y
config ZMK_USB
default y
if USB
config USB_NRFX
default y
config USB_DEVICE_STACK
default y
endif # USB
config ZMK_DISPLAY
select LVGL_USE_CONT
select LVGL_FONT_MONTSERRAT_26
select LVGL_FONT_MONTSERRAT_20
select LVGL_FONT_MONTSERRAT_16
select LVGL_USE_LABEL
select LVGL_USE_IMG
choice ZMK_DISPLAY_STATUS_SCREEN
default ZMK_DISPLAY_STATUS_SCREEN_CUSTOM
endchoice
if ZMK_DISPLAY
config SPI
default y
config IL0323
default y
config ZMK_DISPLAY_BLANK_ON_IDLE
default n
endif # ZMK_DISPLAY
menuconfig CUSTOM_WIDGET_BATTERY_STATUS
bool "custom battery status widget"
menuconfig CUSTOM_WIDGET_OUTPUT_STATUS
bool "custom output status widget"
menuconfig CUSTOM_WIDGET_LAYER_STATUS
bool "custom layer status widget"
menuconfig CUSTOM_WIDGET_PERIPHERAL_STATUS
bool "custom peripheral status widget"
endif # BOARD_CORNEISH_ZEN_V2_LEFT || BOARD_CORNEISH_ZEN_V2_RIGHT

View file

@ -0,0 +1,5 @@
# SPDX-License-Identifier: MIT
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake)
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)

View file

@ -0,0 +1,5 @@
# Go to sleep after one hour (1*60*60*1000ms)
CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=3600000
# Turn on logging, and set ZMK logging to debug output
# CONFIG_ZMK_USB_LOGGING=y

View file

@ -0,0 +1,126 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include <dt-bindings/zmk/matrix_transform.h>
/ {
model = "corneish_zen_v2";
compatible = "corneish_zen_v2";
chosen {
zephyr,code-partition = &code_partition;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zmk,kscan = &kscan0;
zmk,display = &epd;
zmk,battery = &vbatt;
zephyr,console = &cdc_acm_uart;
};
default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform";
columns = <12>;
rows = <4>;
// | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 |
// | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 |
// | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 |
// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 |
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(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(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(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8)
>;
};
five_column_transform: keymap_transform_1 {
compatible = "zmk,matrix-transform";
columns = <10>;
rows = <4>;
// | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 |
// | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 |
// | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 |
// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 |
map = <
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(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(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(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8)
>;
};
};
&adc {
status = "okay";
};
&gpiote {
status = "okay";
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&usbd {
status = "okay";
cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0";
};
};
&flash0 {
/*
* For more information, see:
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
*/
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
sd_partition: partition@0 {
label = "softdevice";
reg = <0x00000000 0x00026000>;
};
code_partition: partition@26000 {
label = "code_partition";
reg = <0x00026000 0x000c6000>;
};
/*
* The flash starting at 0x000ec000 and ending at
* 0x000f3fff is reserved for use by the application.
*/
/*
* Storage partition will be used by FCB/LittleFS/NVS
* if enabled.
*/
storage_partition: partition@ec000 {
label = "storage";
reg = <0x000ec000 0x00008000>;
};
boot_partition: partition@f4000 {
label = "adafruit_boot";
reg = <0x000f4000 0x0000c000>;
};
};
};

View file

@ -0,0 +1,67 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
/ {
chosen {
zmk,matrix_transform = &default_transform;
//zmk,matrix_transform = &five_column_transform;
};
};
/ {
keymap {
compatible = "zmk,keymap";
default_layer {
label = "QWERTY";
// -----------------------------------------------------------------------------------------
// | TAB | Q | W | E | R | T | | Y | U | I | O | P | BKSP |
// | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' |
// | SHFT | Z | X | C | V | B | | N | M | , | . | / | ESC |
// | GUI | LWR | SPC | | ENT | RSE | ALT |
bindings = <
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC
&kp LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp ESC
&kp LGUI &mo 1 &kp SPACE &kp RET &mo 2 &kp RALT
>;
};
lower_layer {
label = "NUMBER";
// -----------------------------------------------------------------------------------------
// | TAB | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BKSP |
// | BTCLR| BT1 | BT2 | BT3 | BT4 | BT5 | | LFT | DWN | UP | RGT | | |
// | SHFT | | | | | | | | | | | | |
// | GUI | | SPC | | ENT | | ALT |
bindings = <
&kp TAB &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans &trans
&kp LSHFT &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT
>;
};
raise_layer {
label = "SYMBOL";
// -----------------------------------------------------------------------------------------
// | TAB | ! | @ | # | $ | % | | ^ | & | * | ( | ) | BKSP |
// | CTRL | | | | | | | - | = | [ | ] | \ | ` |
// | SHFT | | | | | | | _ | + | { | } | "|" | ~ |
// | GUI | | SPC | | ENT | | ALT |
bindings = <
&kp TAB &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp BSPC
&kp LCTRL &trans &trans &trans &trans &trans &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH &kp GRAVE
&kp LSHFT &trans &trans &trans &trans &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp TILDE
&kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT
>;
};
};
};

View file

@ -0,0 +1,20 @@
identifier: corne-ish_zen_v2
name: Corne-ish Zen v2
url: https://lowprokb.ca/collections/keyboards/products/corne-ish-zen
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
ram: 40
supported:
- adc
- usb_device
- ble
- ieee802154
- pwm
- watchdog
- gpio
- i2c
- spi

View file

@ -0,0 +1,20 @@
identifier: corneish_zen_v2
name: Corne-ish Zen v2
type: keyboard
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
supported:
- gpio
- i2c
- counter
- spi
- usb_device
- lsm303dlhc
- nvs
- can
- kscan
- ble
- adc

View file

@ -0,0 +1,15 @@
file_format: "1"
id: corneish_zen_v2
name: Corneish Zen v2
url: https://lowprokb.ca/collections/keyboards/products/corne-ish-zen
type: board
arch: arm
features:
- keys
- display
outputs:
- usb
- ble
siblings:
- corneish_zen_v2_left
- corneish_zen_v2_right

View file

@ -0,0 +1,78 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include "corneish_zen.dtsi"
/{
chosen {
zephyr,display = &epd;
zmk,battery = &vbatt;
};
kscan0: kscan {
compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN";
diode-direction = "col2row";
row-gpios
= <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 31 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 30 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;
col-gpios
= <&gpio0 21 GPIO_ACTIVE_HIGH>
, <&gpio0 23 GPIO_ACTIVE_HIGH>
, <&gpio0 12 GPIO_ACTIVE_HIGH>
, <&gpio1 9 GPIO_ACTIVE_HIGH>
, <&gpio0 7 GPIO_ACTIVE_HIGH>
, <&gpio0 5 GPIO_ACTIVE_HIGH>
;
};
leds {
compatible = "gpio-leds";
blue_led: led_0 {
gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
label = "Blue LED";
};
};
vbatt: vbatt {
compatible = "zmk,battery-voltage-divider";
label = "BATTERY";
io-channels = <&adc 0>;
output-ohms = <1960000>;
full-ohms = <(1960000 + 810000)>;
};
};
&spi0 {
status = "okay";
compatible = "nordic,nrf-spim";
sck-pin = <27>;
mosi-pin = <8>;
miso-pin = <22>;
cs-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
epd: il0323@0 {
compatible = "gooddisplay,il0323";
reg = <0>;
label = "DISPLAY";
width = <80>;
height = <128>;
spi-max-frequency = <4000000>;
dc-gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
busy-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
reset-gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
pwr = [03 00 26 26];
cdi = <0xd2>;
tcon = <0x22>;
};
};

View file

@ -0,0 +1,91 @@
#
# Copyright (c) 2022 Darryl deHaan
# SPDX-License-Identifier: MIT
#
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QIAA=y
CONFIG_BOARD_CORNEISH_ZEN_V2_LEFT=y
CONFIG_ZMK_SPLIT=y
CONFIG_ZMK_SLEEP=y
CONFIG_ZMK_DISPLAY=y
# Enable MPU
CONFIG_ARM_MPU=y
# enable GPIO
CONFIG_GPIO=y
# Enable SPI
CONFIG_SPI=y
CONFIG_SPI_NRFX=y
# Enable writing to flash
CONFIG_USE_DT_CODE_PARTITION=y
CONFIG_BUILD_OUTPUT_UF2=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_NVS=y
CONFIG_SETTINGS_NVS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
# Enable 32kHz crystal
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM=y
# enable display drivers
CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048
CONFIG_SSD1306=n
CONFIG_IL0323=y
CONFIG_LVGL_BITS_PER_PIXEL=1
CONFIG_LVGL_COLOR_DEPTH_1=y
CONFIG_LVGL_DPI=145
CONFIG_LVGL_VDB_SIZE=100
CONFIG_LVGL_USE_THEME_MONO=y
CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_RED=n
CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_RED=n
CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_BLACK=y
CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_WHITE=y
CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_16=y
CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_26=y
# custom status screens
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM=y
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=n
CONFIG_CUSTOM_WIDGET_BATTERY_STATUS=y
CONFIG_ZMK_WIDGET_BATTERY_STATUS=n
CONFIG_CUSTOM_WIDGET_OUTPUT_STATUS=y
CONFIG_ZMK_WIDGET_OUTPUT_STATUS=n
CONFIG_CUSTOM_WIDGET_LAYER_STATUS=y
CONFIG_ZMK_WIDGET_LAYER_STATUS=n
# Turn on logging, and set ZMK logging to debug output
#CONFIG_LOG=y
#CONFIG_ZMK_USB_LOGGING=y
#CONFIG_ZMK_LOG_LEVEL_DBG=y
#CONFIG_LOG_BUFFER_SIZE=65536
#CONFIG_LOG_STRDUP_BUF_COUNT=160
#CONFIG_I2C_LOG_LEVEL_DBG=y
#CONFIG_SPI_LOG_LEVEL_DBG=y
#CONFIG_DISPLAY_LOG_LEVEL_DBG=y
#CONFIG_LVGL_LOG_LEVEL_DBG=y
#CONFIG_LVGL_USE_DEBUG=y
#CONFIG_SENSOR_LOG_LEVEL_DBG=y
# Turn on USB CDC ACM device
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_CDC_ACM=y
CONFIG_USB_CDC_ACM_RINGBUF_SIZE=1024
# Enable serial console
CONFIG_SERIAL=y
CONFIG_CONSOLE=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_LINE_CTRL=y
# Enable USB UART
CONFIG_UART_CONSOLE=y

View file

@ -0,0 +1,86 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include "corneish_zen.dtsi"
/{
chosen {
zephyr,display = &epd;
zmk,battery = &vbatt;
};
kscan0: kscan {
compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN";
diode-direction = "col2row";
row-gpios
= <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;
col-gpios
= <&gpio0 19 GPIO_ACTIVE_HIGH>
, <&gpio0 21 GPIO_ACTIVE_HIGH>
, <&gpio0 23 GPIO_ACTIVE_HIGH>
, <&gpio0 12 GPIO_ACTIVE_HIGH>
, <&gpio1 9 GPIO_ACTIVE_HIGH>
, <&gpio0 7 GPIO_ACTIVE_HIGH>
;
};
leds {
compatible = "gpio-leds";
blue_led: led_0 {
gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
label = "Blue LED";
};
};
vbatt: vbatt {
compatible = "zmk,battery-voltage-divider";
label = "BATTERY";
io-channels = <&adc 0>;
output-ohms = <1960000>;
full-ohms = <(1960000 + 810000)>;
};
};
&default_transform {
col-offset = <6>;
};
&five_column_transform {
col-offset = <6>;
};
&spi0 {
status = "okay";
compatible = "nordic,nrf-spim";
sck-pin = <20>;
mosi-pin = <24>;
miso-pin = <27>;
cs-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
epd: il0323@0 {
compatible = "gooddisplay,il0323";
reg = <0>;
label = "DISPLAY";
width = <80>;
height = <128>;
spi-max-frequency = <4000000>;
dc-gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
busy-gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
reset-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
pwr = [03 00 26 26];
//softstart = [17 17 17 17];
cdi = <0xd2>;
tcon = <0x22>;
};
};

View file

@ -0,0 +1,83 @@
#
# Copyright (c) 2022 Darryl deHaan
# SPDX-License-Identifier: MIT
#
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QIAA=y
CONFIG_BOARD_CORNEISH_ZEN_V2_RIGHT=y
CONFIG_ZMK_SPLIT=y
CONFIG_ZMK_SLEEP=y
CONFIG_ZMK_DISPLAY=y
# Enable MPU
CONFIG_ARM_MPU=y
# enable GPIO
CONFIG_GPIO=y
# Enable SPI
CONFIG_SPI=y
CONFIG_SPI_NRFX=y
# Enable writing to flash
CONFIG_USE_DT_CODE_PARTITION=y
CONFIG_BUILD_OUTPUT_UF2=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_NVS=y
CONFIG_SETTINGS_NVS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
# Enable 32kHz crystal
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM=y
# enable display drivers
CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048
CONFIG_SSD1306=n
CONFIG_IL0323=y
CONFIG_LVGL_BITS_PER_PIXEL=1
CONFIG_LVGL_COLOR_DEPTH_1=y
CONFIG_LVGL_DPI=145
CONFIG_LVGL_VDB_SIZE=100
CONFIG_LVGL_USE_THEME_MONO=y
CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_RED=n
CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_RED=n
CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_BLACK=y
CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_WHITE=y
CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_16=y
CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_26=y
# custom status screens
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM=y
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=n
CONFIG_CUSTOM_WIDGET_BATTERY_STATUS=y
CONFIG_ZMK_WIDGET_BATTERY_STATUS=n
CONFIG_CUSTOM_WIDGET_PERIPHERAL_STATUS=y
CONFIG_ZMK_WIDGET_PERIPHERAL_STATUS=n
# Turn on logging, and set ZMK logging to debug output
#CONFIG_LOG=y
#CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS=8000
#CONFIG_ZMK_USB_LOGGING=y
#CONFIG_ZMK_LOG_LEVEL_DBG=y
#CONFIG_LOG_BUFFER_SIZE=20000
#CONFIG_LOG_STRDUP_BUF_COUNT=60
#CONFIG_I2C_LOG_LEVEL_DBG=y
#CONFIG_SPI_LOG_LEVEL_DBG=y
#CONFIG_DISPLAY_LOG_LEVEL_DBG=y
#CONFIG_LVGL_LOG_LEVEL_DBG=y
#CONFIG_LVGL_USE_DEBUG=y
#CONFIG_SENSOR_LOG_LEVEL_DBG=y
# Enable serial console
CONFIG_SERIAL=y
CONFIG_CONSOLE=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_LINE_CTRL=y
# Enable USB UART
CONFIG_UART_CONSOLE=y

View file

@ -0,0 +1,85 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include "widgets/battery_status.h"
#include "widgets/peripheral_status.h"
#include "widgets/output_status.h"
#include "widgets/layer_status.h"
#include "custom_status_screen.h"
#include <logging/log.h>
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
LV_IMG_DECLARE(zenlogo);
LV_IMG_DECLARE(layers2);
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_BATTERY_STATUS)
static struct zmk_widget_battery_status battery_status_widget;
#endif
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_OUTPUT_STATUS)
static struct zmk_widget_output_status output_status_widget;
#endif
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_PERIPHERAL_STATUS)
static struct zmk_widget_peripheral_status peripheral_status_widget;
#endif
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_LAYER_STATUS)
static struct zmk_widget_layer_status layer_status_widget;
#endif
lv_obj_t *zmk_display_status_screen() {
lv_obj_t *screen;
screen = lv_obj_create(NULL, NULL);
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_BATTERY_STATUS)
zmk_widget_battery_status_init(&battery_status_widget, screen);
lv_obj_align(zmk_widget_battery_status_obj(&battery_status_widget), NULL, LV_ALIGN_IN_TOP_MID,
0, 2);
#endif
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_OUTPUT_STATUS)
zmk_widget_output_status_init(&output_status_widget, screen);
lv_obj_align(zmk_widget_output_status_obj(&output_status_widget), NULL, LV_ALIGN_IN_TOP_MID, 0,
41);
#endif
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_PERIPHERAL_STATUS)
zmk_widget_peripheral_status_init(&peripheral_status_widget, screen);
lv_obj_align(zmk_widget_peripheral_status_obj(&peripheral_status_widget), NULL,
LV_ALIGN_IN_TOP_MID, 0, 41);
#endif
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_LAYER_STATUS)
zmk_widget_layer_status_init(&layer_status_widget, screen);
lv_obj_set_style_local_text_font(zmk_widget_layer_status_obj(&layer_status_widget),
LV_LABEL_PART_MAIN, LV_STATE_DEFAULT,
lv_theme_get_font_small());
lv_obj_align(zmk_widget_layer_status_obj(&layer_status_widget), NULL, LV_ALIGN_IN_BOTTOM_MID, 0,
-5);
lv_obj_t *LayersHeading;
LayersHeading = lv_img_create(screen, NULL);
lv_obj_align(LayersHeading, NULL, LV_ALIGN_IN_BOTTOM_MID, 8, 5);
lv_img_set_src(LayersHeading, &layers2);
#endif
#if !IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
lv_obj_t *zenlogo_icon;
zenlogo_icon = lv_img_create(screen, NULL);
lv_img_set_src(zenlogo_icon, &zenlogo);
lv_obj_align(zenlogo_icon, NULL, LV_ALIGN_IN_BOTTOM_MID, 2, -5);
#endif
// lv_task_handler();
lv_refr_now(NULL);
// display_blanking_off(display_dev);
return screen;
}

View file

@ -0,0 +1,12 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include <lvgl.h>
lv_obj_t *zmk_display_status_screen();

View file

@ -0,0 +1,97 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <kernel.h>
#include <bluetooth/services/bas.h>
#include <logging/log.h>
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
#include <zmk/display.h>
#include "battery_status.h"
#include <src/lv_themes/lv_theme.h>
#include <zmk/usb.h>
#include <zmk/events/usb_conn_state_changed.h>
#include <zmk/event_manager.h>
#include <zmk/events/battery_state_changed.h>
static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets);
struct battery_status_state {
uint8_t level;
#if IS_ENABLED(CONFIG_USB_DEVICE_STACK)
bool usb_present;
#endif
};
LV_IMG_DECLARE(batt_100);
LV_IMG_DECLARE(batt_100_chg);
LV_IMG_DECLARE(batt_75);
LV_IMG_DECLARE(batt_75_chg);
LV_IMG_DECLARE(batt_50);
LV_IMG_DECLARE(batt_50_chg);
LV_IMG_DECLARE(batt_25);
LV_IMG_DECLARE(batt_25_chg);
LV_IMG_DECLARE(batt_5);
LV_IMG_DECLARE(batt_5_chg);
LV_IMG_DECLARE(batt_0);
LV_IMG_DECLARE(batt_0_chg);
static void set_battery_symbol(lv_obj_t *icon, struct battery_status_state state) {
uint8_t level = state.level;
#if IS_ENABLED(CONFIG_USB_DEVICE_STACK)
if (level > 95) {
lv_img_set_src(icon, state.usb_present ? &batt_100_chg : &batt_100);
} else if (level > 74) {
lv_img_set_src(icon, state.usb_present ? &batt_75_chg : &batt_75);
} else if (level > 49) {
lv_img_set_src(icon, state.usb_present ? &batt_50_chg : &batt_50);
} else if (level > 24) {
lv_img_set_src(icon, state.usb_present ? &batt_25_chg : &batt_25);
} else if (level > 5) {
lv_img_set_src(icon, state.usb_present ? &batt_5_chg : &batt_5);
} else {
lv_img_set_src(icon, state.usb_present ? &batt_0_chg : &batt_0);
}
#endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK) */
}
void battery_status_update_cb(struct battery_status_state state) {
struct zmk_widget_battery_status *widget;
SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_battery_symbol(widget->obj, state); }
}
static struct battery_status_state battery_status_get_state(const zmk_event_t *eh) {
return (struct battery_status_state) {
.level = bt_bas_get_battery_level(),
#if IS_ENABLED(CONFIG_USB_DEVICE_STACK)
.usb_present = zmk_usb_is_powered(),
#endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK) */
};
}
ZMK_DISPLAY_WIDGET_LISTENER(widget_battery_status, struct battery_status_state,
battery_status_update_cb, battery_status_get_state)
ZMK_SUBSCRIPTION(widget_battery_status, zmk_battery_state_changed);
#if IS_ENABLED(CONFIG_USB_DEVICE_STACK)
ZMK_SUBSCRIPTION(widget_battery_status, zmk_usb_conn_state_changed);
#endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK) */
int zmk_widget_battery_status_init(struct zmk_widget_battery_status *widget, lv_obj_t *parent) {
widget->obj = lv_img_create(parent, NULL);
sys_slist_append(&widgets, &widget->node);
widget_battery_status_init();
return 0;
}
lv_obj_t *zmk_widget_battery_status_obj(struct zmk_widget_battery_status *widget) {
return widget->obj;
}

View file

@ -0,0 +1,20 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include <lvgl.h>
#include <kernel.h>
struct zmk_widget_battery_status {
sys_snode_t node;
lv_obj_t *obj;
};
int zmk_widget_battery_status_init(struct zmk_widget_battery_status *widget, lv_obj_t *parent);
lv_obj_t *zmk_widget_battery_status_obj(struct zmk_widget_battery_status *widget);

View file

@ -0,0 +1,4 @@
#
# Copyright (c) 2022 Darryl deHaan
# SPDX-License-Identifier: MIT
#

View file

@ -0,0 +1,41 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_USB_CONNECTED
#define LV_ATTRIBUTE_IMG_USB_CONNECTED
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_USB_CONNECTED uint8_t USB_connected_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xc0, 0x00, 0x3f,
0xff, 0xff, 0xc0, 0x00, 0xff, 0xff, 0xff, 0xc0, 0x01, 0xff, 0xff, 0xff, 0x80, 0x03, 0xff, 0xff,
0xff, 0xfe, 0x07, 0xff, 0xff, 0xff, 0xff, 0x07, 0x1e, 0x30, 0x38, 0x07, 0x0f, 0x1c, 0x20, 0x38,
0x07, 0x0f, 0x1c, 0x47, 0x10, 0xc3, 0x3e, 0x1c, 0x43, 0xf1, 0xc7, 0x7e, 0x3c, 0x60, 0x70, 0x0e,
0x7e, 0x3c, 0x70, 0x30, 0x0e, 0x7e, 0x38, 0xfc, 0x33, 0xc7, 0xfe, 0x18, 0x8f, 0x23, 0x87, 0x0e,
0x00, 0xc6, 0x20, 0x07, 0x0f, 0x01, 0xe0, 0x60, 0x0e, 0x0f, 0x87, 0xf0, 0xe0, 0x3e, 0x07, 0xff,
0xff, 0xff, 0xfc, 0x07, 0xff, 0xff, 0xff, 0xf0, 0x03, 0xff, 0xff, 0xfe, 0x00, 0x01, 0xff, 0xff,
0xfc, 0x00, 0x00, 0x7f, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t USB_connected = {
.header.always_zero = 0,
.header.w = 40,
.header.h = 31,
.data_size = 164,
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.data = USB_connected_map,
};

View file

@ -0,0 +1,43 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_BATT_0
#define LV_ATTRIBUTE_IMG_BATT_0
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_0 uint8_t
batt_0_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00,
0x00, 0x01, 0xff, 0x00, 0x00, 0x00, 0x01, 0xff, 0x00, 0x00, 0x7f, 0xfd, 0xff, 0x7f, 0xf8,
0xff, 0xfd, 0xff, 0x7f, 0xfc, 0xff, 0xfd, 0xff, 0x7f, 0xfc, 0xff, 0xfc, 0xfe, 0x7f, 0xfc,
0xf0, 0x00, 0xfe, 0x00, 0x3f, 0xf0, 0x00, 0xfe, 0x00, 0x3f, 0xf0, 0x00, 0xfe, 0x00, 0x3f,
0xf0, 0x00, 0xfe, 0x00, 0x3f, 0xf0, 0x00, 0xfe, 0x00, 0x0f, 0xf0, 0x00, 0x7c, 0x00, 0x0f,
0xf0, 0x00, 0x7c, 0x00, 0x0f, 0xf0, 0x00, 0x7c, 0x00, 0x0f, 0xf0, 0x00, 0x7c, 0x00, 0x3f,
0xf0, 0x00, 0x7c, 0x00, 0x3f, 0xf0, 0x00, 0x7c, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x3f,
0xff, 0xff, 0x01, 0xff, 0xfc, 0xff, 0xff, 0x01, 0xff, 0xfc, 0xff, 0xfe, 0x7c, 0xff, 0xfc,
0x7f, 0xfc, 0xfe, 0x7f, 0xf8, 0x00, 0x01, 0xff, 0x00, 0x00, 0x00, 0x01, 0xff, 0x00, 0x00,
0x00, 0x01, 0xff, 0x00, 0x00, 0x00, 0x01, 0xff, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00,
0x00, 0x00, 0x7c, 0x00, 0x00,
};
const lv_img_dsc_t batt_0 = {
.header.always_zero = 0,
.header.w = 40,
.header.h = 31,
.data_size = 163,
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.data = batt_0_map,
};

View file

@ -0,0 +1,43 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_BATT_0_CHG
#define LV_ATTRIBUTE_IMG_BATT_0_CHG
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_0_CHG uint8_t
batt_0_chg_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x7f, 0xff, 0xf7, 0xbf, 0xf8,
0xff, 0xff, 0xef, 0xbf, 0xfc, 0xff, 0xff, 0xdf, 0x7f, 0xfc, 0xff, 0xff, 0xbf, 0x7f, 0xfc,
0xf0, 0x00, 0x7e, 0x00, 0x3f, 0xf0, 0x00, 0xfe, 0x00, 0x3f, 0xf0, 0x01, 0xfe, 0x00, 0x3f,
0xf0, 0x03, 0xfc, 0x00, 0x3f, 0xf0, 0x07, 0xfc, 0x00, 0x0f, 0xf0, 0x0f, 0xff, 0xe0, 0x0f,
0xf0, 0x1f, 0xff, 0xc0, 0x0f, 0xf0, 0x00, 0x7f, 0x80, 0x0f, 0xf0, 0x00, 0x7f, 0x00, 0x3f,
0xf0, 0x00, 0xfe, 0x00, 0x3f, 0xf0, 0x00, 0xfc, 0x00, 0x3f, 0xf0, 0x01, 0xf8, 0x00, 0x3f,
0xff, 0xfd, 0xf7, 0xff, 0xfc, 0xff, 0xfb, 0xef, 0xff, 0xfc, 0xff, 0xfb, 0xdf, 0xff, 0xfc,
0x7f, 0xfb, 0xbf, 0xff, 0xf8, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
0x00, 0x10, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t batt_0_chg = {
.header.always_zero = 0,
.header.w = 40,
.header.h = 31,
.data_size = 163,
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.data = batt_0_chg_map,
};

View file

@ -0,0 +1,43 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_BATT_100
#define LV_ATTRIBUTE_IMG_BATT_100
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_100 uint8_t
batt_100_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xf8,
0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc,
0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf3, 0xff, 0xff, 0xff, 0x3f,
0xf3, 0xff, 0xff, 0xff, 0x3f, 0xf3, 0xff, 0xff, 0xff, 0x0f, 0xf3, 0xff, 0xff, 0xff, 0x0f,
0xf3, 0xff, 0xff, 0xff, 0x0f, 0xf3, 0xff, 0xff, 0xff, 0x0f, 0xf3, 0xff, 0xff, 0xff, 0x3f,
0xf3, 0xff, 0xff, 0xff, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x3f,
0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc,
0x7f, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t batt_100 = {
.header.always_zero = 0,
.header.w = 40,
.header.h = 31,
.data_size = 163,
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.data = batt_100_map,
};

View file

@ -0,0 +1,43 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_BATT_100_CHG
#define LV_ATTRIBUTE_IMG_BATT_100_CHG
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_100_CHG uint8_t
batt_100_chg_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x7f, 0xff, 0xf7, 0xbf, 0xf8,
0xff, 0xff, 0xef, 0xbf, 0xfc, 0xff, 0xff, 0xdf, 0x7f, 0xfc, 0xff, 0xff, 0xbf, 0x7f, 0xfc,
0xf0, 0x00, 0x7e, 0x00, 0x3f, 0xf0, 0x00, 0xfe, 0x00, 0x3f, 0xf3, 0xfd, 0xfe, 0xff, 0x3f,
0xf3, 0xfb, 0xfd, 0xff, 0x3f, 0xf3, 0xf7, 0xfc, 0x07, 0x0f, 0xf3, 0xef, 0xff, 0xef, 0x0f,
0xf3, 0xdf, 0xff, 0xdf, 0x0f, 0xf3, 0x80, 0x7f, 0xbf, 0x0f, 0xf3, 0xff, 0x7f, 0x7f, 0x3f,
0xf3, 0xfe, 0xfe, 0xff, 0x3f, 0xf0, 0x00, 0xfc, 0x00, 0x3f, 0xf0, 0x01, 0xf8, 0x00, 0x3f,
0xff, 0xfd, 0xf7, 0xff, 0xfc, 0xff, 0xfb, 0xef, 0xff, 0xfc, 0xff, 0xfb, 0xdf, 0xff, 0xfc,
0x7f, 0xfb, 0xbf, 0xff, 0xf8, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
0x00, 0x10, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t batt_100_chg = {
.header.always_zero = 0,
.header.w = 40,
.header.h = 31,
.data_size = 163,
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.data = batt_100_chg_map,
};

View file

@ -0,0 +1,43 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_BATT_25
#define LV_ATTRIBUTE_IMG_BATT_25
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_25 uint8_t
batt_25_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xf8,
0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc,
0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf3, 0xfc, 0x00, 0x00, 0x3f,
0xf3, 0xfc, 0x00, 0x00, 0x3f, 0xf3, 0xfc, 0x00, 0x00, 0x0f, 0xf3, 0xfc, 0x00, 0x00, 0x0f,
0xf3, 0xfc, 0x00, 0x00, 0x0f, 0xf3, 0xfc, 0x00, 0x00, 0x0f, 0xf3, 0xfc, 0x00, 0x00, 0x3f,
0xf3, 0xfc, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x3f,
0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc,
0x7f, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t batt_25 = {
.header.always_zero = 0,
.header.w = 40,
.header.h = 31,
.data_size = 163,
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.data = batt_25_map,
};

View file

@ -0,0 +1,43 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_BATT_25_CHG
#define LV_ATTRIBUTE_IMG_BATT_25_CHG
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_25_CHG uint8_t
batt_25_chg_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x7f, 0xff, 0xf7, 0xbf, 0xf8,
0xff, 0xff, 0xef, 0xbf, 0xfc, 0xff, 0xff, 0xdf, 0x7f, 0xfc, 0xff, 0xff, 0xbf, 0x7f, 0xfc,
0xf0, 0x00, 0x7e, 0x00, 0x3f, 0xf0, 0x00, 0xfe, 0x00, 0x3f, 0xf3, 0xf9, 0xfe, 0x00, 0x3f,
0xf3, 0xfb, 0xfc, 0x00, 0x3f, 0xf3, 0xf7, 0xfc, 0x00, 0x0f, 0xf3, 0xef, 0xff, 0xe0, 0x0f,
0xf3, 0xdf, 0xff, 0xc0, 0x0f, 0xf3, 0x80, 0x7f, 0x80, 0x0f, 0xf3, 0xf8, 0x7f, 0x00, 0x3f,
0xf3, 0xf8, 0xfe, 0x00, 0x3f, 0xf0, 0x00, 0xfc, 0x00, 0x3f, 0xf0, 0x01, 0xf8, 0x00, 0x3f,
0xff, 0xfd, 0xf7, 0xff, 0xfc, 0xff, 0xfb, 0xef, 0xff, 0xfc, 0xff, 0xfb, 0xdf, 0xff, 0xfc,
0x7f, 0xfb, 0xbf, 0xff, 0xf8, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
0x00, 0x10, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t batt_25_chg = {
.header.always_zero = 0,
.header.w = 40,
.header.h = 31,
.data_size = 163,
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.data = batt_25_chg_map,
};

View file

@ -0,0 +1,43 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_BATT_5
#define LV_ATTRIBUTE_IMG_BATT_5
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_5 uint8_t
batt_5_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xf8,
0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc,
0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf3, 0x00, 0x00, 0x00, 0x3f,
0xf3, 0x00, 0x00, 0x00, 0x3f, 0xf3, 0x00, 0x00, 0x00, 0x0f, 0xf3, 0x00, 0x00, 0x00, 0x0f,
0xf3, 0x00, 0x00, 0x00, 0x0f, 0xf3, 0x00, 0x00, 0x00, 0x0f, 0xf3, 0x00, 0x00, 0x00, 0x3f,
0xf3, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x3f,
0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc,
0x7f, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t batt_5 = {
.header.always_zero = 0,
.header.w = 40,
.header.h = 31,
.data_size = 163,
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.data = batt_5_map,
};

View file

@ -0,0 +1,43 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_BATT_50
#define LV_ATTRIBUTE_IMG_BATT_50
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_50 uint8_t
batt_50_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xf8,
0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc,
0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf3, 0xff, 0xf0, 0x00, 0x3f,
0xf3, 0xff, 0xf0, 0x00, 0x3f, 0xf3, 0xff, 0xf0, 0x00, 0x0f, 0xf3, 0xff, 0xf0, 0x00, 0x0f,
0xf3, 0xff, 0xf0, 0x00, 0x0f, 0xf3, 0xff, 0xf0, 0x00, 0x0f, 0xf3, 0xff, 0xf0, 0x00, 0x3f,
0xf3, 0xff, 0xf0, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x3f,
0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc,
0x7f, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t batt_50 = {
.header.always_zero = 0,
.header.w = 40,
.header.h = 31,
.data_size = 163,
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.data = batt_50_map,
};

View file

@ -0,0 +1,43 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_BATT_50_CHG
#define LV_ATTRIBUTE_IMG_BATT_50_CHG
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_50_CHG uint8_t
batt_50_chg_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x7f, 0xff, 0xf7, 0xbf, 0xf8,
0xff, 0xff, 0xef, 0xbf, 0xfc, 0xff, 0xff, 0xdf, 0x7f, 0xfc, 0xff, 0xff, 0xbf, 0x7f, 0xfc,
0xf0, 0x00, 0x7e, 0x00, 0x3f, 0xf0, 0x00, 0xfe, 0x00, 0x3f, 0xf3, 0xfd, 0xfe, 0x00, 0x3f,
0xf3, 0xfb, 0xfc, 0x00, 0x3f, 0xf3, 0xf7, 0xfc, 0x00, 0x0f, 0xf3, 0xef, 0xff, 0xe0, 0x0f,
0xf3, 0xdf, 0xff, 0xc0, 0x0f, 0xf3, 0x80, 0x7f, 0x80, 0x0f, 0xf3, 0xff, 0x7f, 0x00, 0x3f,
0xf3, 0xfe, 0xfe, 0x00, 0x3f, 0xf0, 0x00, 0xfc, 0x00, 0x3f, 0xf0, 0x01, 0xf8, 0x00, 0x3f,
0xff, 0xfd, 0xf7, 0xff, 0xfc, 0xff, 0xfb, 0xef, 0xff, 0xfc, 0xff, 0xfb, 0xdf, 0xff, 0xfc,
0x7f, 0xfb, 0xbf, 0xff, 0xf8, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
0x00, 0x10, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t batt_50_chg = {
.header.always_zero = 0,
.header.w = 40,
.header.h = 31,
.data_size = 163,
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.data = batt_50_chg_map,
};

View file

@ -0,0 +1,43 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_BATT_5_CHG
#define LV_ATTRIBUTE_IMG_BATT_5_CHG
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_5_CHG uint8_t
batt_5_chg_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x7f, 0xff, 0xf7, 0xbf, 0xf8,
0xff, 0xff, 0xef, 0xbf, 0xfc, 0xff, 0xff, 0xdf, 0x7f, 0xfc, 0xff, 0xff, 0xbf, 0x7f, 0xfc,
0xf0, 0x00, 0x7e, 0x00, 0x3f, 0xf0, 0x00, 0xfe, 0x00, 0x3f, 0xf3, 0x01, 0xfe, 0x00, 0x3f,
0xf3, 0x03, 0xfc, 0x00, 0x3f, 0xf3, 0x07, 0xfc, 0x00, 0x0f, 0xf3, 0x0f, 0xff, 0xe0, 0x0f,
0xf3, 0x1f, 0xff, 0xc0, 0x0f, 0xf3, 0x00, 0x7f, 0x80, 0x0f, 0xf3, 0x00, 0x7f, 0x00, 0x3f,
0xf3, 0x00, 0xfe, 0x00, 0x3f, 0xf0, 0x00, 0xfc, 0x00, 0x3f, 0xf0, 0x01, 0xf8, 0x00, 0x3f,
0xff, 0xfd, 0xf7, 0xff, 0xfc, 0xff, 0xfb, 0xef, 0xff, 0xfc, 0xff, 0xfb, 0xdf, 0xff, 0xfc,
0x7f, 0xfb, 0xbf, 0xff, 0xf8, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
0x00, 0x10, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t batt_5_chg = {
.header.always_zero = 0,
.header.w = 40,
.header.h = 31,
.data_size = 163,
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.data = batt_5_chg_map,
};

View file

@ -0,0 +1,43 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_BATT_75
#define LV_ATTRIBUTE_IMG_BATT_75
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_75 uint8_t
batt_75_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xf8,
0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc,
0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf3, 0xff, 0xff, 0xe0, 0x3f,
0xf3, 0xff, 0xff, 0xe0, 0x3f, 0xf3, 0xff, 0xff, 0xe0, 0x0f, 0xf3, 0xff, 0xff, 0xe0, 0x0f,
0xf3, 0xff, 0xff, 0xe0, 0x0f, 0xf3, 0xff, 0xff, 0xe0, 0x0f, 0xf3, 0xff, 0xff, 0xe0, 0x3f,
0xf3, 0xff, 0xff, 0xe0, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x3f,
0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc,
0x7f, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t batt_75 = {
.header.always_zero = 0,
.header.w = 40,
.header.h = 31,
.data_size = 163,
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.data = batt_75_map,
};

View file

@ -0,0 +1,43 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_BATT_75_CHG
#define LV_ATTRIBUTE_IMG_BATT_75_CHG
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_75_CHG uint8_t
batt_75_chg_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x7f, 0xff, 0xf7, 0xbf, 0xf8,
0xff, 0xff, 0xef, 0xbf, 0xfc, 0xff, 0xff, 0xdf, 0x7f, 0xfc, 0xff, 0xff, 0xbf, 0x7f, 0xfc,
0xf0, 0x00, 0x7e, 0x00, 0x3f, 0xf0, 0x00, 0xfe, 0x00, 0x3f, 0xf3, 0xfd, 0xfe, 0xe0, 0x3f,
0xf3, 0xfb, 0xfd, 0xe0, 0x3f, 0xf3, 0xf7, 0xfc, 0x00, 0x0f, 0xf3, 0xef, 0xff, 0xe0, 0x0f,
0xf3, 0xdf, 0xff, 0xc0, 0x0f, 0xf3, 0x80, 0x7f, 0xa0, 0x0f, 0xf3, 0xff, 0x7f, 0x60, 0x3f,
0xf3, 0xfe, 0xfe, 0xe0, 0x3f, 0xf0, 0x00, 0xfc, 0x00, 0x3f, 0xf0, 0x01, 0xf8, 0x00, 0x3f,
0xff, 0xfd, 0xf7, 0xff, 0xfc, 0xff, 0xfb, 0xef, 0xff, 0xfc, 0xff, 0xfb, 0xdf, 0xff, 0xfc,
0x7f, 0xfb, 0xbf, 0xff, 0xf8, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
0x00, 0x10, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t batt_75_chg = {
.header.always_zero = 0,
.header.w = 40,
.header.h = 31,
.data_size = 163,
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.data = batt_75_chg_map,
};

View file

@ -0,0 +1,42 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING
#define LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING uint8_t
bluetooth_advertising_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x40, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x78,
0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00,
0x20, 0x7f, 0x80, 0x00, 0x70, 0x77, 0xc0, 0x00, 0xf8, 0x73, 0xe0, 0xc0, 0x7c, 0x71,
0xe0, 0xe0, 0x3e, 0x73, 0xc0, 0x70, 0x1f, 0x77, 0x86, 0x30, 0x0f, 0xff, 0x07, 0x30,
0x07, 0xfe, 0x07, 0x38, 0x03, 0xfc, 0x23, 0x38, 0x01, 0xf8, 0x63, 0x18, 0x01, 0xf8,
0x63, 0x18, 0x03, 0xfc, 0x23, 0x38, 0x07, 0xfe, 0x07, 0x38, 0x0f, 0xff, 0x07, 0x30,
0x1f, 0x77, 0x86, 0x70, 0x3e, 0x73, 0xc0, 0x70, 0x7c, 0x71, 0xe0, 0xe0, 0xf8, 0x73,
0xe0, 0xc0, 0x70, 0x77, 0xc0, 0x00, 0x20, 0x7f, 0x80, 0x00, 0x00, 0x7f, 0x00, 0x00,
0x00, 0x7e, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x70,
0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t bluetooth_advertising = {
.header.always_zero = 0,
.header.w = 29,
.header.h = 35,
.data_size = 148,
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.data = bluetooth_advertising_map,
};

View file

@ -0,0 +1,47 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_1
#define LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_1
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_1 uint8_t
bluetooth_advertising_1_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x01, 0xfc, 0x00, 0x00, 0xfe, 0x00,
0x00, 0x0f, 0xff, 0x00, 0x20, 0xff, 0x00, 0x00, 0x1f, 0xff, 0xc0, 0x70, 0xf7, 0x80, 0x00,
0x3f, 0xff, 0xe0, 0xf8, 0xf3, 0xc1, 0xc0, 0x7f, 0xff, 0xe0, 0x7c, 0xf3, 0xe0, 0xc0, 0xff,
0xff, 0xf0, 0x3e, 0xf7, 0xc0, 0xe0, 0xff, 0x8f, 0xf8, 0x1f, 0xff, 0x84, 0x61, 0xfe, 0x0f,
0xf8, 0x0f, 0xff, 0x0e, 0x71, 0xfe, 0x0f, 0xf8, 0x07, 0xfe, 0x06, 0x31, 0xff, 0xcf, 0xfc,
0x03, 0xfc, 0x27, 0x33, 0xff, 0xcf, 0xfc, 0x01, 0xf8, 0x67, 0x33, 0xff, 0xcf, 0xfc, 0x01,
0xf8, 0x67, 0x33, 0xff, 0xcf, 0xfc, 0x03, 0xfc, 0x27, 0x33, 0xff, 0xcf, 0xfc, 0x07, 0xfe,
0x06, 0x31, 0xff, 0xcf, 0xfc, 0x0f, 0xff, 0x0e, 0x71, 0xff, 0xcf, 0xf8, 0x1f, 0xff, 0x84,
0x61, 0xff, 0xcf, 0xf8, 0x3e, 0xf7, 0xc0, 0xe0, 0xff, 0xcf, 0xf8, 0x7c, 0xf3, 0xe1, 0xc0,
0xff, 0xff, 0xf0, 0xf8, 0xf3, 0xc0, 0xc0, 0x7f, 0xff, 0xe0, 0x70, 0xf7, 0x80, 0x00, 0x3f,
0xff, 0xe0, 0x20, 0xff, 0x00, 0x00, 0x1f, 0xff, 0x80, 0x00, 0xfe, 0x00, 0x00, 0x0f, 0xff,
0x00, 0x00, 0xfc, 0x00, 0x00, 0x01, 0xfc, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t bluetooth_advertising_1 = {
.header.always_zero = 0,
.header.w = 54,
.header.h = 35,
.data_size = 254,
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.data = bluetooth_advertising_1_map,
};

View file

@ -0,0 +1,47 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_2
#define LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_2
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_2 uint8_t
bluetooth_advertising_2_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x03, 0xfc, 0x00, 0x00, 0xff, 0x00,
0x00, 0x0f, 0xff, 0x00, 0x60, 0xff, 0x80, 0x00, 0x1f, 0xff, 0xc0, 0xf0, 0xf7, 0xc0, 0x80,
0x7f, 0xff, 0xe0, 0x78, 0xf3, 0xe1, 0xc0, 0x7f, 0xff, 0xf0, 0x3c, 0xf3, 0xc0, 0xe0, 0xff,
0x0f, 0xf0, 0x1e, 0xf7, 0x84, 0xe1, 0xfe, 0x07, 0xf8, 0x0f, 0xff, 0x0e, 0x71, 0xfc, 0x63,
0xf8, 0x07, 0xfe, 0x0e, 0x71, 0xff, 0xf3, 0xfc, 0x03, 0xfc, 0x06, 0x33, 0xff, 0xe3, 0xfc,
0x01, 0xf8, 0x67, 0x33, 0xff, 0xe7, 0xfc, 0x01, 0xf8, 0xe7, 0x33, 0xff, 0xc7, 0xfc, 0x01,
0xfc, 0x67, 0x33, 0xff, 0x8f, 0xfc, 0x03, 0xfe, 0x06, 0x33, 0xff, 0x1f, 0xfc, 0x07, 0xff,
0x0e, 0x71, 0xfe, 0x3f, 0xfc, 0x0f, 0xff, 0x8e, 0x61, 0xfc, 0x03, 0xf8, 0x1e, 0xf7, 0xc0,
0xe1, 0xfc, 0x03, 0xf8, 0x3c, 0xf3, 0xe0, 0xc0, 0xff, 0xff, 0xf0, 0x78, 0xf3, 0xe1, 0xc0,
0x7f, 0xff, 0xf0, 0xf0, 0xf7, 0xc0, 0x80, 0x7f, 0xff, 0xe0, 0x60, 0xff, 0x80, 0x00, 0x1f,
0xff, 0xc0, 0x00, 0xff, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x03, 0xfc,
0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t bluetooth_advertising_2 = {
.header.always_zero = 0,
.header.w = 54,
.header.h = 35,
.data_size = 254,
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.data = bluetooth_advertising_2_map,
};

View file

@ -0,0 +1,47 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_3
#define LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_3
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_3 uint8_t
bluetooth_advertising_3_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x01, 0xfc, 0x00, 0x00, 0xfe, 0x00,
0x00, 0x0f, 0xff, 0x00, 0x20, 0xff, 0x00, 0x00, 0x1f, 0xff, 0xc0, 0x70, 0xf7, 0x80, 0x00,
0x3f, 0xff, 0xe0, 0xf8, 0xf3, 0xc1, 0xc0, 0x7f, 0xff, 0xf0, 0x7c, 0xf3, 0xe0, 0xc0, 0xff,
0x9f, 0xf0, 0x3e, 0xf7, 0xc0, 0xe0, 0xfe, 0x07, 0xf8, 0x1f, 0xff, 0x84, 0x61, 0xfe, 0x03,
0xf8, 0x0f, 0xff, 0x0e, 0x71, 0xfe, 0xe3, 0xfc, 0x07, 0xfe, 0x06, 0x31, 0xff, 0xe3, 0xfc,
0x03, 0xfc, 0x27, 0x33, 0xff, 0x87, 0xfc, 0x01, 0xf8, 0x67, 0x33, 0xff, 0x87, 0xfc, 0x01,
0xf8, 0x67, 0x33, 0xff, 0x83, 0xfc, 0x03, 0xfc, 0x27, 0x33, 0xff, 0xf3, 0xfc, 0x07, 0xfe,
0x06, 0x31, 0xfe, 0xf3, 0xfc, 0x0f, 0xff, 0x0e, 0x71, 0xfc, 0x63, 0xfc, 0x1f, 0xff, 0x84,
0x61, 0xfe, 0x03, 0xf8, 0x3e, 0xf7, 0xc0, 0xe0, 0xff, 0x0f, 0xf8, 0x7c, 0xf3, 0xe1, 0xc0,
0xff, 0xff, 0xf0, 0xf8, 0xf3, 0xc0, 0xc0, 0x7f, 0xff, 0xf0, 0x70, 0xf7, 0x80, 0x00, 0x3f,
0xff, 0xe0, 0x20, 0xff, 0x00, 0x00, 0x1f, 0xff, 0xc0, 0x00, 0xfe, 0x00, 0x00, 0x0f, 0xff,
0x00, 0x00, 0xfc, 0x00, 0x00, 0x01, 0xfc, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t bluetooth_advertising_3 = {
.header.always_zero = 0,
.header.w = 54,
.header.h = 35,
.data_size = 254,
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.data = bluetooth_advertising_3_map,
};

View file

@ -0,0 +1,47 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_4
#define LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_4
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_4 uint8_t
bluetooth_advertising_4_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x01, 0xfc, 0x00, 0x00, 0xfe, 0x00,
0x00, 0x0f, 0xff, 0x00, 0x20, 0xff, 0x00, 0x00, 0x1f, 0xff, 0xc0, 0x70, 0xf7, 0x80, 0x00,
0x3f, 0xff, 0xe0, 0xf8, 0xf3, 0xc0, 0xc0, 0x7f, 0xff, 0xe0, 0x7c, 0xf3, 0xe0, 0xc0, 0xff,
0xff, 0xf0, 0x3e, 0xf7, 0xc0, 0xe0, 0xff, 0xcf, 0xf8, 0x1f, 0xff, 0x84, 0x61, 0xff, 0x8f,
0xf8, 0x0f, 0xff, 0x0e, 0x71, 0xff, 0x0f, 0xf8, 0x07, 0xfe, 0x06, 0x31, 0xff, 0x0f, 0xfc,
0x03, 0xfc, 0x27, 0x31, 0xfe, 0x4f, 0xfc, 0x01, 0xf8, 0x67, 0x31, 0xfc, 0x4f, 0xfc, 0x01,
0xf8, 0x67, 0x33, 0xfc, 0xcf, 0xfc, 0x03, 0xfc, 0x27, 0x31, 0xf8, 0x07, 0xfc, 0x07, 0xfe,
0x06, 0x31, 0xf8, 0x03, 0xfc, 0x0f, 0xff, 0x0e, 0x71, 0xf8, 0x07, 0xf8, 0x1f, 0xff, 0x84,
0x61, 0xff, 0xcf, 0xf8, 0x3e, 0xf7, 0xc0, 0xe0, 0xff, 0xcf, 0xf8, 0x7c, 0xf3, 0xe1, 0xc0,
0xff, 0xff, 0xf0, 0xf8, 0xf3, 0xc0, 0xc0, 0x7f, 0xff, 0xe0, 0x70, 0xf7, 0x80, 0x00, 0x3f,
0xff, 0xc0, 0x20, 0xff, 0x00, 0x00, 0x1f, 0xff, 0x80, 0x00, 0xfe, 0x00, 0x00, 0x07, 0xff,
0x00, 0x00, 0xfc, 0x00, 0x00, 0x01, 0xf8, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t bluetooth_advertising_4 = {
.header.always_zero = 0,
.header.w = 54,
.header.h = 35,
.data_size = 254,
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.data = bluetooth_advertising_4_map,
};

View file

@ -0,0 +1,47 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_5
#define LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_5
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_5 uint8_t
bluetooth_advertising_5_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x01, 0xfc, 0x00, 0x00, 0xfe, 0x00,
0x00, 0x0f, 0xff, 0x00, 0x20, 0xff, 0x00, 0x00, 0x1f, 0xff, 0x80, 0x70, 0xf7, 0x80, 0x00,
0x3f, 0xff, 0xe0, 0xf8, 0xf3, 0xc0, 0xc0, 0x7f, 0xff, 0xe0, 0x7c, 0xf3, 0xe0, 0xe0, 0xff,
0xff, 0xf0, 0x3e, 0xf7, 0xc0, 0xe1, 0xfe, 0x07, 0xf8, 0x1f, 0xff, 0x84, 0x61, 0xfe, 0x07,
0xf8, 0x0f, 0xff, 0x0e, 0x71, 0xfc, 0x7f, 0xf8, 0x07, 0xfe, 0x06, 0x33, 0xfc, 0x7f, 0xfc,
0x03, 0xfc, 0x27, 0x33, 0xfc, 0x07, 0xfc, 0x01, 0xf8, 0x67, 0x33, 0xfc, 0x03, 0xfc, 0x01,
0xf8, 0x67, 0x33, 0xff, 0x63, 0xfc, 0x03, 0xfc, 0x27, 0x33, 0xff, 0xf3, 0xfc, 0x07, 0xfe,
0x06, 0x33, 0xfe, 0xf3, 0xfc, 0x0f, 0xff, 0x0e, 0x71, 0xfc, 0x63, 0xf8, 0x1f, 0xff, 0x84,
0x61, 0xfe, 0x07, 0xf8, 0x3e, 0xf7, 0xc0, 0xe0, 0xff, 0x0f, 0xf8, 0x7c, 0xf3, 0xe1, 0xc0,
0xff, 0xff, 0xf0, 0xf8, 0xf3, 0xc0, 0xc0, 0x7f, 0xff, 0xe0, 0x70, 0xf7, 0x80, 0x00, 0x3f,
0xff, 0xc0, 0x20, 0xff, 0x00, 0x00, 0x1f, 0xff, 0x80, 0x00, 0xfe, 0x00, 0x00, 0x0f, 0xff,
0x00, 0x00, 0xfc, 0x00, 0x00, 0x01, 0xf8, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t bluetooth_advertising_5 = {
.header.always_zero = 0,
.header.w = 54,
.header.h = 35,
.data_size = 254,
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.data = bluetooth_advertising_5_map,
};

View file

@ -0,0 +1,47 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_1
#define LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_1
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_1 uint8_t
bluetooth_connected_1_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x01, 0xfc, 0x00, 0x00, 0x7f, 0x00,
0x00, 0x0f, 0xff, 0x00, 0x30, 0x7f, 0x80, 0x00, 0x1f, 0xff, 0xc0, 0x78, 0x77, 0xc0, 0x00,
0x3f, 0xff, 0xe0, 0x7c, 0x73, 0xe0, 0x00, 0x7f, 0xff, 0xe0, 0x3e, 0x71, 0xe0, 0x00, 0xff,
0xff, 0xf0, 0x1f, 0x73, 0xc0, 0x00, 0xff, 0x8f, 0xf8, 0x0f, 0xff, 0x80, 0x01, 0xfe, 0x0f,
0xf8, 0x87, 0xff, 0x08, 0x01, 0xfe, 0x0f, 0xf8, 0xc3, 0xfe, 0x18, 0x01, 0xff, 0xcf, 0xfc,
0xe1, 0xfc, 0x38, 0x03, 0xff, 0xcf, 0xfc, 0xf0, 0xf8, 0x78, 0x03, 0xff, 0xcf, 0xfc, 0xf0,
0xfc, 0x78, 0x03, 0xff, 0xcf, 0xfc, 0xe1, 0xfc, 0x38, 0x03, 0xff, 0xcf, 0xfc, 0xc3, 0xfe,
0x18, 0x01, 0xff, 0xcf, 0xfc, 0x87, 0xff, 0x08, 0x01, 0xff, 0xcf, 0xf8, 0x0f, 0xff, 0x80,
0x01, 0xff, 0xcf, 0xf8, 0x1e, 0x73, 0xc0, 0x00, 0xff, 0xcf, 0xf8, 0x3c, 0x71, 0xe0, 0x00,
0xff, 0xff, 0xf0, 0x78, 0x73, 0xe0, 0x00, 0x7f, 0xff, 0xe0, 0x78, 0x77, 0xc0, 0x00, 0x3f,
0xff, 0xe0, 0x30, 0x7f, 0x80, 0x00, 0x1f, 0xff, 0x80, 0x00, 0x7f, 0x00, 0x00, 0x0f, 0xff,
0x00, 0x00, 0x7e, 0x00, 0x00, 0x01, 0xfc, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t bluetooth_connected_1 = {
.header.always_zero = 0,
.header.w = 54,
.header.h = 35,
.data_size = 254,
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.data = bluetooth_connected_1_map,
};

View file

@ -0,0 +1,47 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_2
#define LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_2
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_2 uint8_t
bluetooth_connected_2_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x03, 0xfc, 0x00, 0x00, 0x7f, 0x00,
0x00, 0x0f, 0xff, 0x00, 0x30, 0x7f, 0x80, 0x00, 0x1f, 0xff, 0xc0, 0x78, 0x73, 0xc0, 0x00,
0x7f, 0xff, 0xe0, 0x7c, 0x71, 0xe0, 0x00, 0x7f, 0xff, 0xf0, 0x3e, 0x73, 0xe0, 0x00, 0xff,
0x0f, 0xf0, 0x1f, 0x77, 0xc0, 0x01, 0xfe, 0x07, 0xf8, 0x0f, 0xff, 0x80, 0x01, 0xfc, 0x63,
0xf8, 0x87, 0xff, 0x08, 0x01, 0xff, 0xf3, 0xfc, 0xc3, 0xfe, 0x18, 0x03, 0xff, 0xe3, 0xfc,
0xe1, 0xfc, 0x38, 0x03, 0xff, 0xe7, 0xfc, 0xf0, 0xf8, 0x78, 0x03, 0xff, 0xc7, 0xfc, 0xe1,
0xfc, 0x38, 0x03, 0xff, 0x8f, 0xfc, 0xc3, 0xfe, 0x18, 0x03, 0xff, 0x1f, 0xfc, 0x87, 0xff,
0x08, 0x01, 0xfe, 0x3f, 0xfc, 0x0f, 0xff, 0x80, 0x01, 0xfc, 0x03, 0xf8, 0x1f, 0x77, 0xc0,
0x01, 0xfc, 0x03, 0xf8, 0x3e, 0x73, 0xe0, 0x00, 0xff, 0xff, 0xf0, 0x7c, 0x71, 0xe0, 0x00,
0x7f, 0xff, 0xf0, 0x78, 0x73, 0xc0, 0x00, 0x7f, 0xff, 0xe0, 0x30, 0x7f, 0x80, 0x00, 0x1f,
0xff, 0xc0, 0x00, 0x7f, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x03, 0xfc,
0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t bluetooth_connected_2 = {
.header.always_zero = 0,
.header.w = 54,
.header.h = 35,
.data_size = 254,
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.data = bluetooth_connected_2_map,
};

View file

@ -0,0 +1,47 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_3
#define LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_3
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_3 uint8_t
bluetooth_connected_3_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x03, 0xfc, 0x00, 0x00, 0x7f, 0x00,
0x00, 0x0f, 0xff, 0x00, 0x30, 0x7f, 0x80, 0x00, 0x1f, 0xff, 0xc0, 0x78, 0x77, 0xc0, 0x00,
0x7f, 0xff, 0xe0, 0x7c, 0x73, 0xe0, 0x00, 0x7f, 0xff, 0xf0, 0x3e, 0x71, 0xe0, 0x00, 0xff,
0x9f, 0xf0, 0x1f, 0x73, 0xc0, 0x01, 0xfe, 0x07, 0xf8, 0x0f, 0xff, 0x80, 0x01, 0xfc, 0x03,
0xf8, 0x87, 0xff, 0x08, 0x01, 0xfe, 0xe3, 0xfc, 0xc3, 0xfe, 0x18, 0x03, 0xff, 0xe3, 0xfc,
0xe1, 0xfc, 0x38, 0x03, 0xff, 0x87, 0xfc, 0xf0, 0xf8, 0x78, 0x03, 0xff, 0x87, 0xfc, 0xf0,
0xfc, 0x78, 0x03, 0xff, 0x83, 0xfc, 0xe1, 0xfe, 0x38, 0x03, 0xff, 0xf3, 0xfc, 0xc3, 0xff,
0x18, 0x03, 0xfe, 0xf3, 0xfc, 0x87, 0xff, 0x88, 0x01, 0xfc, 0x63, 0xf8, 0x0f, 0xf7, 0xc0,
0x01, 0xfe, 0x03, 0xf8, 0x1f, 0x73, 0xe0, 0x01, 0xff, 0x0f, 0xf8, 0x3e, 0x71, 0xe0, 0x00,
0xff, 0xff, 0xf0, 0x7c, 0x73, 0xe0, 0x00, 0x7f, 0xff, 0xe0, 0x78, 0x77, 0xc0, 0x00, 0x3f,
0xff, 0xe0, 0x30, 0x7f, 0x80, 0x00, 0x1f, 0xff, 0x80, 0x00, 0x7f, 0x00, 0x00, 0x0f, 0xff,
0x00, 0x00, 0x7e, 0x00, 0x00, 0x01, 0xf8, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t bluetooth_connected_3 = {
.header.always_zero = 0,
.header.w = 54,
.header.h = 35,
.data_size = 254,
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.data = bluetooth_connected_3_map,
};

View file

@ -0,0 +1,47 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_4
#define LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_4
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_4 uint8_t
bluetooth_connected_4_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x01, 0xf8, 0x00, 0x00, 0x7f, 0x00,
0x00, 0x07, 0xff, 0x00, 0x30, 0x7f, 0x80, 0x00, 0x1f, 0xff, 0x80, 0x78, 0x77, 0xc0, 0x00,
0x3f, 0xff, 0xe0, 0x7c, 0x73, 0xe0, 0x00, 0x7f, 0xff, 0xe0, 0x3e, 0x71, 0xe0, 0x00, 0xff,
0xff, 0xf0, 0x1f, 0x73, 0xc0, 0x00, 0xff, 0xcf, 0xf8, 0x0f, 0xff, 0x80, 0x01, 0xff, 0x8f,
0xf8, 0x87, 0xff, 0x08, 0x01, 0xff, 0x0f, 0xf8, 0xc3, 0xfe, 0x18, 0x01, 0xff, 0x0f, 0xfc,
0xe1, 0xfc, 0x38, 0x03, 0xfe, 0x4f, 0xfc, 0xf0, 0xf8, 0x78, 0x03, 0xfc, 0x4f, 0xfc, 0xf0,
0xfc, 0x78, 0x03, 0xfc, 0xcf, 0xfc, 0xe1, 0xfe, 0x38, 0x03, 0xf8, 0xc7, 0xfc, 0xc3, 0xff,
0x18, 0x01, 0xf8, 0x03, 0xfc, 0x87, 0xff, 0x88, 0x01, 0xf8, 0x03, 0xf8, 0x0f, 0xf7, 0xc0,
0x01, 0xff, 0xcf, 0xf8, 0x1f, 0x73, 0xe0, 0x00, 0xff, 0xcf, 0xf8, 0x3e, 0x71, 0xe0, 0x00,
0xff, 0xff, 0xf0, 0x7c, 0x73, 0xe0, 0x00, 0x7f, 0xff, 0xe0, 0x78, 0x77, 0xc0, 0x00, 0x3f,
0xff, 0xe0, 0x30, 0x7f, 0x80, 0x00, 0x1f, 0xff, 0x80, 0x00, 0x7f, 0x00, 0x00, 0x0f, 0xff,
0x00, 0x00, 0x7e, 0x00, 0x00, 0x01, 0xf8, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t bluetooth_connected_4 = {
.header.always_zero = 0,
.header.w = 54,
.header.h = 35,
.data_size = 254,
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.data = bluetooth_connected_4_map,
};

View file

@ -0,0 +1,47 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_5
#define LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_5
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_5 uint8_t
bluetooth_connected_5_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x01, 0xfc, 0x00, 0x00, 0x7f, 0x00,
0x00, 0x0f, 0xff, 0x00, 0x30, 0x7f, 0x80, 0x00, 0x1f, 0xff, 0x80, 0x78, 0x77, 0xc0, 0x00,
0x3f, 0xff, 0xe0, 0x7c, 0x73, 0xe0, 0x00, 0x7f, 0xff, 0xe0, 0x3e, 0x71, 0xe0, 0x00, 0xff,
0xff, 0xf0, 0x1f, 0x73, 0xc0, 0x01, 0xfe, 0x07, 0xf8, 0x0f, 0xff, 0x80, 0x01, 0xfe, 0x07,
0xf8, 0x87, 0xff, 0x08, 0x01, 0xfc, 0x7f, 0xf8, 0xc3, 0xfe, 0x18, 0x03, 0xfc, 0x7f, 0xfc,
0xe1, 0xfc, 0x38, 0x03, 0xfc, 0x07, 0xfc, 0xf0, 0xf8, 0x78, 0x03, 0xfc, 0x03, 0xfc, 0xf0,
0xfc, 0x78, 0x03, 0xff, 0x63, 0xfc, 0xe1, 0xfe, 0x38, 0x03, 0xff, 0xf3, 0xfc, 0xc3, 0xff,
0x18, 0x03, 0xfe, 0xf3, 0xfc, 0x87, 0xff, 0x88, 0x01, 0xfc, 0x63, 0xf8, 0x0f, 0xf7, 0xc0,
0x01, 0xfe, 0x07, 0xf8, 0x1e, 0x73, 0xc0, 0x00, 0xff, 0x0f, 0xf8, 0x3c, 0x71, 0xe0, 0x00,
0xff, 0xff, 0xf0, 0x7c, 0x73, 0xe0, 0x00, 0x7f, 0xff, 0xe0, 0x78, 0x77, 0xc0, 0x00, 0x3f,
0xff, 0xc0, 0x30, 0x7f, 0x80, 0x00, 0x1f, 0xff, 0x80, 0x00, 0x7f, 0x00, 0x00, 0x0f, 0xff,
0x00, 0x00, 0x7e, 0x00, 0x00, 0x01, 0xf8, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t bluetooth_connected_5 = {
.header.always_zero = 0,
.header.w = 54,
.header.h = 35,
.data_size = 254,
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.data = bluetooth_connected_5_map,
};

View file

@ -0,0 +1,49 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_RIGHT
#define LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_RIGHT
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_RIGHT
uint8_t bluetooth_connected_right_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 0x3f, 0x80,
0x00, 0x0f, 0xfe, 0x00, 0x10, 0x3f, 0xc0, 0x00, 0x3f, 0xff, 0x80, 0x38, 0x3b, 0xe0, 0x00,
0x7f, 0xff, 0xc0, 0x7c, 0x39, 0xf0, 0x00, 0xff, 0xff, 0xe0, 0x3e, 0x38, 0xf0, 0x01, 0xff,
0xff, 0xf0, 0x1f, 0x39, 0xe0, 0x01, 0xff, 0xfe, 0x30, 0x0f, 0xbb, 0xc0, 0x03, 0xff, 0xfc,
0x38, 0x87, 0xff, 0x84, 0x03, 0xff, 0xf8, 0x38, 0xc3, 0xff, 0x0c, 0x07, 0xff, 0xf0, 0x3c,
0xe1, 0xfe, 0x1c, 0x07, 0xcf, 0xe0, 0x7c, 0xf0, 0xfc, 0x3c, 0x07, 0x87, 0xc0, 0xfc, 0xf0,
0xfc, 0x3c, 0x07, 0x83, 0x81, 0xfc, 0xe1, 0xfe, 0x1c, 0x07, 0x81, 0x03, 0xfc, 0xc3, 0xff,
0x0c, 0x07, 0xc0, 0x07, 0xfc, 0x87, 0xff, 0x84, 0x07, 0xe0, 0x0f, 0xfc, 0x0f, 0xbb, 0xc0,
0x03, 0xf0, 0x1f, 0xf8, 0x1f, 0x39, 0xe0, 0x03, 0xf8, 0x3f, 0xf8, 0x3e, 0x38, 0xf0, 0x01,
0xfc, 0xff, 0xf0, 0x7c, 0x39, 0xf0, 0x01, 0xff, 0xff, 0xf0, 0x38, 0x3b, 0xe0, 0x00, 0xff,
0xff, 0xe0, 0x10, 0x3f, 0xc0, 0x00, 0x7f, 0xff, 0xc0, 0x00, 0x3f, 0x80, 0x00, 0x3f, 0xff,
0x80, 0x00, 0x3f, 0x00, 0x00, 0x0f, 0xfe, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x03, 0xf8, 0x00,
0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t bluetooth_connected_right = {
.header.always_zero = 0,
.header.w = 54,
.header.h = 35,
.data_size = 253,
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.data = bluetooth_connected_right_map,
};

View file

@ -0,0 +1,49 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_BLUETOOTH_DISCONNECTED_RIGHT
#define LV_ATTRIBUTE_IMG_BLUETOOTH_DISCONNECTED_RIGHT
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BLUETOOTH_DISCONNECTED_RIGHT
uint8_t bluetooth_disconnected_right_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 0x3f, 0x80,
0x00, 0x0f, 0xfe, 0x00, 0x10, 0x3f, 0xc0, 0x00, 0x3f, 0xff, 0x80, 0x38, 0x3b, 0xe0, 0x00,
0x7f, 0xff, 0xc0, 0x7c, 0x39, 0xf0, 0x00, 0xff, 0xff, 0xe0, 0x3e, 0x38, 0xf0, 0x01, 0xff,
0xff, 0xf0, 0x1f, 0x39, 0xe0, 0x01, 0xe3, 0xf8, 0xf0, 0x0f, 0xbb, 0xc0, 0x03, 0xe1, 0xf0,
0xf8, 0x07, 0xff, 0x80, 0x03, 0xe0, 0xe0, 0xf8, 0x03, 0xff, 0x00, 0x07, 0xf0, 0x01, 0xfc,
0x01, 0xfe, 0x00, 0x07, 0xf8, 0x03, 0xfc, 0x00, 0xfc, 0x00, 0x07, 0xfc, 0x07, 0xfc, 0x00,
0xfc, 0x00, 0x07, 0xfc, 0x07, 0xfc, 0x01, 0xfe, 0x00, 0x07, 0xfc, 0x07, 0xfc, 0x03, 0xff,
0x00, 0x07, 0xf8, 0x03, 0xfc, 0x07, 0xff, 0x80, 0x07, 0xf0, 0x01, 0xfc, 0x0f, 0xbb, 0xc0,
0x03, 0xe0, 0xe0, 0xf8, 0x1f, 0x39, 0xe0, 0x03, 0xe1, 0xf0, 0xf8, 0x3e, 0x38, 0xf0, 0x01,
0xe3, 0xf8, 0xf0, 0x7c, 0x39, 0xf0, 0x01, 0xff, 0xff, 0xf0, 0x38, 0x3b, 0xe0, 0x00, 0xff,
0xff, 0xe0, 0x10, 0x3f, 0xc0, 0x00, 0x7f, 0xff, 0xc0, 0x00, 0x3f, 0x80, 0x00, 0x3f, 0xff,
0x80, 0x00, 0x3f, 0x00, 0x00, 0x0f, 0xfe, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x03, 0xf8, 0x00,
0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t bluetooth_disconnected_right = {
.header.always_zero = 0,
.header.w = 54,
.header.h = 35,
.data_size = 253,
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.data = bluetooth_disconnected_right_map,
};

View file

@ -0,0 +1,44 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_LAYERS
#define LV_ATTRIBUTE_IMG_LAYERS
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_LAYERS uint8_t
layers_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00,
0x00, 0x07, 0xfc, 0x00, 0x00, 0x00, 0x1f, 0xff, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xc0, 0x00,
0x01, 0xff, 0xff, 0xf0, 0x00, 0x07, 0xff, 0xff, 0xfc, 0x00, 0x1f, 0xff, 0xff, 0xff, 0x00,
0x3f, 0xff, 0xff, 0xff, 0x80, 0x1f, 0xff, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xff, 0xfe, 0x00,
0x01, 0xff, 0xff, 0xf0, 0x00, 0x00, 0xff, 0xff, 0xe0, 0x00, 0x07, 0x9f, 0xff, 0x3c, 0x00,
0x1e, 0x07, 0xfc, 0x0f, 0x00, 0x38, 0x01, 0xe0, 0x03, 0x80, 0x30, 0x00, 0x00, 0x01, 0x80,
0x38, 0x00, 0x00, 0x03, 0x80, 0x0e, 0x00, 0x00, 0x0e, 0x00, 0x03, 0xc0, 0x00, 0x78, 0x00,
0x01, 0xf0, 0x01, 0xf0, 0x00, 0x07, 0xfc, 0x07, 0xfc, 0x00, 0x1f, 0xff, 0x1f, 0xff, 0x00,
0x3f, 0xff, 0xff, 0xff, 0x80, 0x3f, 0xff, 0xff, 0xff, 0x80, 0x1f, 0xff, 0xff, 0xff, 0x00,
0x07, 0xff, 0xff, 0xfc, 0x00, 0x00, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x3f, 0xff, 0x80, 0x00,
0x00, 0x0f, 0xfe, 0x00, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t layers = {
.header.always_zero = 0,
.header.w = 35,
.header.h = 35,
.data_size = 183,
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.data = layers_map,
};

View file

@ -0,0 +1,40 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_LAYERS2
#define LV_ATTRIBUTE_IMG_LAYERS2
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_LAYERS2 uint8_t
layers2_map[] = {
0x00, 0x00, 0x00, 0xff, /*Color of index 0*/
0xff, 0xff, 0xff, 0xff, /*Color of index 1*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x30, 0x0f, 0x18, 0xdf, 0xdf, 0xc0, 0x04, 0x00,
0x00, 0x80, 0x30, 0x19, 0x98, 0xd8, 0x18, 0xe0, 0x0e, 0x00, 0x00, 0x80, 0x30, 0x30, 0xd8,
0xd8, 0x18, 0xe0, 0x1f, 0x00, 0x00, 0x80, 0x30, 0x30, 0xcf, 0x9f, 0xd9, 0xc0, 0x04, 0x00,
0x00, 0x80, 0x30, 0x3f, 0xc7, 0x18, 0x1f, 0x80, 0x04, 0x00, 0x03, 0xe0, 0x30, 0x39, 0xc6,
0x18, 0x1b, 0x80, 0x04, 0x00, 0x01, 0xc0, 0x3f, 0xb0, 0xc6, 0x1f, 0xd9, 0xc0, 0x04, 0x00,
0x00, 0x80, 0x3f, 0xb0, 0xc6, 0x1f, 0xd8, 0xe0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t layers2 = {
.header.always_zero = 0,
.header.w = 78,
.header.h = 12,
.data_size = 128,
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.data = layers2_map,
};

View file

@ -0,0 +1,58 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_ZENLOGO
#define LV_ATTRIBUTE_IMG_ZENLOGO
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_ZENLOGO uint8_t
zenlogo_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0xe3, 0xe3, 0x9e,
0x3e, 0x02, 0x72, 0xe0, 0x00, 0x00, 0x06, 0x36, 0x36, 0x33, 0x63, 0x02, 0x8b, 0x10, 0x00,
0x00, 0x04, 0x14, 0x14, 0x21, 0x41, 0x02, 0x82, 0x10, 0x00, 0x00, 0x04, 0x04, 0x14, 0x21,
0x7f, 0x7a, 0x72, 0x10, 0x00, 0x00, 0x04, 0x04, 0x14, 0x21, 0x40, 0x02, 0x0a, 0x10, 0x00,
0x00, 0x04, 0x14, 0x14, 0x21, 0x41, 0x02, 0x0a, 0x10, 0x00, 0x00, 0x06, 0x36, 0x34, 0x21,
0x63, 0x02, 0x8a, 0x10, 0x00, 0x00, 0x03, 0xe3, 0xe4, 0x21, 0x3e, 0x02, 0x72, 0x10, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x03, 0xfc,
0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 0x00, 0xff, 0xf1,
0xf8, 0x00, 0x60, 0x0f, 0xc0, 0x00, 0x00, 0x0f, 0xff, 0xfb, 0xff, 0xe0, 0xf8, 0x1f, 0x80,
0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xc1, 0xfc, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
0xff, 0xc1, 0xfc, 0x1f, 0x00, 0x7f, 0xc0, 0x1f, 0xff, 0xff, 0xe0, 0x01, 0xfc, 0x3e, 0x00,
0x40, 0x1f, 0xff, 0xe0, 0xff, 0xc0, 0x07, 0xfc, 0xfc, 0x00, 0xdf, 0xff, 0x80, 0x01, 0xff,
0xc0, 0x0f, 0xdc, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x8f, 0x1f, 0x9f, 0xf8, 0x00,
0x00, 0x00, 0x00, 0x1f, 0xef, 0xff, 0x1f, 0x9f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x8f,
0xff, 0x3f, 0x1f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f, 0xfe, 0x3f, 0x0f, 0xf0, 0x00,
0x00, 0x00, 0x03, 0xf8, 0x1f, 0x80, 0x7e, 0x0f, 0xe0, 0x00, 0x00, 0x00, 0x07, 0xe0, 0x3e,
0x00, 0x7e, 0x0f, 0xe0, 0x00, 0x00, 0x00, 0x0f, 0xc0, 0x3c, 0x00, 0x7e, 0x0f, 0xc0, 0x00,
0x00, 0x00, 0x1f, 0xf8, 0x3c, 0x00, 0x78, 0x0f, 0xc0, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xbc,
0x00, 0x78, 0x0f, 0xc0, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xfc, 0x00, 0xf8, 0x0f, 0xc0, 0x00,
0x00, 0x00, 0x1f, 0xff, 0xfc, 0x0f, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff,
0xff, 0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x0f, 0xff, 0xa0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t zenlogo = {
.header.always_zero = 0,
.header.w = 80,
.header.h = 38,
.data_size = 388,
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.data = zenlogo_map,
};

View file

@ -0,0 +1,67 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <kernel.h>
#include <logging/log.h>
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
#include <zmk/display.h>
#include "layer_status.h"
#include <zmk/events/layer_state_changed.h>
#include <zmk/event_manager.h>
#include <zmk/endpoints.h>
#include <zmk/keymap.h>
static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets);
struct layer_status_state {
uint8_t index;
const char *label;
};
static void set_layer_symbol(lv_obj_t *label, struct layer_status_state state) {
const char *layer_label = state.label;
uint8_t active_layer_index = state.index;
if (layer_label == NULL) {
char text[6] = {};
sprintf(text, " %i", active_layer_index);
lv_label_set_text(label, text);
} else {
lv_label_set_text(label, layer_label);
}
}
static void layer_status_update_cb(struct layer_status_state state) {
struct zmk_widget_layer_status *widget;
SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_layer_symbol(widget->obj, state); }
}
static struct layer_status_state layer_status_get_state(const zmk_event_t *eh) {
uint8_t index = zmk_keymap_highest_layer_active();
return (struct layer_status_state){.index = index, .label = zmk_keymap_layer_label(index)};
}
ZMK_DISPLAY_WIDGET_LISTENER(widget_layer_status, struct layer_status_state, layer_status_update_cb,
layer_status_get_state)
ZMK_SUBSCRIPTION(widget_layer_status, zmk_layer_state_changed);
int zmk_widget_layer_status_init(struct zmk_widget_layer_status *widget, lv_obj_t *parent) {
widget->obj = lv_label_create(parent, NULL);
sys_slist_append(&widgets, &widget->node);
widget_layer_status_init();
return 0;
}
lv_obj_t *zmk_widget_layer_status_obj(struct zmk_widget_layer_status *widget) {
return widget->obj;
}

View file

@ -0,0 +1,19 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include <lvgl.h>
#include <kernel.h>
struct zmk_widget_layer_status {
sys_snode_t node;
lv_obj_t *obj;
};
int zmk_widget_layer_status_init(struct zmk_widget_layer_status *widget, lv_obj_t *parent);
lv_obj_t *zmk_widget_layer_status_obj(struct zmk_widget_layer_status *widget);

View file

@ -0,0 +1,138 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <kernel.h>
#include <bluetooth/services/bas.h>
#include <logging/log.h>
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
#include <zmk/display.h>
#include "output_status.h"
#include <zmk/event_manager.h>
#include <zmk/events/usb_conn_state_changed.h>
#include <zmk/events/ble_active_profile_changed.h>
#include <zmk/events/endpoint_selection_changed.h>
#include <zmk/usb.h>
#include <zmk/ble.h>
#include <zmk/endpoints.h>
LV_IMG_DECLARE(bluetooth_advertising);
LV_IMG_DECLARE(bluetooth_connected_right);
LV_IMG_DECLARE(bluetooth_disconnected_right);
LV_IMG_DECLARE(bluetooth_connected_1);
LV_IMG_DECLARE(bluetooth_connected_2);
LV_IMG_DECLARE(bluetooth_connected_3);
LV_IMG_DECLARE(bluetooth_connected_4);
LV_IMG_DECLARE(bluetooth_connected_5);
LV_IMG_DECLARE(bluetooth_advertising_1);
LV_IMG_DECLARE(bluetooth_advertising_2);
LV_IMG_DECLARE(bluetooth_advertising_3);
LV_IMG_DECLARE(bluetooth_advertising_4);
LV_IMG_DECLARE(bluetooth_advertising_5);
LV_IMG_DECLARE(USB_connected);
static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets);
struct output_status_state {
enum zmk_endpoint selected_endpoint;
bool active_profile_connected;
bool active_profile_bonded;
uint8_t active_profile_index;
};
static struct output_status_state get_state(const zmk_event_t *_eh) {
return (struct output_status_state){.selected_endpoint = zmk_endpoints_selected(),
.active_profile_connected =
zmk_ble_active_profile_is_connected(),
.active_profile_bonded = !zmk_ble_active_profile_is_open(),
.active_profile_index = zmk_ble_active_profile_index()};
;
}
static void set_status_symbol(lv_obj_t *icon, struct output_status_state state) {
switch (state.selected_endpoint) {
case ZMK_ENDPOINT_USB:
lv_img_set_src(icon, &USB_connected);
break;
case ZMK_ENDPOINT_BLE:
if (state.active_profile_bonded) {
if (state.active_profile_connected) {
// sprintf(text, LV_SYMBOL_BLUETOOTH "%i " LV_SYMBOL_OK, active_profile_index);
switch (state.active_profile_index) {
case 0:
lv_img_set_src(icon, &bluetooth_connected_1);
break;
case 1:
lv_img_set_src(icon, &bluetooth_connected_2);
break;
case 2:
lv_img_set_src(icon, &bluetooth_connected_3);
break;
case 3:
lv_img_set_src(icon, &bluetooth_connected_4);
break;
case 4:
lv_img_set_src(icon, &bluetooth_connected_5);
break;
}
} else {
lv_img_set_src(icon, &bluetooth_disconnected_right);
}
} else {
switch (state.active_profile_index) {
case 0:
lv_img_set_src(icon, &bluetooth_advertising_1);
break;
case 1:
lv_img_set_src(icon, &bluetooth_advertising_2);
break;
case 2:
lv_img_set_src(icon, &bluetooth_advertising_3);
break;
case 3:
lv_img_set_src(icon, &bluetooth_advertising_4);
break;
case 4:
lv_img_set_src(icon, &bluetooth_advertising_5);
break;
}
}
break;
}
}
static void output_status_update_cb(struct output_status_state state) {
struct zmk_widget_output_status *widget;
SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_status_symbol(widget->obj, state); }
}
ZMK_DISPLAY_WIDGET_LISTENER(widget_output_status, struct output_status_state,
output_status_update_cb, get_state)
ZMK_SUBSCRIPTION(widget_output_status, zmk_endpoint_selection_changed);
#if IS_ENABLED(CONFIG_USB_DEVICE_STACK)
ZMK_SUBSCRIPTION(widget_output_status, zmk_usb_conn_state_changed);
#endif
#if defined(CONFIG_ZMK_BLE)
ZMK_SUBSCRIPTION(widget_output_status, zmk_ble_active_profile_changed);
#endif
int zmk_widget_output_status_init(struct zmk_widget_output_status *widget, lv_obj_t *parent) {
widget->obj = lv_img_create(parent, NULL);
lv_obj_set_size(widget->obj, 40, 15);
sys_slist_append(&widgets, &widget->node);
widget_output_status_init();
return 0;
}
lv_obj_t *zmk_widget_output_status_obj(struct zmk_widget_output_status *widget) {
return widget->obj;
}

View file

@ -0,0 +1,19 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include <lvgl.h>
#include <kernel.h>
struct zmk_widget_output_status {
sys_snode_t node;
lv_obj_t *obj;
};
int zmk_widget_output_status_init(struct zmk_widget_output_status *widget, lv_obj_t *parent);
lv_obj_t *zmk_widget_output_status_obj(struct zmk_widget_output_status *widget);

View file

@ -0,0 +1,61 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#include <kernel.h>
#include <bluetooth/services/bas.h>
#include <logging/log.h>
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
#include <zmk/display.h>
#include "peripheral_status.h"
#include <zmk/event_manager.h>
#include <zmk/split/bluetooth/peripheral.h>
#include <zmk/events/split_peripheral_status_changed.h>
LV_IMG_DECLARE(bluetooth_connected_right);
LV_IMG_DECLARE(bluetooth_disconnected_right);
static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets);
struct peripheral_status_state {
bool connected;
};
static struct peripheral_status_state get_state(const zmk_event_t *_eh) {
return (struct peripheral_status_state){.connected = zmk_split_bt_peripheral_is_connected()};
}
static void set_status_symbol(lv_obj_t *icon, struct peripheral_status_state state) {
LOG_DBG("halves connected? %s", state.connected ? "true" : "false");
lv_img_set_src(icon,
state.connected ? &bluetooth_connected_right : &bluetooth_disconnected_right);
}
static void output_status_update_cb(struct peripheral_status_state state) {
struct zmk_widget_peripheral_status *widget;
SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_status_symbol(widget->obj, state); }
}
ZMK_DISPLAY_WIDGET_LISTENER(widget_peripheral_status, struct peripheral_status_state,
output_status_update_cb, get_state)
ZMK_SUBSCRIPTION(widget_peripheral_status, zmk_split_peripheral_status_changed);
int zmk_widget_peripheral_status_init(struct zmk_widget_peripheral_status *widget,
lv_obj_t *parent) {
widget->obj = lv_img_create(parent, NULL);
sys_slist_append(&widgets, &widget->node);
widget_peripheral_status_init();
return 0;
}
lv_obj_t *zmk_widget_peripheral_status_obj(struct zmk_widget_peripheral_status *widget) {
return widget->obj;
}

View file

@ -0,0 +1,20 @@
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include <lvgl.h>
#include <kernel.h>
struct zmk_widget_peripheral_status {
sys_snode_t node;
lv_obj_t *obj;
};
int zmk_widget_peripheral_status_init(struct zmk_widget_peripheral_status *widget,
lv_obj_t *parent);
lv_obj_t *zmk_widget_peripheral_status_obj(struct zmk_widget_peripheral_status *widget);

View file

@ -16,6 +16,7 @@
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,console = &cdc_acm_uart;
zmk,battery = &vbatt;
};
leds {
@ -34,6 +35,14 @@
};
};
vbatt: vbatt {
compatible = "zmk,battery-voltage-divider";
label = "BATTERY";
io-channels = <&adc 0>;
output-ohms = <1000000>;
full-ohms = <(1000000 + 1000000)>;
};
};
&adc {

View file

@ -0,0 +1,10 @@
file_format: "1"
id: nrf52840dk_nrf52840
name: Nordic nRF52840 DK
type: board
arch: arm
outputs:
- usb
- ble
url: https://www.nordicsemi.com/Products/Development-hardware/nrf52840-dk
exposes: [arduino_uno]

View file

@ -0,0 +1,10 @@
file_format: "1"
id: nrf5340dk_nrf5340_cpuapp
name: Nordic nRF5340 DK
type: board
arch: arm
outputs:
- usb
- ble
url: https://www.nordicsemi.com/Products/Development-hardware/nrf5340-dk
exposes: [arduino_uno]

View file

@ -0,0 +1,7 @@
# SPDX-License-Identifier: MIT
config BOARD_ENABLE_DCDC
bool "Enable DCDC mode"
select SOC_DCDC_NRF52X
default y
depends on (BOARD_PILLBUG)

View file

@ -0,0 +1,6 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
config BOARD_PILLBUG
bool "PillBug"
depends on SOC_NRF52840_QIAA

View file

@ -0,0 +1,25 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
if BOARD_PILLBUG
config BOARD
default "PillBug"
if USB_DEVICE_STACK
config USB_NRFX
default y
endif # USB_DEVICE_STACK
config BT_CTLR
default BT
config ZMK_BLE
default y
config ZMK_USB
default y
endif # BOARD_PILLBUG

View file

@ -0,0 +1,50 @@
/*
* Copyright (c) 2022 Kyle McCreery
*
* SPDX-License-Identifier: MIT
*/
/ {
blackpill: connector {
compatible = "blackpill";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map
= <2 0 &gpio0 9 0> /* PC13 */
, <3 0 &gpio0 10 0> /* PC14 */
, <4 0 &gpio1 6 0> /* PC15 */
, <10 0 &gpio0 25 0> /* PA0 */
, <11 0 &gpio0 5 0> /* PA1 */
, <12 0 &gpio1 15 0> /* PA2 */
, <13 0 &gpio0 2 0> /* PA3 */
, <14 0 &gpio1 11 0> /* PA4 */
, <15 0 &gpio1 8 0> /* PA5 */
, <16 0 &gpio0 26 0> /* PA6 */
, <17 0 &gpio0 11 0> /* PA7 */
, <18 0 &gpio1 9 0> /* PB0 */
, <19 0 &gpio1 14 0> /* PB1 */
, <20 0 &gpio0 3 0> /* PB2 */
, <21 0 &gpio0 31 0> /* PB10 */
, <25 0 &gpio0 12 0> /* PB12 */
, <26 0 &gpio0 19 0> /* PB13 */
, <27 0 &gpio1 1 0> /* PB14 */
, <28 0 &gpio0 29 0> /* PB15 */
, <29 0 &gpio1 13 0> /* PA8 */
, <30 0 &gpio0 6 0> /* PA9 */
, <31 0 &gpio0 8 0> /* PA10 */
, <38 0 &gpio1 0 0> /* PA15 */
, <39 0 &gpio1 10 0> /* PB3 */
, <40 0 &gpio1 2 0> /* PB4 */
, <41 0 &gpio1 4 0> /* PB5 */
, <42 0 &gpio0 13 0> /* PB6 */
, <43 0 &gpio0 15 0> /* PB7 */
, <45 0 &gpio0 17 0> /* PB8 */
, <46 0 &gpio0 24 0> /* PB9 */
;
};
};
blackpill_i2c: &i2c0 {};
blackpill_spi: &spi1 {};
blackpill_serial: &uart0 {};

View file

@ -0,0 +1,6 @@
# SPDX-License-Identifier: MIT
set(OPENOCD_NRF5_SUBFAMILY nrf52)
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
include(${ZEPHYR_BASE}/boards/common/openocd-nrf5.board.cmake)

View file

@ -0,0 +1,132 @@
/*
* Copyright (c) 2022 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include "blackpill_pins.dtsi"
/ {
model = "PillBug";
compatible = "pillbug";
chosen {
zephyr,code-partition = &code_partition;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,console = &cdc_acm_uart;
zmk,battery = &vbatt;
};
leds {
compatible = "gpio-leds";
blue_led: led_0 {
gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
label = "Blue LED";
};
};
ext-power {
compatible = "zmk,ext-power-generic";
label = "EXT_POWER";
control-gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
init-delay-ms = <50>;
};
vbatt: vbatt {
compatible = "zmk,battery-voltage-divider";
label = "BATTERY";
io-channels = <&adc 2>;
output-ohms = <2000000>;
full-ohms = <(2000000 + 820000)>;
};
};
&adc {
status = "okay";
};
&gpiote {
status = "okay";
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&i2c0 {
compatible = "nordic,nrf-twi";
sda-pin = <15>;
scl-pin = <13>;
};
&spi1{
status = "disabled";
compatible = "nordic,nrf-spim";
sck-pin = <40>;
mosi-pin = <11>;
miso-pin = <26>;
};
&uart0 {
compatible = "nordic,nrf-uarte";
tx-pin = <6>;
rx-pin = <8>;
};
&usbd {
status = "okay";
cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0";
};
};
&flash0 {
/*
* For more information, see:
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
*/
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
sd_partition: partition@0 {
label = "mbr";
reg = <0x00000000 0x00001000>;
};
code_partition: partition@1000 {
label = "code_partition";
reg = <0x00001000 0x000d3000>;
};
/*
* The flash starting at 0x000d4000 and ending at
* 0x000f3fff is reserved for use by the application.
*/
/*
* Storage partition will be used by FCB/LittleFS/NVS
* if enabled.
*/
storage_partition: partition@d4000 {
label = "storage";
reg = <0x000d4000 0x00020000>;
};
boot_partition: partition@f4000 {
label = "adafruit_boot";
reg = <0x000f4000 0x0000c000>;
};
};
};

View file

@ -0,0 +1,15 @@
identifier: pillbug
name: PillBug
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
supported:
- adc
- usb_device
- ble
- ieee802154
- pwm
- watchdog

View file

@ -0,0 +1,10 @@
file_format: "1"
id: pillbug
name: PillBug
type: board
arch: arm
outputs:
- usb
- ble
url: https://mechwild.com/product/pillbug
exposes: [blackpill]

View file

@ -0,0 +1,22 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QIAA=y
CONFIG_BOARD_PILLBUG=y
# Enable MPU
CONFIG_ARM_MPU=y
# enable GPIO
CONFIG_GPIO=y
CONFIG_USE_DT_CODE_PARTITION=y
CONFIG_BUILD_OUTPUT_UF2=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_NVS=y
CONFIG_SETTINGS_NVS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y

View file

@ -0,0 +1,4 @@
# SPDX-License-Identifier: MIT
list(APPEND EXTRA_DTC_FLAGS "-qq")

View file

@ -0,0 +1,8 @@
# Preonic V3 board configuration
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
config BOARD_PREONIC_REV3
bool "Preonic V3 Keyboard"
depends on SOC_STM32F303XC

View file

@ -0,0 +1,17 @@
# Preonic keyboard configuration
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
if BOARD_PREONIC_REV3
config ZMK_KEYBOARD_NAME
default "Preonic V3"
config ZMK_USB
default y
config ZMK_KSCAN_MATRIX_POLLING
default y
endif # BOARD_PREONIC_REV3

View file

@ -0,0 +1,7 @@
# SPDX-License-Identifier: MIT
board_runner_args(dfu-util "--pid=0483:df11" "--alt=0" "--dfuse")
board_runner_args(jlink "--device=STM32F303VC" "--speed=4000")
include(${ZEPHYR_BASE}/boards/common/dfu-util.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

View file

@ -0,0 +1,139 @@
/*
* Copyright (c) 2022 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
/dts-v1/;
#include <st/f3/stm32f303Xc.dtsi>
#include <st/f3/stm32f303c(b-c)tx-pinctrl.dtsi>
#include <dt-bindings/zmk/matrix_transform.h>
/ {
model = "Preonic PCD, rev3";
compatible = "preonic,rev3", "st,stm32f303";
chosen {
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zmk,kscan = &kscan0;
zmk,matrix_transform = &layout_grid_transform;
};
kscan0: kscan_0 {
compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN";
diode-direction = "col2row";
row-gpios
= <&gpioa 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpioa 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpioa 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpiob 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpioc 13 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpioc 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpioc 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpioa 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpioa 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpioa 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;
col-gpios
= <&gpiob 11 GPIO_ACTIVE_HIGH>
, <&gpiob 10 GPIO_ACTIVE_HIGH>
, <&gpiob 2 GPIO_ACTIVE_HIGH>
, <&gpiob 1 GPIO_ACTIVE_HIGH>
, <&gpioa 7 GPIO_ACTIVE_HIGH>
, <&gpiob 0 GPIO_ACTIVE_HIGH>
;
};
layout_grid_transform:
keymap_transform_0 {
compatible = "zmk,matrix-transform";
columns = <6>;
rows = <10>;
map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(5,5)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(6,4) RC(6,5)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(7,0) RC(7,1) RC(7,2) RC(7,3) RC(7,4) RC(7,5)
RC(8,0) RC(8,1) RC(8,2) RC(9,3) RC(9,4) RC(9,5) RC(9,0) RC(9,1) RC(9,2) RC(8,3) RC(8,4) RC(8,5)
>;
};
layout_mit_transform:
keymap_transform_1 {
compatible = "zmk,matrix-transform";
columns = <6>;
rows = <10>;
map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(5,5)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(6,4) RC(6,5)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(7,0) RC(7,1) RC(7,2) RC(7,3) RC(7,4) RC(7,5)
RC(8,0) RC(8,1) RC(8,2) RC(9,3) RC(9,4) RC(9,0) RC(9,1) RC(9,2) RC(8,3) RC(8,4) RC(8,5)
>;
};
layout_2x2u_transform:
keymap_transform_2 {
compatible = "zmk,matrix-transform";
columns = <6>;
rows = <10>;
map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(5,5)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(6,4) RC(6,5)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(7,0) RC(7,1) RC(7,2) RC(7,3) RC(7,4) RC(7,5)
RC(8,0) RC(8,1) RC(8,2) RC(9,3) RC(9,5) RC(9,1) RC(9,2) RC(8,3) RC(8,4) RC(8,5)
>;
};
};
&usb {
pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>;
pinctrl-names = "default";
status = "okay";
cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0";
};
};
&clk_hse {
status = "okay";
clock-frequency = <DT_FREQ_M(8)>;
};
&pll {
prediv = <1>;
mul = <9>;
clocks = <&clk_hse>;
status = "okay";
};
&rcc {
clocks = <&pll>;
clock-frequency = <DT_FREQ_M(72)>;
ahb-prescaler = <1>;
apb1-prescaler = <2>;
apb2-prescaler = <1>;
};
&flash0 {
/*
* For more information, see:
* http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions
*/
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
/* Set 6Kb of storage at the end of the 256Kb of flash */
storage_partition: partition@3e800 {
label = "storage";
reg = <0x0003e800 0x00001800>;
};
};
};

View file

@ -0,0 +1,65 @@
/*
* Copyright (c) 2022 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#define DEFAULT 0
#define LOWER 1
#define RAISE 2
/ {
chosen { zmk,matrix_transform = &layout_grid_transform; };
keymap {
compatible = "zmk,keymap";
default_layer {
// -------------------------------------------------------------------------------------------------
// | GRAV | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BSPC |
// | TAB | Q | W | E | R | T | Y | U | I | O | P | DEL |
// | ESC | A | S | D | F | G | H | J | K | L | ; | ' |
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | RET |
// | | LGUI | LALT | LCTL | LOWER | SPACE | SPACE | RAISE | LEFT | DOWN | UP | RIGHT |
bindings = <
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp DEL
&kp ESC &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
&kp LSHIFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp SLASH &kp RET
&none &kp LCTRL &kp LALT &kp LGUI &mo LOWER &kp SPACE &kp SPACE &mo RAISE &kp LEFT &kp DOWN &kp UP &kp RIGHT
>;
};
lower {
// ------------------------------------------------------------------------------------------
// | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | BSPC |
// | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | DEL |
// | DEL | F1 | F2 | F3 | F4 | F5 | F6 | - | + | [ | ] | | |
// | | F7 | F8 | F9 | F10 | F11 | F12 | | LCTL | HOME | END | |
// | LALT | | | | | | | | NEXT | VOL- | VOL+ | PLAY |
bindings = <
&kp LS(GRAVE) &kp LS(N1) &kp LS(N2) &kp LS(N3) &kp LS(N4) &kp LS(N5) &kp LS(N6) &kp LS(N7) &kp LS(N8) &kp LS(N9) &kp LS(N0) &kp BSPC
&kp LS(GRAVE) &kp LS(N1) &kp LS(N2) &kp LS(N3) &kp LS(N4) &kp LS(N5) &kp LS(N6) &kp LS(N7) &kp LS(N8) &kp LS(N9) &kp LS(N0) &kp DEL
&kp DEL &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp MINUS &kp PLUS &kp LEFT_BRACKET &kp RIGHT_BRACKET &kp PIPE
&none &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &none &kp LCTRL &kp HOME &kp END &none
&kp LALT &none &none &none &trans &none &none &none &kp C_NEXT &kp C_VOL_UP &kp C_VOL_UP &kp C_PLAY
>;
};
raise {
// -------------------------------------------------------------------------------------------
// | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BSPC |
// | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | DEL |
// | DEL | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
// | | F7 | F8 | F9 | F10 | F11 | F12 | # | \ | PGUP | PGDN | |
// | | | | | | SHIFT | | | NEXT | VOL- | VOL+ | PLAY |
bindings = <
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp DEL
&kp DEL &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp MINUS &kp KP_EQUAL &kp LEFT_BRACKET &kp RIGHT_BRACKET &kp BSLH
&none &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp HASH &kp BSLH &kp PG_UP &kp PG_DN &none
&none &none &none &none &none &kp LSHIFT &none &trans &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PLAY
>;
};
};
};

View file

@ -0,0 +1,19 @@
identifier: preonic_rev3
name: PREONICREV3
type: keyboard
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
ram: 40
supported:
- gpio
- i2c
- counter
- spi
- usb_device
- lsm303dlhc
- nvs
- can
- kscan

View file

@ -0,0 +1,10 @@
file_format: "1"
id: preonic_rev3
name: Preonic Rev3
type: board
arch: arm
features:
- keys
outputs:
- usb
url: https://olkb.com/collections/preonic

View file

@ -0,0 +1,15 @@
# SPDX-License-Identifier: MIT
CONFIG_SOC_SERIES_STM32F3X=y
CONFIG_SOC_STM32F303XC=y
# 72MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000
# enable pinctrl
CONFIG_PINCTRL=y
# enable GPIO
CONFIG_GPIO=y
# clock configuration
CONFIG_CLOCK_CONTROL=y

View file

@ -0,0 +1,7 @@
CONFIG_CONSOLE=n
CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_UART_INTERRUPT_DRIVEN=n
CONFIG_ZMK_USB=y
CONFIG_ZMK_BLE=n
CONFIG_ZMK_KSCAN_MATRIX_POLLING=y

View file

@ -0,0 +1,51 @@
/*
* Copyright (c) 2022 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
/ {
blackpill: connector {
compatible = "blackpill";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map
= <2 0 &gpioc 13 0> /* PC13 */
, <3 0 &gpioc 14 0> /* PC14 */
, <4 0 &gpioc 15 0> /* PC15 */
, <10 0 &gpioa 0 0> /* PA0 */
, <11 0 &gpioa 1 0> /* PA1 */
, <12 0 &gpioa 2 0> /* PA2 */
, <13 0 &gpioa 3 0> /* PA3 */
, <14 0 &gpioa 4 0> /* PA4 */
, <15 0 &gpioa 5 0> /* PA5 */
, <16 0 &gpioa 6 0> /* PA6 */
, <17 0 &gpioa 7 0> /* PA7 */
, <18 0 &gpiob 0 0> /* PB0 */
, <19 0 &gpiob 1 0> /* PB1 */
, <20 0 &gpiob 2 0> /* PB2 */
, <21 0 &gpiob 10 0> /* PB10 */
, <25 0 &gpiob 12 0> /* PB12 */
, <26 0 &gpiob 13 0> /* PB13 */
, <27 0 &gpiob 14 0> /* PB14 */
, <28 0 &gpiob 15 0> /* PB15 */
, <29 0 &gpioa 8 0> /* PA8 */
, <30 0 &gpioa 9 0> /* PA9 */
, <31 0 &gpioa 10 0> /* PA10 */
, <38 0 &gpioa 15 0> /* PA15 */
, <39 0 &gpiob 3 0> /* PB3 */
, <40 0 &gpiob 4 0> /* PB4 */
, <41 0 &gpiob 5 0> /* PB5 */
, <42 0 &gpiob 6 0> /* PB6 */
, <43 0 &gpiob 7 0> /* PB7 */
, <45 0 &gpiob 8 0> /* PB8 */
, <46 0 &gpiob 9 0> /* PB9 */
;
};
};
blackpill_i2c: &i2c1 {};
blackpill_spi: &spi1 {};
blackpill_serial: &usart1 {};

View file

@ -0,0 +1,7 @@
CONFIG_CONSOLE=n
CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_UART_INTERRUPT_DRIVEN=n
CONFIG_ZMK_USB=y
CONFIG_ZMK_BLE=n
CONFIG_ZMK_KSCAN_MATRIX_POLLING=y

View file

@ -0,0 +1,51 @@
/*
* Copyright (c) 2022 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
/ {
blackpill: connector {
compatible = "blackpill";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map
= <2 0 &gpioc 13 0> /* PC13 */
, <3 0 &gpioc 14 0> /* PC14 */
, <4 0 &gpioc 15 0> /* PC15 */
, <10 0 &gpioa 0 0> /* PA0 */
, <11 0 &gpioa 1 0> /* PA1 */
, <12 0 &gpioa 2 0> /* PA2 */
, <13 0 &gpioa 3 0> /* PA3 */
, <14 0 &gpioa 4 0> /* PA4 */
, <15 0 &gpioa 5 0> /* PA5 */
, <16 0 &gpioa 6 0> /* PA6 */
, <17 0 &gpioa 7 0> /* PA7 */
, <18 0 &gpiob 0 0> /* PB0 */
, <19 0 &gpiob 1 0> /* PB1 */
, <20 0 &gpiob 2 0> /* PB2 */
, <21 0 &gpiob 10 0> /* PB10 */
, <25 0 &gpiob 12 0> /* PB12 */
, <26 0 &gpiob 13 0> /* PB13 */
, <27 0 &gpiob 14 0> /* PB14 */
, <28 0 &gpiob 15 0> /* PB15 */
, <29 0 &gpioa 8 0> /* PA8 */
, <30 0 &gpioa 9 0> /* PA9 */
, <31 0 &gpioa 10 0> /* PA10 */
, <38 0 &gpioa 15 0> /* PA15 */
, <39 0 &gpiob 3 0> /* PB3 */
, <40 0 &gpiob 4 0> /* PB4 */
, <41 0 &gpiob 5 0> /* PB5 */
, <42 0 &gpiob 6 0> /* PB6 */
, <43 0 &gpiob 7 0> /* PB7 */
, <45 0 &gpiob 8 0> /* PB8 */
, <46 0 &gpiob 9 0> /* PB9 */
;
};
};
blackpill_i2c: &i2c1 {};
blackpill_spi: &spi1 {};
blackpill_serial: &usart1 {};

View file

@ -0,0 +1,25 @@
file_format: "1"
id: arduino_uno
name: Arduino Uno Rev3
type: interconnect
url: https://store-usa.arduino.cc/products/arduino-uno-rev3?selectedStore=us
manufacturer: Arduino
description: |
The Arduino Uno Rev3 is a board who's popularity lead to countless shields being developed for it. By
natural extension, once there were many shields designed for it, many other *boards* began to be developed
that were compatible to leverage the extensive available shields. Today, many dev kits come with Uno
headers to make it easy to work with them.
Note: ZMK doesn't support boards with AVR 8-bit processors, such as the ATmega32U4, because Zephyr™ only
supports 32-bit and 64-bit platforms. As a result, boards like the original Arduino Uno Rev3 itself are
*not* supported by ZMK.
node_labels:
gpio: arduino_header
i2c: arduino_i2c
spi: arduino_spi
uart: arduino_serial
adc: arduino_adc
design_guideline: |
The GPIO pin references for the Uno format are a bit odd. The `&arduino_header` label is used, but the numbering
starts at the `A0` pin and increments as you go counter clockwise around the board. That means the `D6` pin
can be referenced by `&arduino_header 12` in your overlay files.

View file

@ -0,0 +1,15 @@
file_format: "1"
id: blackpill
name: BlackPill
type: interconnect
url: https://github.com/WeActStudio/WeActStudio.MiniSTM32F4x1
manufacturer: WeAct Studio
description: |
The WeAct Studio BlackPill has grown in popularity due to its low price, availability, and utilization of the powerful STM32F4x1CEU6 microcontroller. The BlackPill features more GPIO than most other boards, but also has a comparatively larger footprint as a result. Many clones and variations of the original BlackPill are available on the market as an affordable and more powerful alternative to many popular boards. The official WeAct variations of the WeAct Studio BlackPill are powered by the STM32F411CEU6 and STM32F401CEU6 microcontrollers.
node_labels:
gpio: blackpill
i2c: blackpill_i2c
spi: blackpill_spi
uart: blackpill_serial
design_guideline: |
ZMK uses the blue color coded pin names to generate devicetree node references. For example, to refer to the pin labeled `17` in the diagram, use `&blackpill 17` in the devicetree files.

View file

@ -12,3 +12,10 @@ description: |
Note: ZMK doesn't support boards with AVR 8-bit processors, such as the ATmega32U4, because Zephyr™ only
supports 32-bit and 64-bit platforms. As a result, controllers like the SparkFun Pro Micro and the Elite-C
are *not* supported by ZMK.
node_labels:
gpio: pro_micro
i2c: pro_micro_i2c
spi: pro_micro_spi
uart: pro_micro_serial
design_guideline: |
ZMK uses the blue color coded "Arduino" pin names to generate devicetree node references. For example, to refer to the pin labeled `0` in the diagram, use `&pro_micro 0` in the devicetree files.

View file

@ -8,3 +8,10 @@ description: |
The Seeed(uino) XIAO is a popular smaller format micro-controller, that has gained popularity as an alterative
to the SparkFun Pro Micro. Since its creation, several pin compatible controllers, such
as the Seeeduino XIAO BLE, Adafruit QT Py and Adafruit QT Py RP2040, have become available.
node_labels:
gpio: xiao_d
i2c: xiao_i2c
spi: xiao_spi
uart: xiao_serial
design_guideline: |
ZMK uses the "D"-prefixed, green color coded pin names, e.g. `D2`, to generate devicetree node references. For example, to refer to the pin labeled `D0` in the diagram, use `&xiao_d 0` in the devicetree files.

View file

@ -0,0 +1,12 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
CONFIG_ZMK_USB=y
CONFIG_ZMK_BLE=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_NVS=y
CONFIG_SETTINGS_NVS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y

View file

@ -0,0 +1,16 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
CONFIG_ZMK_USB=y
CONFIG_ZMK_BLE=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_NVS=y
CONFIG_SETTINGS_NVS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
# Default main and BLE stack sizes are too small for HCI RPMsg
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_ZMK_BLE_THREAD_STACK_SIZE=1024

View file

@ -0,0 +1,10 @@
/*
* Copyright (c) 2022 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
&arduino_i2c {
// Default buffer size is too small for use with displays.
zephyr,concat-buf-size = <512>;
};

View file

@ -1,102 +1,104 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
// Copyright (c) 2022 The ZMK Contributors
// SPDX-License-Identifier: MIT
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
// Home row mods macro
#define HRML(k1,k2,k3,k4) &ht LSHFT k1 &ht LALT k2 &ht LCTRL k3 &ht LGUI k4
#define HRMR(k1,k2,k3,k4) &ht RGUI k1 &ht RCTRL k2 &ht RALT k3 &ht RSHFT k4
&mt {
// flavor = "tap-preferred";
// tapping_term_ms = <200>;
};
/ {
combos {
compatible = "zmk,combos";
combo_esc {
timeout-ms = <50>;
key-positions = <0 1>;
bindings = <&kp ESC>;
/ {
behaviors {
ht: hold_tap {
label = "hold_tap";
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
flavor = "tap-preferred";
tapping-term-ms = <220>;
quick-tap-ms = <150>;
global-quick-tap;
bindings = <&kp>, <&kp>;
};
combo_tab {
timeout-ms = <50>;
key-positions = <10 11>;
bindings = <&kp TAB>;
};
combo_ralt {
timeout-ms = <50>;
key-positions = <17 16>;
bindings = <&kp RALT>;
};
combo_lalt {
timeout-ms = <50>;
key-positions = <11 12>;
bindings = <&kp LALT>;
};
combo_lgui {
timeout-ms = <50>;
key-positions = <12 13>;
bindings = <&kp LGUI>;
};
combo_rgui {
timeout-ms = <50>;
key-positions = <17 18>;
bindings = <&kp RGUI>;
};
};
keymap {
compatible = "zmk,keymap";
default_layer {
bindings = <
&kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P
&kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp QUOT
&mt LSFT Z &kp X &kp C &kp V &kp B &kp N &kp M &kp CMMA &kp DOT &mt LSFT RET
&mo 1 &kp LCTL &kp SPC &mo 2
>;
};
conditional_layers {
compatible = "zmk,conditional-layers";
tri_layer {
if-layers = <1 2>;
then-layer = <3>;
};
};
left_layer {
bindings = <
&kp NUM_1 &kp NUM_2 &kp NUM_3 &kp NUM_4 &kp NUM_5 &kp NUM_6 &kp NUM_7 &kp NUM_8 &kp NUM_9 &kp NUM_0
&kp TAB &kp LC(S) &kp DQT &kp PIPE2 &kp HASH &kp MINUS &kp EQL &kp LBKT &kp RBKT &kp DEL
&kp ESC &kp TILDE &kp NON_US_BSLH &kp NON_US_HASH &kp TILDE2 &kp MINUS &kp GRAVE &kp LBKT &kp RBKT &kp DEL
&mo 1 &kp LGUI &kp RGUI &mo 2
>;
};
right_layer {
bindings = <
&kp BANG &kp ATSN &kp HASH &kp DLLR &kp PRCT &kp CRRT &kp AMPS &kp KMLT &kp LPRN &kp RPRN
&kp HASH &kp QMARK &kp FSLH &kp COLN &kp SCLN &kp MINUS &kp KP_EQUAL &kp LBRC &kp RBRC &kp BKSP
&kp LSFT &kp KPLS &kp LBKT &kp RBKT &kp BSLH &kp UNDER &kp LEFT &kp DOWN &kp UP &kp RIGHT
&mo 3 &kp LCTL &kp SPC &mo 2
>;
};
tri_layer {
bindings = <
&kp NUM_1 &kp NUM_2 &kp NUM_3 &kp NUM_4 &kp NUM_5 &trans &trans &trans &trans &trans
&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &trans &kp PG_UP &kp K_VOL_UP &kp K_MUTE &trans
&bt BT_CLR &bt BT_NXT &bt BT_PRV &kp F6 &kp F7 &trans &kp PG_DN &kp K_VOL_DN &trans &trans
&trans &trans &trans &trans
>;
};
};
keymap {
compatible = "zmk,keymap";
default_layer {
bindings = <
//╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮
//│ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │
&kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
//│ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ ' " │
HRML(A, S, D, F) &kp G &kp H HRMR(J, K, L, SQT)
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
//│ Z │ X │ C │ V │ B │ │ N │ M │ , < │ . > │ / ? │
&kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH
//╰──────────┴──────────┴──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┴──────────┴──────────╯
&lt 2 TAB &kp ENTER &kp SPACE &lt 1 BSPC
// ╰──────────┴──────────╯ ╰──────────┴──────────╯
>;
};
right_layer {
bindings = <
//╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮
//│ INSERT │ 1 │ 2 │ 3 │ │ │ HOME │ PAGE DN │ PAGE UP │ END │ : │
&kp INS &kp N1 &kp N2 &kp N3 &trans &kp HOME &kp PG_DN &kp PG_UP &kp END &kp COLON
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
//│ DELETE │ 4 │ 5 │ 6 │ │ │ LEFT │ DOWN │ UP │ RIGHT │ ; │
&kp DEL &kp N4 &kp N5 &kp N6 &trans &kp LARW &kp DARW &kp UARW &kp RARW &kp SEMI
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
//│ CAPS │ 7 │ 8 │ 9 │ 0 │ │ │ │ │ │ │
&caps_word &kp N7 &kp N8 &kp N9 &kp N0 &trans &trans &trans &trans &trans
//╰──────────┴──────────┴──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┴──────────┴──────────╯
&trans &kp ESC &trans &trans
// ╰──────────┴──────────╯ ╰──────────┴──────────╯
>;
};
left_layer {
bindings = <
//╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮
//│ │ [ │ { │ } │ │ │ ^ │ ( │ ) │ ] │ ~ │
&trans &kp LBKT &kp LBRC &kp RBRC &trans &kp CARET &kp LPAR &kp RPAR &kp RBKT &kp TILDE
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
//│ ! │ @ │ # │ $ │ % │ │ * │ - │ = │ \ │ ` │
&kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp ASTRK &kp MINUS &kp EQUAL &kp BSLH &kp GRAVE
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
//│ │ │ │ │ │ │ & │ _ │ + │ │ │ │
&trans &trans &trans &trans &trans &kp AMPS &kp UNDER &kp PLUS &kp PIPE &trans
//╰──────────┴──────────┴──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┴──────────┴──────────╯
&trans &trans &trans &trans
// ╰──────────┴──────────╯ ╰──────────┴──────────╯
>;
};
tri_layer {
bindings = <
//╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮
//│ RESET │ │ │ │PROFILE 0 │ │ │ │ │ │ RESET │
&reset &trans &trans &trans &bt BT_SEL 0 &trans &trans &trans &trans &reset
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
//│BOOTLOADER│ │ │ │PROFILE 1 │ │ │ │ │ │BOOTLOADER│
&bootloader &trans &trans &trans &bt BT_SEL 1 &trans &trans &trans &trans &bootloader
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
//│ │ │ │ CLEAR BT │PROFILE 2 │ │ │ │ │ │ │
&trans &trans &trans &bt BT_CLR &bt BT_SEL 2 &trans &trans &trans &trans &trans
//╰──────────┴──────────┴──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┴──────────┴──────────╯
&trans &trans &trans &trans
// ╰──────────┴──────────╯ ╰──────────┴──────────╯
>;
};
};
};

View file

@ -0,0 +1,9 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
if SHIELD_REVIUNG5
config ZMK_KEYBOARD_NAME
default "Reviung5"
endif

View file

@ -0,0 +1,4 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
config SHIELD_REVIUNG5
def_bool $(shields_list_contains,reviung5)

View file

@ -0,0 +1,3 @@
# Encoder support. Uncomment to enable.
# CONFIG_EC11=y
# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y

View file

@ -0,0 +1,38 @@
/*
* Copyright (c) 2022 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 BASE 0
#define BLE 1
/ {
keymap {
compatible = "zmk,keymap";
base_layer {
label = "BASE";
bindings = <
// ╭─────────────┬──────────────┬──────────────────┬─────────────┬─────────────╮
&mo BLE &kp C_PREVIOUS &kp C_PLAY_PAUSE &kp C_NEXT &kp C_MUTE
// ╰─────────────┴──────────────┴──────────────────┴─────────────┴─────────────╯
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
ble_layer {
label = "BLE";
bindings = <
// ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮
&trans &out OUT_TOG &bt BT_PRV &bt BT_NXT &bt BT_CLR
// ╰─────────────┴─────────────┴─────────────┴─────────────┴─────────────╯
>;
};
};
};

View file

@ -0,0 +1,54 @@
/*
* Copyright (c) 2022 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 = <5>;
rows = <1>;
map = <RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4)>;
};
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>
, <&pro_micro 8 GPIO_ACTIVE_HIGH>
;
row-gpios
= <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;
};
encoder: encoder {
compatible = "alps,ec11";
label = "encoder";
a-gpios = <&pro_micro 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&pro_micro 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
resolution = <4>;
status = "okay";
};
sensors {
compatible = "zmk,keymap-sensors";
sensors = <&encoder>;
};
};

View file

@ -0,0 +1,9 @@
file_format: "1"
id: reviung5
name: REVIUNG5
type: shield
url: https://github.com/gtips/reviung/tree/master/reviung5
requires: [pro_micro]
features:
- keys
- encoder

View file

@ -40,7 +40,7 @@
};
&default_transform {
col-offset = <5>;
col-offset = <6>;
};
&five_column_transform {

View file

@ -0,0 +1,23 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
if SHIELD_ZMK_UNO
config ZMK_KEYBOARD_NAME
default "ZMK Uno"
config ZMK_BACKLIGHT
select LED
select LED_GPIO
config SHIELD_SSD1306_128X64
select ZMK_DISPLAY
config SHIELD_SSD1306_128X32
select ZMK_DISPLAY
config ZMK_RGB_UNDERGLOW
select WS2812_STRIP
select SPI
endif

View file

@ -0,0 +1,5 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
config SHIELD_ZMK_UNO
def_bool $(shields_list_contains,zmk_uno)

Some files were not shown because too many files have changed in this diff Show more