diff --git a/app/boards/arm/corne-ish_zen/CMakeLists.txt b/app/boards/arm/corne-ish_zen/CMakeLists.txt new file mode 100644 index 00000000..e4348d4d --- /dev/null +++ b/app/boards/arm/corne-ish_zen/CMakeLists.txt @@ -0,0 +1,59 @@ +set_property(GLOBAL APPEND PROPERTY extra_post_build_commands + COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/../tools/uf2/utils/uf2conv.py + -c + -b 0x26000 + -f 0xADA52840 + -o ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.uf2 + ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.bin +) + +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_ZMK_WIDGET_WPM_STATUS app PRIVATE wpm_status.c) + + add_subdirectory_ifdef(CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM widgets/icons) +endif() + +zephyr_library() + +# zephyr_library_sources(corne-ish_zen.c) +if(CONFIG_ZMK_DISPLAY) + 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) + zephyr_library_sources(widgets/icons/zenlogo.c) + 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) + zephyr_library_sources(widgets/icons/USB_connected.c) + zephyr_library_sources(widgets/icons/layers.c) + zephyr_library_sources(widgets/icons/layers2.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) +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) \ No newline at end of file diff --git a/app/boards/arm/corne-ish_zen/Kconfig.board b/app/boards/arm/corne-ish_zen/Kconfig.board index 4a935e26..19aff16b 100644 --- a/app/boards/arm/corne-ish_zen/Kconfig.board +++ b/app/boards/arm/corne-ish_zen/Kconfig.board @@ -4,9 +4,9 @@ # config BOARD_CORNEISH_ZEN_V2_LEFT - bool "corneish_zen_left" + bool "corne-ish zen left v2" depends on SOC_NRF52840_QIAA config BOARD_CORNEISH_ZEN_V2_RIGHT - bool "corneish_zen_right" + bool "corne-ish zen right v2" depends on SOC_NRF52840_QIAA \ No newline at end of file diff --git a/app/boards/arm/corne-ish_zen/Kconfig.defconfig b/app/boards/arm/corne-ish_zen/Kconfig.defconfig index 6bf954c7..5e7e7a68 100644 --- a/app/boards/arm/corne-ish_zen/Kconfig.defconfig +++ b/app/boards/arm/corne-ish_zen/Kconfig.defconfig @@ -35,16 +35,16 @@ config ZMK_SPLIT # default y # depends on I2C -menuconfig SENSOR - bool "Sensor Drivers" +#menuconfig SENSOR +# bool "Sensor Drivers" #config BQ274XX # bool "BQ274xx Fuel Gauge" # depends on I2C && SENSOR -config SENSOR_CAN_FETCH_ALL - bool "Can the fuel gauge fetch all channels at once" - default y +#config SENSOR_CAN_FETCH_ALL +# bool "Can the fuel gauge fetch all channels at once" +# default y config SPI bool @@ -90,6 +90,11 @@ config IL0323 bool default y +config LVGL_DISPLAY_DEV_NAME + string + default "DISPLAY" + depends on LVGL + #config DISPLAY_WOB # bool "White on Black Display" # default n diff --git a/app/boards/arm/corne-ish_zen/corne-ish_zen.dtsi b/app/boards/arm/corne-ish_zen/corne-ish_zen.dtsi index e69de29b..285a89e8 100644 --- a/app/boards/arm/corne-ish_zen/corne-ish_zen.dtsi +++ b/app/boards/arm/corne-ish_zen/corne-ish_zen.dtsi @@ -0,0 +1,158 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +/dts-v1/; +#include + +#include + +/ { + model = "corne-ish_zen_v2"; + compatible = "corne-ish_zen_v2"; + + chosen { + zephyr,code-partition = &code_partition; + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + 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"; + }; +}; + +&uart0 { + compatible = "nordic,nrf-uarte"; + status = "okay"; + current-speed = <115200>; + tx-pin = <39>; + rx-pin = <44>; + rts-pin = <34>; + cts-pin = <9>; +}; + +/* &clk_hsi { + status = "okay"; +}; + +&pll { + prediv = <1>; + mul = <12>; + clocks = <&clk_hsi>; + status = "okay"; +}; + +&rcc { + clocks = <&pll>; + clock-frequency = ; + ahb-prescaler = <1>; + apb1-prescaler = <2>; +}; */ + + + + +&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>; + }; + }; +}; \ No newline at end of file diff --git a/app/boards/arm/corne-ish_zen/corne-ish_zen.keymap b/app/boards/arm/corne-ish_zen/corne-ish_zen.keymap new file mode 100644 index 00000000..c2159b81 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/corne-ish_zen.keymap @@ -0,0 +1,60 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include +#include +#include + +/ { + 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 + >; + }; + }; +}; \ No newline at end of file diff --git a/app/boards/arm/corne-ish_zen/corne-ish_zen_v2.yaml b/app/boards/arm/corne-ish_zen/corne-ish_zen_v2.yaml new file mode 100644 index 00000000..9beb48a8 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/corne-ish_zen_v2.yaml @@ -0,0 +1,20 @@ +identifier: corne-ish_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 \ No newline at end of file diff --git a/app/boards/arm/corne-ish_zen/corne-ish_zen_v2_left.dts b/app/boards/arm/corne-ish_zen/corne-ish_zen_v2_left.dts new file mode 100644 index 00000000..67ac4eb2 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/corne-ish_zen_v2_left.dts @@ -0,0 +1,96 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include "corne-ish_zen.dtsi" + +/{ + 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"; + }; + }; + + chosen { + zmk,battery = &vbatt; + }; + + vbatt: vbatt { + compatible = "zmk,battery-voltage-divider"; + label = "BATTERY"; + io-channels = <&adc 2>; + output-ohms = <2000000>; + full-ohms = <(2000000 + 806000)>; + }; + +}; + +/* &i2c0 { + status = "okay"; + compatible = "nordic,nrf-twim"; + sda-pin = <6>; + scl-pin = <26>; + clock-frequency = <100000>; + + fuelgauge: bq27xx@55 { + compatible = "ti,bq274xx"; + label = "BATTERY"; + reg = <0x55>; + design-voltage = <3700>; //Battery Design Volatge in mV + design-capacity = <180>; //Battery Design Capacity in mAh + taper-current = <2>; //Battery Taper current in mAh + terminate-voltage = <2750>; //Battery Terminate Voltage in mV + }; +}; */ + +&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]; + //softstart = [17 17 17 17]; + cdi = <0xd2>; + tcon = <0x22>; + }; +}; \ No newline at end of file diff --git a/app/boards/arm/corne-ish_zen/corne-ish_zen_v2_left.keymap b/app/boards/arm/corne-ish_zen/corne-ish_zen_v2_left.keymap new file mode 100644 index 00000000..6b8798c2 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/corne-ish_zen_v2_left.keymap @@ -0,0 +1,8 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include "corne-ish_zen.keymap" \ No newline at end of file diff --git a/app/boards/arm/corne-ish_zen/corne-ish_zen_v2_left_defconfig b/app/boards/arm/corne-ish_zen/corne-ish_zen_v2_left_defconfig new file mode 100644 index 00000000..4b19485f --- /dev/null +++ b/app/boards/arm/corne-ish_zen/corne-ish_zen_v2_left_defconfig @@ -0,0 +1,111 @@ +# +# Copyright (c) 2021 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_SPLIT_BLE_ROLE_CENTRAL=y +CONFIG_ZMK_SLEEP=y +CONFIG_BUILD_OUTPUT_UF2=y + +# Enable MPU +CONFIG_ARM_MPU=y + +# enable GPIO +CONFIG_GPIO=y + +# Enable I2C +#CONFIG_I2C=y +#CONFIG_I2C_NRFX=y +#CONFIG_I2C_0=y + +# Enable SPI +CONFIG_SPI=y +#CONFIG_SPI_2=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 TI BQ27421 Fuel Gauge +CONFIG_SENSOR=y +#CONFIG_BQ274XX=y +#CONFIG_SENSOR_CAN_FETCH_ALL=n + +# enable display drivers +CONFIG_ZMK_DISPLAY=y +CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y +CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048 +CONFIG_SSD1306=n +CONFIG_IL0323=y +#CONFIG_LVGL_DISPLAY_DEV_NAME=DISPLAY +CONFIG_LVGL_HOR_RES_MAX=80 +CONFIG_LVGL_VER_RES_MAX=128 +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=y +#CONFIG_CUSTOM_WIDGET_BATTERY_STATUS=y +CONFIG_ZMK_WIDGET_BATTERY_STATUS=y +#CONFIG_CUSTOM_WIDGET_OUTPUT_STATUS=y +CONFIG_ZMK_WIDGET_OUTPUT_STATUS=y +#CONFIG_CUSTOM_WIDGET_LAYER_STATUS=y +CONFIG_ZMK_WIDGET_LAYER_STATUS=y + +# 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_ZMK_USB=y +CONFIG_USB_DEVICE_STACK=y +CONFIG_USB_CDC_ACM=y +CONFIG_USB_CDC_ACM_RINGBUF_SIZE=1024 +#CONFIG_USB_CDC_ACM_DEVICE_NAME="CDC_ACM" +#CONFIG_USB_CDC_ACM_DEVICE_COUNT=1 + +# Enable serial console +CONFIG_SERIAL=y +CONFIG_CONSOLE=y +CONFIG_UART_INTERRUPT_DRIVEN=y +CONFIG_UART_LINE_CTRL=y + +# Enable USB UART, and set the console device +CONFIG_UART_CONSOLE=y +#CONFIG_USB_UART_CONSOLE=y +#CONFIG_UART_CONSOLE_ON_DEV_NAME="CDC_ACM_0" + diff --git a/app/boards/arm/corne-ish_zen/corne-ish_zen_v2_right.dts b/app/boards/arm/corne-ish_zen/corne-ish_zen_v2_right.dts new file mode 100644 index 00000000..5b3ab468 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/corne-ish_zen_v2_right.dts @@ -0,0 +1,97 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include "corne-ish_zen.dtsi" + +/{ + + + + 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"; + }; + }; + +}; + +&default_transform { + col-offset = <6>; + }; +&five_column_transform { + col-offset = <6>; +}; + +/* &i2c0 { + status = "ok"; + compatible = "nordic,nrf-twim"; + sda-pin = <16>; + scl-pin = <13>; + //clock-frequency = ; + clock-frequency = <100000>; + //gpios = <&gpio1 05 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; + + fuelgauge: bq274xx@55 { + compatible = "ti,bq274xx"; + label = "BATTERY"; + reg = <0x55>; + design-voltage = <3700>; //Battery Design Volatge in mV + design-capacity = <180>; //Battery Design Capacity in mAh + taper-current = <2>; //Battery Taper current in mAh 2.1 + terminate-voltage = <2750>; //Battery Terminate Voltage in mV + }; +}; */ + +&spi2 { + 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>; + }; +}; diff --git a/app/boards/arm/corne-ish_zen/corne-ish_zen_v2_right.keymap b/app/boards/arm/corne-ish_zen/corne-ish_zen_v2_right.keymap new file mode 100644 index 00000000..6b8798c2 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/corne-ish_zen_v2_right.keymap @@ -0,0 +1,8 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include "corne-ish_zen.keymap" \ No newline at end of file diff --git a/app/boards/arm/corne-ish_zen/corne-ish_zen_v2_right_defconfig b/app/boards/arm/corne-ish_zen/corne-ish_zen_v2_right_defconfig new file mode 100644 index 00000000..22ebcd9f --- /dev/null +++ b/app/boards/arm/corne-ish_zen/corne-ish_zen_v2_right_defconfig @@ -0,0 +1,104 @@ +# +# Copyright (c) 2021 Darryl deHaan +# SPDX-License-Identifier: MIT +# + +CONFIG_SOC_SERIES_NRF52X=y +CONFIG_SOC_NRF52840_QIAA=y +#CONFIG_SOC_DCDC_NRF52X=y +CONFIG_BOARD_CORNEISH_ZEN_V2_RIGHT=y +#CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y +CONFIG_ZMK_SLEEP=y +CONFIG_ZMK_DISPLAY=y + +# Enable MPU +CONFIG_ARM_MPU=y + +# enable GPIO +CONFIG_GPIO=y + +# Enable I2C +CONFIG_I2C=y +CONFIG_I2C_NRFX=y +CONFIG_I2C_0=y + +# Enable SPI +CONFIG_SPI=y +CONFIG_SPI_2=y +CONFIG_SPI_NRFX=y + +# Enable writing to flash +CONFIG_USE_DT_CODE_PARTITION=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 TI BQ27421 Fuel Gauge +#CONFIG_SENSOR=y +#CONFIG_BQ274XX=y +#CONFIG_SENSOR_CAN_FETCH_ALL=n + +# 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_HOR_RES_MAX=80 +CONFIG_LVGL_VER_RES_MAX=128 +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_CUSTOM_WIDGET_BATTERY_STATUS=y +CONFIG_ZMK_WIDGET_BATTERY_STATUS=n +CONFIG_CUSTOM_WIDGET_OUTPUT_STATUS=y +CONFIG_ZMK_WIDGET_OUTPUT_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=10000 +#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 + +# Turn on USB CDC ACM device +CONFIG_USB=y +CONFIG_USB_DEVICE_STACK=y +CONFIG_USB_CDC_ACM=y +CONFIG_USB_CDC_ACM_RINGBUF_SIZE=1024 +CONFIG_USB_CDC_ACM_DEVICE_NAME="CDC_ACM" +CONFIG_USB_CDC_ACM_DEVICE_COUNT=1 + +# Enable serial console +CONFIG_SERIAL=y +CONFIG_CONSOLE=y +CONFIG_UART_INTERRUPT_DRIVEN=y +CONFIG_UART_LINE_CTRL=y + +# Enable USB UART, and set the console device +CONFIG_UART_CONSOLE=y +CONFIG_USB_UART_CONSOLE=y +CONFIG_UART_CONSOLE_ON_DEV_NAME="CDC_ACM_0" \ No newline at end of file diff --git a/app/boards/arm/corne-ish_zen/custom_status_screen.c b/app/boards/arm/corne-ish_zen/custom_status_screen.c new file mode 100644 index 00000000..cd28739e --- /dev/null +++ b/app/boards/arm/corne-ish_zen/custom_status_screen.c @@ -0,0 +1,76 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include "widgets/battery_status.h" +/*#include "widgets/output_status.h"*/ +#include "widgets/layer_status.h" +#include "custom_status_screen.h" + +#include +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_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_LAYER_STATUS) + //lv_style_set_pad_inner(&layerstyle, LV_STATE_DEFAULT, 12); + //lv_obj_add_style(&layer_status_widget, LV_WIDGET_PART_MAIN, &layerstyle); + zmk_widget_layer_status_init(&layer_status_widget, screen); + lv_obj_align(zmk_widget_layer_status_obj(&layer_status_widget), NULL, LV_ALIGN_IN_BOTTOM_MID, 0, + -5); +#endif + +#if CONFIG_BOARD_CORNEISH_ZEN_RIGHT + 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 + +#if CONFIG_BOARD_CORNEISH_ZEN_LEFT + 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 + + //lv_task_handler(); + lv_refr_now(NULL); + //display_blanking_off(display_dev); + + return screen; +} \ No newline at end of file diff --git a/app/boards/arm/corne-ish_zen/custom_status_screen.h b/app/boards/arm/corne-ish_zen/custom_status_screen.h new file mode 100644 index 00000000..dc203fd1 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/custom_status_screen.h @@ -0,0 +1,10 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#pragma once + +#include \ No newline at end of file diff --git a/app/boards/arm/corne-ish_zen/widgets/CMakeLists.txt b/app/boards/arm/corne-ish_zen/widgets/CMakeLists.txt new file mode 100644 index 00000000..bae0eccd --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/CMakeLists.txt @@ -0,0 +1,7 @@ +# +# Copyright (c) 2021 Darryl deHaan +# SPDX-License-Identifier: MIT +# + +# add_subdirectory_ifdef(CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM fonts/) +# add_subdirectory_ifdef(CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM icons/) \ No newline at end of file diff --git a/app/boards/arm/corne-ish_zen/widgets/battery_status.c b/app/boards/arm/corne-ish_zen/widgets/battery_status.c new file mode 100644 index 00000000..e74d4509 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/battery_status.c @@ -0,0 +1,165 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include +#include + +#include +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +#include +#include "battery_status.h" +#include +#include +#include +#include +#include + +static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets); +static lv_style_t label_style; + +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 bool style_initialized = false; + +void battery_status_init() { + + if (style_initialized) { + return; + } + + style_initialized = true; + lv_style_init(&label_style); + lv_style_set_text_font(&label_style, LV_STATE_DEFAULT, &lv_font_montserrat_26); + lv_style_set_text_letter_space(&label_style, LV_STATE_DEFAULT, 1); + lv_style_set_text_line_space(&label_style, LV_STATE_DEFAULT, 1); + lv_style_set_text_color(&label_style, LV_STATE_DEFAULT, LV_COLOR_BLACK); + lv_style_set_bg_color(&label_style, LV_STATE_DEFAULT, LV_COLOR_WHITE); + + //lv_obj_t * batt_full_chg_icon = lv_img_create(lv_scr_act(), NULL); + //lv_img_set_src(batt_full_chg_icon, &batt_full_chg); +} + +K_MUTEX_DEFINE(battery_status_mutex); + +struct { + uint8_t level; +#if IS_ENABLED(CONFIG_USB) + bool usb_present; +#endif +} battery_status_state; + +void set_battery_symbol(lv_obj_t *icon) { + + k_mutex_lock(&battery_status_mutex, K_FOREVER); + + uint8_t level = battery_status_state.level; + +#if IS_ENABLED(CONFIG_USB) + if (level > 95) { + if (battery_status_state.usb_present) { + lv_img_set_src(icon, &batt_100_chg); + }else{ + lv_img_set_src(icon, &batt_100); + } + } else if (level > 74) { + if (battery_status_state.usb_present) { + lv_img_set_src(icon, &batt_75_chg); + }else{ + lv_img_set_src(icon, &batt_75); + } + } else if (level > 49) { + if (battery_status_state.usb_present) { + lv_img_set_src(icon, &batt_50_chg); + }else{ + lv_img_set_src(icon, &batt_50); + } + } else if (level > 24) { + if (battery_status_state.usb_present) { + lv_img_set_src(icon, &batt_25_chg); + }else{ + lv_img_set_src(icon, &batt_25); + } + } else if (level > 5) { + if (battery_status_state.usb_present) { + lv_img_set_src(icon, &batt_5_chg); + }else{ + lv_img_set_src(icon, &batt_5); + } + } else { + if (battery_status_state.usb_present) { + lv_img_set_src(icon, &batt_0_chg); + }else{ + lv_img_set_src(icon, &batt_0); + } + } + //lv_label_set_text(label, text); + //lv_img_set_src(icon, ); + +#endif /* IS_ENABLED(CONFIG_USB) */ + + k_mutex_unlock(&battery_status_mutex); + +} + +int zmk_widget_battery_status_init(struct zmk_widget_battery_status *widget, lv_obj_t *parent) { + battery_status_init(); + //widget->obj = lv_label_create(parent, NULL); + widget->obj = lv_img_create(parent, NULL); + //widget->obj2 = lv_label_create(parent, NULL); + lv_obj_add_style(widget->obj, LV_LABEL_PART_MAIN, &label_style); + + //lv_obj_set_size(widget->obj, 40, 15); + set_battery_symbol(widget->obj); + + sys_slist_append(&widgets, &widget->node); + + return 0; +} + +lv_obj_t *zmk_widget_battery_status_obj(struct zmk_widget_battery_status *widget) { + return widget->obj; +} + +void battery_status_update_cb(struct k_work *work) { + struct zmk_widget_battery_status *widget; + SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_battery_symbol(widget->obj); } +} + +K_WORK_DEFINE(battery_status_update_work, battery_status_update_cb); + +int battery_status_listener(const zmk_event_t *eh) { + k_mutex_lock(&battery_status_mutex, K_FOREVER); + + battery_status_state.level = bt_bas_get_battery_level(); + +#if IS_ENABLED(CONFIG_USB) + battery_status_state.usb_present = zmk_usb_is_powered(); +#endif /* IS_ENABLED(CONFIG_USB) */ + + k_mutex_unlock(&battery_status_mutex); + + k_work_submit_to_queue(zmk_display_work_q(), &battery_status_update_work); + return ZMK_EV_EVENT_BUBBLE; +} + +ZMK_LISTENER(widget_battery_status, battery_status_listener) +ZMK_SUBSCRIPTION(widget_battery_status, zmk_battery_state_changed); +#if IS_ENABLED(CONFIG_USB) +ZMK_SUBSCRIPTION(widget_battery_status, zmk_usb_conn_state_changed); +#endif /* IS_ENABLED(CONFIG_USB) */ \ No newline at end of file diff --git a/app/boards/arm/corne-ish_zen/widgets/battery_status.h b/app/boards/arm/corne-ish_zen/widgets/battery_status.h new file mode 100644 index 00000000..c2ad4bf4 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/battery_status.h @@ -0,0 +1,20 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#pragma once + +#include + +#include + +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); \ No newline at end of file diff --git a/app/boards/arm/corne-ish_zen/widgets/icons/CMakeLists.txt b/app/boards/arm/corne-ish_zen/widgets/icons/CMakeLists.txt new file mode 100644 index 00000000..19af8ead --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/icons/CMakeLists.txt @@ -0,0 +1,4 @@ +# +# Copyright (c) 2021 Darryl deHaan +# SPDX-License-Identifier: MIT +# \ No newline at end of file diff --git a/app/boards/arm/corne-ish_zen/widgets/icons/USB_connected.c b/app/boards/arm/corne-ish_zen/widgets/icons/USB_connected.c new file mode 100644 index 00000000..8cf0badc --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/icons/USB_connected.c @@ -0,0 +1,63 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include + + +#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, +}; diff --git a/app/boards/arm/corne-ish_zen/widgets/icons/batt_0.c b/app/boards/arm/corne-ish_zen/widgets/icons/batt_0.c new file mode 100644 index 00000000..d061f1d8 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/icons/batt_0.c @@ -0,0 +1,65 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include + + + +#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, +}; + diff --git a/app/boards/arm/corne-ish_zen/widgets/icons/batt_0_chg.c b/app/boards/arm/corne-ish_zen/widgets/icons/batt_0_chg.c new file mode 100644 index 00000000..e05e1524 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/icons/batt_0_chg.c @@ -0,0 +1,64 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include + + +#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, +}; + diff --git a/app/boards/arm/corne-ish_zen/widgets/icons/batt_100.c b/app/boards/arm/corne-ish_zen/widgets/icons/batt_100.c new file mode 100644 index 00000000..915472c3 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/icons/batt_100.c @@ -0,0 +1,64 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include + + +#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, +}; + diff --git a/app/boards/arm/corne-ish_zen/widgets/icons/batt_100_chg.c b/app/boards/arm/corne-ish_zen/widgets/icons/batt_100_chg.c new file mode 100644 index 00000000..9ad05d61 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/icons/batt_100_chg.c @@ -0,0 +1,65 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include + + + +#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, +}; + diff --git a/app/boards/arm/corne-ish_zen/widgets/icons/batt_25.c b/app/boards/arm/corne-ish_zen/widgets/icons/batt_25.c new file mode 100644 index 00000000..1dba62c2 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/icons/batt_25.c @@ -0,0 +1,64 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include + + +#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, +}; + diff --git a/app/boards/arm/corne-ish_zen/widgets/icons/batt_25_chg.c b/app/boards/arm/corne-ish_zen/widgets/icons/batt_25_chg.c new file mode 100644 index 00000000..544e71db --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/icons/batt_25_chg.c @@ -0,0 +1,64 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include + + +#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, +}; + diff --git a/app/boards/arm/corne-ish_zen/widgets/icons/batt_5.c b/app/boards/arm/corne-ish_zen/widgets/icons/batt_5.c new file mode 100644 index 00000000..a8c5ded9 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/icons/batt_5.c @@ -0,0 +1,64 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include + + +#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, +}; + diff --git a/app/boards/arm/corne-ish_zen/widgets/icons/batt_50.c b/app/boards/arm/corne-ish_zen/widgets/icons/batt_50.c new file mode 100644 index 00000000..3c93ae5b --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/icons/batt_50.c @@ -0,0 +1,64 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include + + +#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, +}; + diff --git a/app/boards/arm/corne-ish_zen/widgets/icons/batt_50_chg.c b/app/boards/arm/corne-ish_zen/widgets/icons/batt_50_chg.c new file mode 100644 index 00000000..b21b4e25 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/icons/batt_50_chg.c @@ -0,0 +1,64 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include + + +#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, +}; + diff --git a/app/boards/arm/corne-ish_zen/widgets/icons/batt_5_chg.c b/app/boards/arm/corne-ish_zen/widgets/icons/batt_5_chg.c new file mode 100644 index 00000000..da96fc4d --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/icons/batt_5_chg.c @@ -0,0 +1,64 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include + + +#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, +}; + diff --git a/app/boards/arm/corne-ish_zen/widgets/icons/batt_75.c b/app/boards/arm/corne-ish_zen/widgets/icons/batt_75.c new file mode 100644 index 00000000..cbba208e --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/icons/batt_75.c @@ -0,0 +1,64 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include + + +#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, +}; + diff --git a/app/boards/arm/corne-ish_zen/widgets/icons/batt_75_chg.c b/app/boards/arm/corne-ish_zen/widgets/icons/batt_75_chg.c new file mode 100644 index 00000000..b2c2298d --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/icons/batt_75_chg.c @@ -0,0 +1,64 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include + + +#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, +}; + diff --git a/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_advertising.c b/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_advertising.c new file mode 100644 index 00000000..89809d1f --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_advertising.c @@ -0,0 +1,66 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include + +#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, +}; diff --git a/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_advertising_1.c b/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_advertising_1.c new file mode 100644 index 00000000..9fdc8e55 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_advertising_1.c @@ -0,0 +1,64 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include + +#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, +}; diff --git a/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_advertising_2.c b/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_advertising_2.c new file mode 100644 index 00000000..a0c4345d --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_advertising_2.c @@ -0,0 +1,64 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include + +#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, +}; diff --git a/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_advertising_3.c b/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_advertising_3.c new file mode 100644 index 00000000..3e70f082 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_advertising_3.c @@ -0,0 +1,64 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include + +#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, +}; diff --git a/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_advertising_4.c b/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_advertising_4.c new file mode 100644 index 00000000..3e8441f7 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_advertising_4.c @@ -0,0 +1,64 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include + +#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, +}; diff --git a/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_advertising_5.c b/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_advertising_5.c new file mode 100644 index 00000000..3b24c9d8 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_advertising_5.c @@ -0,0 +1,64 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include + +#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, +}; diff --git a/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_connected_1.c b/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_connected_1.c new file mode 100644 index 00000000..1cb545aa --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_connected_1.c @@ -0,0 +1,64 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include + +#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, +}; diff --git a/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_connected_2.c b/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_connected_2.c new file mode 100644 index 00000000..c5775a61 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_connected_2.c @@ -0,0 +1,64 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include + +#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, +}; diff --git a/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_connected_3.c b/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_connected_3.c new file mode 100644 index 00000000..111b9d32 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_connected_3.c @@ -0,0 +1,64 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include + +#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, +}; diff --git a/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_connected_4.c b/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_connected_4.c new file mode 100644 index 00000000..3b2db361 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_connected_4.c @@ -0,0 +1,64 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include + +#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, +}; diff --git a/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_connected_5.c b/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_connected_5.c new file mode 100644 index 00000000..bab117b8 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_connected_5.c @@ -0,0 +1,64 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include + +#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, +}; diff --git a/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_connected_right.c b/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_connected_right.c new file mode 100644 index 00000000..1e637bdf --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_connected_right.c @@ -0,0 +1,69 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include + + + +#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, +}; + diff --git a/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_disconnected_right.c b/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_disconnected_right.c new file mode 100644 index 00000000..027856e2 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/icons/bluetooth_disconnected_right.c @@ -0,0 +1,68 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include + + +#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, +}; + diff --git a/app/boards/arm/corne-ish_zen/widgets/icons/layers.c b/app/boards/arm/corne-ish_zen/widgets/icons/layers.c new file mode 100644 index 00000000..945b5cc9 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/icons/layers.c @@ -0,0 +1,68 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include + + +#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, +}; + diff --git a/app/boards/arm/corne-ish_zen/widgets/icons/layers2.c b/app/boards/arm/corne-ish_zen/widgets/icons/layers2.c new file mode 100644 index 00000000..5172c073 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/icons/layers2.c @@ -0,0 +1,45 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include + + +#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, +}; + diff --git a/app/boards/arm/corne-ish_zen/widgets/icons/zenlogo.c b/app/boards/arm/corne-ish_zen/widgets/icons/zenlogo.c new file mode 100644 index 00000000..93eefd48 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/icons/zenlogo.c @@ -0,0 +1,71 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include + + +#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, +}; + diff --git a/app/boards/arm/corne-ish_zen/widgets/layer_status.c b/app/boards/arm/corne-ish_zen/widgets/layer_status.c new file mode 100644 index 00000000..92022629 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/layer_status.c @@ -0,0 +1,102 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include +#include +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); +#include +#include "layer_status.h" +#include +#include +#include +#include + +static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets); +static lv_style_t label_style; + +static bool style_initialized = false; + +K_MUTEX_DEFINE(layer_status_mutex); + +struct { + uint8_t index; + const char *label; +} layer_status_state; + +void layer_status_init() { + if (style_initialized) { + return; + } + style_initialized = true; + lv_style_init(&label_style); + lv_style_set_text_color(&label_style, LV_STATE_DEFAULT, LV_COLOR_BLACK); + lv_style_set_text_font(&label_style, LV_STATE_DEFAULT, &lv_font_montserrat_16); + lv_style_set_text_letter_space(&label_style, LV_STATE_DEFAULT, 1); + lv_style_set_text_line_space(&label_style, LV_STATE_DEFAULT, 1); + +} + +void set_layer_symbol(lv_obj_t *label) { + + k_mutex_lock(&layer_status_mutex, K_FOREVER); + const char *layer_label = layer_status_state.label; + uint8_t active_layer_index = layer_status_state.index; + k_mutex_unlock(&layer_status_mutex); + + //LOG_DBG("Layer Label: %s", layer_label); + + 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 update_state() { + k_mutex_lock(&layer_status_mutex, K_FOREVER); + layer_status_state.index = zmk_keymap_highest_layer_active(); + layer_status_state.label = zmk_keymap_layer_label(layer_status_state.index); + LOG_DBG("Layer changed to %i", layer_status_state.index); + + k_mutex_unlock(&layer_status_mutex); +} + +int zmk_widget_layer_status_init(struct zmk_widget_layer_status *widget, lv_obj_t *parent) { + layer_status_init(); + update_state(); + widget->obj = lv_label_create(parent, NULL); + lv_obj_add_style(widget->obj, LV_LABEL_PART_MAIN, &label_style); + set_layer_symbol(widget->obj); + sys_slist_append(&widgets, &widget->node); + + return 0; +} + +lv_obj_t *zmk_widget_layer_status_obj(struct zmk_widget_layer_status *widget) { + return widget->obj; +} + +void layer_status_update_cb(struct k_work *work) { + struct zmk_widget_layer_status *widget; + SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_layer_symbol(widget->obj); } +} + +K_WORK_DEFINE(layer_status_update_work, layer_status_update_cb); + +int layer_status_listener(const zmk_event_t *eh) { + update_state();; + + k_work_submit_to_queue(zmk_display_work_q(), &layer_status_update_work); + return 0; +} + +ZMK_LISTENER(widget_layer_status, layer_status_listener) +ZMK_SUBSCRIPTION(widget_layer_status, zmk_layer_state_changed); \ No newline at end of file diff --git a/app/boards/arm/corne-ish_zen/widgets/layer_status.h b/app/boards/arm/corne-ish_zen/widgets/layer_status.h new file mode 100644 index 00000000..2616ad22 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/layer_status.h @@ -0,0 +1,20 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#pragma once + +#include +#include + +struct zmk_widget_layer_status { + sys_snode_t node; + lv_obj_t *obj; + //lv_obj_t *obj2; +}; + +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); \ No newline at end of file diff --git a/app/boards/arm/corne-ish_zen/widgets/output_status.c b/app/boards/arm/corne-ish_zen/widgets/output_status.c new file mode 100644 index 00000000..3d8a9b92 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/output_status.c @@ -0,0 +1,190 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include +#include + +#include +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +#include +#include "output_status.h" +#include +#include +#include +#include +#include +#include +#include + +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); +static lv_style_t label_style; + +static bool style_initialized = false; + +K_MUTEX_DEFINE(output_status_mutex); + +struct { + enum zmk_endpoint selected_endpoint; + bool active_profile_connected; + bool active_profile_bonded; + uint8_t active_profile_index; +} output_status_state; + +void output_status_init() { + if (style_initialized) { + return; + } + + style_initialized = true; + lv_style_init(&label_style); + lv_style_set_text_color(&label_style, LV_STATE_DEFAULT, LV_COLOR_BLACK); + lv_style_set_text_font(&label_style, LV_STATE_DEFAULT, &lv_font_montserrat_26); + lv_style_set_text_letter_space(&label_style, LV_STATE_DEFAULT, 1); + lv_style_set_text_line_space(&label_style, LV_STATE_DEFAULT, 1); +} + +void set_status_symbol(lv_obj_t *icon) { + + k_mutex_lock(&output_status_mutex, K_FOREVER); + enum zmk_endpoint selected_endpoint = output_status_state.selected_endpoint; + bool active_profile_connected = output_status_state.active_profile_connected; + bool active_profie_bonded = output_status_state.active_profile_bonded; + uint8_t active_profile_index = output_status_state.active_profile_index; + k_mutex_unlock(&output_status_mutex); + + switch (selected_endpoint) { + case ZMK_ENDPOINT_USB: + lv_img_set_src(icon, &USB_connected); + break; + case ZMK_ENDPOINT_BLE: + if (active_profie_bonded) { + if (active_profile_connected) { + //sprintf(text, LV_SYMBOL_BLUETOOTH "%i " LV_SYMBOL_OK, active_profile_index); + switch (active_profile_index) { + case 0: +#if CONFIG_BOARD_CORNEISH_ZEN_RIGHT + lv_img_set_src(icon, &bluetooth_connected_right); +#else + lv_img_set_src(icon, &bluetooth_connected_1); +#endif + 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 { + //sprintf(text, LV_SYMBOL_BLUETOOTH "%i " LV_SYMBOL_CLOSE, active_profile_index); + lv_img_set_src(icon, &bluetooth_disconnected_right); + } + } else { + //sprintf(text, LV_SYMBOL_BLUETOOTH "%i " LV_SYMBOL_SETTINGS, active_profile_index); + //lv_img_set_src(icon, &bluetooth_advertising); + switch (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; + } + + //lv_label_set_text(label, text); +} + +static void update_state() { + k_mutex_lock(&output_status_mutex, K_FOREVER); + output_status_state.selected_endpoint = zmk_endpoints_selected(); + output_status_state.active_profile_connected = zmk_ble_active_profile_is_connected(); + output_status_state.active_profile_bonded = !zmk_ble_active_profile_is_open(); + output_status_state.active_profile_index = zmk_ble_active_profile_index(); + k_mutex_unlock(&output_status_mutex); +} + +int zmk_widget_output_status_init(struct zmk_widget_output_status *widget, lv_obj_t *parent) { + output_status_init(); + //update_state(); + //widget->obj = lv_label_create(parent, NULL); + widget->obj = lv_img_create(parent, NULL); + + set_status_symbol(widget->obj); + + sys_slist_append(&widgets, &widget->node); + + return 0; +} + +lv_obj_t *zmk_widget_output_status_obj(struct zmk_widget_output_status *widget) { + return widget->obj; +} + +void output_status_update_cb(struct k_work *work) { + struct zmk_widget_output_status *widget; + SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_status_symbol(widget->obj); } +} + +K_WORK_DEFINE(output_status_update_work, output_status_update_cb); + +int output_status_listener(const zmk_event_t *eh) { + + + // Be sure we have widgets initialized before doing any work, + // since the status event can fire before display code inits. + if (!style_initialized) { + return ZMK_EV_EVENT_BUBBLE; + } + + //update_state(); + + k_work_submit_to_queue(zmk_display_work_q(), &output_status_update_work); + return ZMK_EV_EVENT_BUBBLE; +} + +ZMK_LISTENER(widget_output_status, output_status_listener) +ZMK_SUBSCRIPTION(widget_output_status, zmk_endpoint_selection_changed); +#if defined(CONFIG_USB) +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 \ No newline at end of file diff --git a/app/boards/arm/corne-ish_zen/widgets/output_status.h b/app/boards/arm/corne-ish_zen/widgets/output_status.h new file mode 100644 index 00000000..d10018b1 --- /dev/null +++ b/app/boards/arm/corne-ish_zen/widgets/output_status.h @@ -0,0 +1,19 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#pragma once + +#include +#include + +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); \ No newline at end of file