feat(boards): Add Corne-ish zen v2

Co-authored-by: Pete Johanson <peter@peterjohanson.com>
This commit is contained in:
Darryldh 2022-12-16 11:57:25 -05:00 committed by GitHub
parent 984b16e03b
commit 4a3e783f32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
56 changed files with 2611 additions and 10 deletions

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,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);

17
app/package-lock.json generated
View file

@ -9,27 +9,30 @@
"version": "1.0.0",
"license": "MIT",
"devDependencies": {
"prettier": "^2.4.0"
"prettier": "^2.7.1"
}
},
"node_modules/prettier": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.4.0.tgz",
"integrity": "sha512-DsEPLY1dE5HF3BxCRBmD4uYZ+5DCbvatnolqTqcxEgKVZnL2kUfyu7b8pPQ5+hTBkdhU9SLUmK0/pHb07RE4WQ==",
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz",
"integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==",
"dev": true,
"bin": {
"prettier": "bin-prettier.js"
},
"engines": {
"node": ">=10.13.0"
},
"funding": {
"url": "https://github.com/prettier/prettier?sponsor=1"
}
}
},
"dependencies": {
"prettier": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.4.0.tgz",
"integrity": "sha512-DsEPLY1dE5HF3BxCRBmD4uYZ+5DCbvatnolqTqcxEgKVZnL2kUfyu7b8pPQ5+hTBkdhU9SLUmK0/pHb07RE4WQ==",
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz",
"integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==",
"dev": true
}
}

View file

@ -13,7 +13,6 @@ if ZMK_DISPLAY
config ZMK_DISPLAY_BLANK_ON_IDLE
bool "Blank display on idle"
default y
choice LVGL_TXT_ENC
default LVGL_TXT_ENC_UTF8

View file

@ -73,6 +73,8 @@ static void start_display_updates() {
k_timer_start(&display_timer, K_MSEC(TICK_MS), K_MSEC(TICK_MS));
}
#if IS_ENABLED(CONFIG_ZMK_DISPLAY_BLANK_ON_IDLE)
static void stop_display_updates() {
if (display == NULL) {
return;
@ -83,6 +85,8 @@ static void stop_display_updates() {
k_timer_stop(&display_timer);
}
#endif
int zmk_display_is_initialized() { return initialized; }
void initialize_display(struct k_work *work) {
@ -94,6 +98,8 @@ void initialize_display(struct k_work *work) {
return;
}
initialized = true;
screen = zmk_display_status_screen();
if (screen == NULL) {
@ -104,8 +110,6 @@ void initialize_display(struct k_work *work) {
lv_scr_load(screen);
start_display_updates();
initialized = true;
}
K_WORK_DEFINE(init_work, initialize_display);