forked from kofal.net/zmk
feat!: Move to zephyr v4.1 (#3060)
refactor: Move to Zephyr v4.1.0 Move to Zephyr v4.1.0, with various build/compilation fixes needed for basic use. refactor(tests): Move to native_sim for tests. feat(core): (Optionally) use Zephyr keyboard input devices Add ability to assign a keyboard `input` device to a physical layout, or use a chosen `zmk,matrix-input`. fix(pointing): Refactor for changes to input API Pass NULL user_data to input callbacks. fix(tests): Fix BLE test to account for Zephyr changes Handle additional read callback invocation once all matching characteristic have been read. fix(sensors): Initialize sensor data to 0 before fetching. Be sure we don't get back any uninitialized data by initializing the channel data to 0 before calling into the sensor API. refactor(input): Adjust split input to input API changes. Input callbacks now have a user_data parameter, adjust accordingly. chore(bluetooth): Minor cleanup of split BT code after refactor Small fixes and remove commented dead code left after the split refactor. refactor: Fix up BLE tests after Zephyr upgrade. Minor changes to snapshots based on newer Zephyr version. refactor(boards): Move to upstream xiao_ble board ID. Move to official upstream board definition for the Seeed XIAO BLE. refactor: Adjust metadata schema for HWMv2 board IDs w/ qualifiers Adjust our ZMK metadata to allow for board IDs that include qualifiers with slash delimeters. refactor!(boards): Move nice!nano to HWMv2, and proper revisioning Upgrade the nice!nano board to HWMv2, under the proper nicekeyboards vendor directory, and with proper revisions. Includes a breaking change to default the `2.0.0` version instead of the much older v1 (`1.0.0`). fix: Disable Nordic dt-bindings header checks. Disable the recently added Nordic dt-bindings header checks, which cause issues for our HID related headers. fix(studio): Correct `memset` usage. Use the correct memset call to clear our RPC memory. fix: Refactor for new Zephyr PM API Adjustments to our PM code to match Zephyr PM APIs. refactor(ble): Use correct BT opt for connectable. Adjust for upstream Zephyr BT API changes for advertising options. refactor(boards): Move MakerDiary M2 board to HWMv2. Run the HWMv2 script to convert the MakerDiary M2 board. fix(studio): Correct usage of thread analyzer API Fix up the RPC code that invoke the thread analyzer API to account for API changes. chore: Remove nanopb module override. Leverage nanopb version that's used by Zephyr. feat(core): mapper for magic bootloader values. To trigger bootloaders that use a magic value in RAM to trigger bootloader mode, add a mapping retained memory driver that maps write/read of boot mode values to a special magic value stored in the actually backing RAM. feat(behaviors): Add retention boot mode to reset. Support new generic Zephyr retention boot mode API in the reset behavior. feat: Add double tap to enter bootloader functionality Add ability to enter the bootloader if double tapping reset within the specified window. refactor(CI): Move to 4.1 container tags. Move to the new 4.1 tagged container, to ensure updated SDK, Python packages, etc. refactor(boards): Move nRFMicro to HWMv2 Refactor nRFMicro to HWMv2, using proper SoC, revisions, and variants (for flipped). Also move to devicetree setup of DCDC/HV DCDC. refactor(boards): Move QMK Proton-C to HWMv2 Move Proton-C to HWMv2 for use with Zephyr 4.1. chore(ci): Adjust core coverage for new board IDs. Use correct board IDs, with qualifiers, for our core coverage testing. refactor(boards): Move BDN9 to HWMv2 Move BDN9 to HWMv2, using the base `bdn9` ID, no longer including the `_rev2` suffix in the ID. refactor(boards): Move nice!60 to HWMv2 Migrate nice!60 to HWMv2. refactor: Adjust how we're searching/loading keymap files Use new post_boards_shields extension point for loading keymap files from board/shield directories. refactor(boards): Move planck rev6 to HWMv2. Move Planck board definition to HWMv2, including versioning tweaks. refactor(boards): Move OLKB Preonic to HWMv2 Move Preonic board definition to HWMv2 and remove `_rev3` variant suffix in favor of board versioning with `3.0.0` as the default. chore(deps): Pull in Zephyr optional group for nanopb. Ensure we enable nanopb by adding +optional group filter. fix(ci): Prevent slash characters in artifact names. Move to HWMv2 means board IDs often include slashes, so replace those with underscores when doing file uploads. fix(usb): Adjust Kconfig settings for USB. * Ensure USB isn't initialized automatically before we do, which can happen if USB CDC logging is used/enabled for a given board. * Adjust USB HID to initialize the USB class/interface before we enable the USB device itself. fix(display): Fix setting the small font for the mono theme. Adjust for modified mono theme init function to pass the small font. chore(ci): Fix changed board IDs for core coverage. Adjust board IDs for our core coverage after move to HWMv2 and board versioning consistently. * planck_rev6 -> planck * bdn9_rev2 -> bdn9 fix(underglow): Remove use of removed Kconfig WS2812 symbol refactor(boards): Move PW CKP boards to HWMv2 Migrate the bt60, bt65, and bt75 to HWMv2. refactor(boards): Move Puchi BLE to HWMv2 Migrate the Puchi BLE to HWMv2. refactor(boards): Migrate Ferris rev02 to HWMv2. Move Ferris rev02 to HMWv2, and remove the revision from the ID. refactor(boards): Move Pillbug to HWMv2 Migrate the MechWild PillBug board to HWMv2. refactor(boards): Migrate s40nc to HWMv2 Move the ShortyFortyNoCordy (s40nc) to HWMv2. refactor(boards): Move bluemicro840 board to HWMv2. Migrate bluemicro840 board to HWMv2, set up boot mode retention. fix(boards): Retore bootloader support on XIAO BLE. Set up necessary boot mode/retention to properly set GPREGRET to trigger Adafruit bootloader to run on the XIAO BLE. refactor(boards): Move Adv360 Pro to HWMv2. Migrate Adv360 Pro left/right to HWMv2. refactor(boards): Move Glove80 to HMWv2 Refactor the MoErgo Glove80 left/right to HWMv2. refactor(boards): Move Mikoto to HMWv2. Migrate Mikoto to HWMv2, with non-exact matching, tweaks to I2C selection to imply it for the 7.2.0 revision for the fuel gauge. refactor(boards): Move kbdfans Tofu65 2.0 to HMWv2 Move Tofu65 2.0 to HMWv2, with ID of just `tofu65`. refactor(boards): Remove dz60rgb board Remove dz60rgb, it's no longer readily available and we have other current stm32 reference designs for testing. refactor(boards): Move Corneish Zen to HMWv2 Move Corneish Zen to HMWv2, with IDs of `corneish_zen_left`/`corneish_zen_right`. refactor(boards): Migrate Corne-ish Zen status screen * refactor(boards): Add boot mode to the nice!nano using common dtsi * Add a new .dtsi for setting up nRF52 boot mode/retained memory settings * Adjust XIAO BLE to use the new include file * Add boot mode to to the nice!nano refactor(boards): Add boot mode support to nice!60 board Enable boot mode for nice!60 board. refactor(boards): Adjust Zephyr board metadata file locations Move the ZMK metadata files for upstream Zephyr boards to align with the HWMv2 directory structure that uses the vendor ID for the parent directory for a board directory. fix: Don't enable ZMK Display by default for a few shields By convention, avoid enabling ZMK Display by default on shields that may be built with under-resourced controllers (e.g. nRF52833 based ones). fix: Remove usage of renamed Kconfig from core coverage. Avoid using WS2812_LED_STRIP, since that Kconfig was renamed/split into SPI/GPIO/I2S symbols. refactor(boards): Adjust XIAO RP2040 override names, bootloader support Adjust the .conf/.overlay files to match the proper naming for the XIAO rp2040 board. Also add the necessary Kconfig/DTS bits for supporting bootloader using retained memory/boot mode retention. fix(display): Adjust stack sizes for display usage. Updated LVGL is bumping our stack size, so adjust the system work queue and dedicated display queue stack sizes as needed to account for this. feat(display): Add thread name to dedicated display queue. When thread names are enabled, pass a name to the dedicated display queue for better tracibility when using the thread analyzer. docs(blog): Add Zephyr upgrade post docs: Add bootloader integration page Add a dedicated page to outline steps to set up bootloader integration using the boot retention mechanism in newer Zephyr versions. fix(display): port nice!view display code * remove `lv_` prefix from old LVGL methods doc: Update local setup docs to use `west packages pip` Install Zephyr deps using the newer `west packages pip --install`. Signed-off-by: Peter Johanson <peter@peterjohanson.com> refactor(split): Adjust BT split code for newer Zephyr APIs. refactor(boards): Adjust upstream RP2040 boards for boot mode retention Add necessary DTS/Kconfig settings to upstream RP2040 boards so they can use the ZMK bootloader functionality using the boot mode retention infrastructure. docs: Update Zephyr docs links to 4.1.0 version. Update all links to the Zephyr docs to the 4.1.0 versions to match our Zephyr version in use. docs: Add a note about using CMake v3 for maximum compatibility. Some optional modules, like libmetal, which is used on nRF5340, specifically require CMake v3, so add a note in the native toolchain setup about this. feat(pointing): Handle INPUT_BTN_TOUCH codes for mouse buttons Translate INPUT_BTN_TOUCH input codes into button 0 press/release for HID layer. chore(pointing): Clean up some warning messages. Properly check return code from queue-ing messages, and fix up some type warnings in our logging calls. * Fix input event codes line numbers fix(studio): Properly serialize GATT RPC indications. fix(core): Set a system work queue stack size of 2048 by default We use a fair amount of stack even without BLE or RP2040, so default to 2048 by default everywhere, and constrained platforms can lowes this if they really need. refactor(core): Move away from deprecated DIS Kconfig symbols Use the correct Device Information Service Kconfig symbols for our model number and manufacturer. refactor: Move upstream Zephyr board overrides to extensions dirs Newer Zephyr supports "board extensions" to formally do what we've added in ourselves via some hacks, so move all our board overlay/config file overrides for upstream Zephyr boards into that correct structure. fix(boards): Add xiao_ble sd_partition label for nosd snippet compat Upstream xiao_ble uses different naming convention for the partition labels, so add an additional label for the SD range, so the existing nrf52840-nosd snippet will still work with the board. fix(core): Don't force CBPRINTF_NANO, for proper formatting. The nano CBPRINTF implementation lacks some padded formatting needed to ensure consistent formatting of BLE addresses, which we use to store keys as strings in a few places, so use the complete CBPRINTF by default now. fix(boards): Remove some references to old nice_nano_v2 board ID. The nice!nano board definition now properly uses versioning, so avoid referring to it with old `nice_nano_v2` board ID. fix(boards): Remove nano overlays for old nice_nano_v2 board ID. With board versioning in place, we can remove the unused `nice_nano_v2.overlay` files from shields. --------- Signed-off-by: Peter Johanson <peter@peterjohanson.com> Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com> Co-authored-by: Nicolas Munnich <munnich@lipn.univ-paris13.fr> Co-authored-by: snoyer <noyer.stephane@gmail.com>
This commit is contained in:
60
app/boards/lowprokb/corneish_zen/CMakeLists.txt
Normal file
60
app/boards/lowprokb/corneish_zen/CMakeLists.txt
Normal file
@@ -0,0 +1,60 @@
|
||||
if(CONFIG_ZMK_DISPLAY)
|
||||
target_sources_ifdef(CONFIG_CUSTOM_WIDGET_BATTERY_STATUS app PRIVATE widgets/battery_status.c)
|
||||
target_sources_ifdef(CONFIG_CUSTOM_WIDGET_OUTPUT_STATUS app PRIVATE widgets/output_status.c)
|
||||
target_sources_ifdef(CONFIG_CUSTOM_WIDGET_LAYER_STATUS app PRIVATE widgets/layer_status.c)
|
||||
target_sources_ifdef(CONFIG_CUSTOM_WIDGET_PERIPHERAL_STATUS app PRIVATE widgets/peripheral_status.c)
|
||||
|
||||
add_subdirectory_ifdef(CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM widgets/icons)
|
||||
endif()
|
||||
|
||||
zephyr_library()
|
||||
|
||||
if(CONFIG_ZMK_DISPLAY)
|
||||
if(CONFIG_CUSTOM_WIDGET_BATTERY_STATUS)
|
||||
zephyr_library_sources(widgets/icons/batt_100.c)
|
||||
zephyr_library_sources(widgets/icons/batt_100_chg.c)
|
||||
zephyr_library_sources(widgets/icons/batt_75.c)
|
||||
zephyr_library_sources(widgets/icons/batt_75_chg.c)
|
||||
zephyr_library_sources(widgets/icons/batt_50.c)
|
||||
zephyr_library_sources(widgets/icons/batt_50_chg.c)
|
||||
zephyr_library_sources(widgets/icons/batt_25.c)
|
||||
zephyr_library_sources(widgets/icons/batt_25_chg.c)
|
||||
zephyr_library_sources(widgets/icons/batt_5.c)
|
||||
zephyr_library_sources(widgets/icons/batt_5_chg.c)
|
||||
zephyr_library_sources(widgets/icons/batt_0.c)
|
||||
zephyr_library_sources(widgets/icons/batt_0_chg.c)
|
||||
endif()
|
||||
if(CONFIG_CUSTOM_WIDGET_PERIPHERAL_STATUS)
|
||||
zephyr_library_sources(widgets/icons/bluetooth_advertising.c)
|
||||
zephyr_library_sources(widgets/icons/bluetooth_connected_right.c)
|
||||
zephyr_library_sources(widgets/icons/bluetooth_disconnected_right.c)
|
||||
endif()
|
||||
if(CONFIG_CUSTOM_WIDGET_OUTPUT_STATUS)
|
||||
zephyr_library_sources(widgets/icons/USB_connected.c)
|
||||
zephyr_library_sources(widgets/icons/bluetooth_connected_1.c)
|
||||
zephyr_library_sources(widgets/icons/bluetooth_connected_2.c)
|
||||
zephyr_library_sources(widgets/icons/bluetooth_connected_3.c)
|
||||
zephyr_library_sources(widgets/icons/bluetooth_connected_4.c)
|
||||
zephyr_library_sources(widgets/icons/bluetooth_connected_5.c)
|
||||
zephyr_library_sources(widgets/icons/bluetooth_advertising_1.c)
|
||||
zephyr_library_sources(widgets/icons/bluetooth_advertising_2.c)
|
||||
zephyr_library_sources(widgets/icons/bluetooth_advertising_3.c)
|
||||
zephyr_library_sources(widgets/icons/bluetooth_advertising_4.c)
|
||||
zephyr_library_sources(widgets/icons/bluetooth_advertising_5.c)
|
||||
zephyr_library_sources(widgets/icons/bluetooth_disconnected_right.c)
|
||||
endif()
|
||||
if(CONFIG_CUSTOM_WIDGET_LAYER_STATUS)
|
||||
zephyr_library_sources(widgets/icons/layers.c)
|
||||
zephyr_library_sources(widgets/icons/layers2.c)
|
||||
endif()
|
||||
if(NOT CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
|
||||
zephyr_library_sources(widgets/icons/zenlogo.c)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
zephyr_library_include_directories(${ZEPHYR_LVGL_MODULE_DIR})
|
||||
zephyr_library_include_directories(${ZEPHYR_BASE}/lib/gui/lvgl/)
|
||||
zephyr_library_sources_ifdef(CONFIG_ZMK_DISPLAY custom_status_screen.c)
|
||||
zephyr_library_sources(${ZEPHYR_BASE}/misc/empty_file.c)
|
||||
zephyr_library_include_directories(${CMAKE_SOURCE_DIR}/include)
|
||||
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
|
||||
10
app/boards/lowprokb/corneish_zen/Kconfig.corneish_zen_left
Normal file
10
app/boards/lowprokb/corneish_zen/Kconfig.corneish_zen_left
Normal file
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# Copyright (c) 2022 Darryl deHaan
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
config BOARD_CORNEISH_ZEN_LEFT
|
||||
select SOC_NRF52840_QIAA
|
||||
imply RETAINED_MEM
|
||||
imply RETENTION
|
||||
imply RETENTION_BOOT_MODE
|
||||
10
app/boards/lowprokb/corneish_zen/Kconfig.corneish_zen_right
Normal file
10
app/boards/lowprokb/corneish_zen/Kconfig.corneish_zen_right
Normal file
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# Copyright (c) 2022 Darryl deHaan
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
config BOARD_CORNEISH_ZEN_RIGHT
|
||||
select SOC_NRF52840_QIAA
|
||||
imply RETAINED_MEM
|
||||
imply RETENTION
|
||||
imply RETENTION_BOOT_MODE
|
||||
81
app/boards/lowprokb/corneish_zen/Kconfig.defconfig
Normal file
81
app/boards/lowprokb/corneish_zen/Kconfig.defconfig
Normal file
@@ -0,0 +1,81 @@
|
||||
#
|
||||
# Copyright (c) 2022 Darryl deHaan
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if BOARD_CORNEISH_ZEN_LEFT
|
||||
|
||||
config ZMK_KEYBOARD_NAME
|
||||
default "Corne-ish Zen"
|
||||
|
||||
config ZMK_SPLIT_ROLE_CENTRAL
|
||||
default y
|
||||
|
||||
endif # BOARD_CORNEISH_ZEN_LEFT
|
||||
|
||||
|
||||
if BOARD_CORNEISH_ZEN_LEFT || BOARD_CORNEISH_ZEN_RIGHT
|
||||
|
||||
config BOARD
|
||||
default "corneish_zen"
|
||||
|
||||
config ZMK_SPLIT
|
||||
default y
|
||||
|
||||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
if USB
|
||||
|
||||
config USB_NRFX
|
||||
default y
|
||||
|
||||
config USB_DEVICE_STACK
|
||||
default y
|
||||
|
||||
endif # USB
|
||||
|
||||
config ZMK_DISPLAY
|
||||
select LV_USE_CONT
|
||||
select LV_FONT_MONTSERRAT_26
|
||||
select LV_FONT_MONTSERRAT_16
|
||||
select LV_USE_LABEL
|
||||
select LV_USE_IMAGE
|
||||
|
||||
choice ZMK_DISPLAY_STATUS_SCREEN
|
||||
default ZMK_DISPLAY_STATUS_SCREEN_CUSTOM
|
||||
endchoice
|
||||
|
||||
if ZMK_DISPLAY
|
||||
|
||||
config SPI
|
||||
default y
|
||||
|
||||
config IL0323
|
||||
default y
|
||||
|
||||
config ZMK_DISPLAY_BLANK_ON_IDLE
|
||||
default n
|
||||
|
||||
# Needed for the IL0323 driver which allocs memory to clear the display
|
||||
config HEAP_MEM_POOL_SIZE
|
||||
default 1024
|
||||
|
||||
config LV_Z_MEM_POOL_SIZE
|
||||
default 4096
|
||||
|
||||
endif # ZMK_DISPLAY
|
||||
|
||||
menuconfig CUSTOM_WIDGET_BATTERY_STATUS
|
||||
bool "custom battery status widget"
|
||||
|
||||
menuconfig CUSTOM_WIDGET_OUTPUT_STATUS
|
||||
bool "custom output status widget"
|
||||
|
||||
menuconfig CUSTOM_WIDGET_LAYER_STATUS
|
||||
bool "custom layer status widget"
|
||||
|
||||
menuconfig CUSTOM_WIDGET_PERIPHERAL_STATUS
|
||||
bool "custom peripheral status widget"
|
||||
|
||||
endif # BOARD_CORNEISH_ZEN_LEFT || BOARD_CORNEISH_ZEN_RIGHT
|
||||
5
app/boards/lowprokb/corneish_zen/board.cmake
Normal file
5
app/boards/lowprokb/corneish_zen/board.cmake
Normal file
@@ -0,0 +1,5 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
|
||||
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
||||
23
app/boards/lowprokb/corneish_zen/board.yml
Normal file
23
app/boards/lowprokb/corneish_zen/board.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
boards:
|
||||
- name: corneish_zen_left
|
||||
vendor: lowprokb
|
||||
socs:
|
||||
- name: nrf52840
|
||||
revision:
|
||||
format: major.minor.patch
|
||||
default: 2.0.0
|
||||
exact: false
|
||||
revisions:
|
||||
- name: 2.0.0
|
||||
- name: 1.0.0
|
||||
- name: corneish_zen_right
|
||||
vendor: lowprokb
|
||||
socs:
|
||||
- name: nrf52840
|
||||
revision:
|
||||
format: major.minor.patch
|
||||
default: 2.0.0
|
||||
exact: false
|
||||
revisions:
|
||||
- name: 2.0.0
|
||||
- name: 1.0.0
|
||||
5
app/boards/lowprokb/corneish_zen/corneish_zen.conf
Normal file
5
app/boards/lowprokb/corneish_zen/corneish_zen.conf
Normal file
@@ -0,0 +1,5 @@
|
||||
# Go to sleep after one hour (1*60*60*1000ms)
|
||||
CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=3600000
|
||||
|
||||
# Turn on logging, and set ZMK logging to debug output
|
||||
# CONFIG_ZMK_USB_LOGGING=y
|
||||
128
app/boards/lowprokb/corneish_zen/corneish_zen.dtsi
Normal file
128
app/boards/lowprokb/corneish_zen/corneish_zen.dtsi
Normal file
@@ -0,0 +1,128 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include <nordic/nrf52840_qiaa.dtsi>
|
||||
#include <common/nordic/nrf52840_uf2_boot_mode.dtsi>
|
||||
|
||||
#include <dt-bindings/zmk/matrix_transform.h>
|
||||
|
||||
#include <layouts/foostan/corne/5column.dtsi>
|
||||
#include <layouts/foostan/corne/6column.dtsi>
|
||||
|
||||
&foostan_corne_6col_layout {
|
||||
transform = <&default_transform>;
|
||||
};
|
||||
|
||||
&foostan_corne_5col_layout {
|
||||
transform = <&five_column_transform>;
|
||||
};
|
||||
|
||||
/ {
|
||||
model = "Corne-ish Zen";
|
||||
compatible = "corneish_zen";
|
||||
|
||||
chosen {
|
||||
zephyr,code-partition = &code_partition;
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,display = &epd;
|
||||
zmk,physical-layout = &foostan_corne_6col_layout;
|
||||
};
|
||||
|
||||
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";
|
||||
};
|
||||
|
||||
zephyr_udc0: &usbd {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&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 {
|
||||
reg = <0x00000000 0x00026000>;
|
||||
};
|
||||
code_partition: partition@26000 {
|
||||
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 {
|
||||
reg = <0x000ec000 0x00008000>;
|
||||
};
|
||||
|
||||
boot_partition: partition@f4000 {
|
||||
reg = <0x000f4000 0x0000c000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
68
app/boards/lowprokb/corneish_zen/corneish_zen.keymap
Normal file
68
app/boards/lowprokb/corneish_zen/corneish_zen.keymap
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <dt-bindings/zmk/bt.h>
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zmk,physical-layout = &foostan_corne_6col_layout;
|
||||
// zmk,physical-layout = &foostan_corne_5col_layout;
|
||||
};
|
||||
};
|
||||
|
||||
/ {
|
||||
keymap {
|
||||
compatible = "zmk,keymap";
|
||||
|
||||
default_layer {
|
||||
display-name = "QWERTY";
|
||||
// --------------------------------------------------------------------------------
|
||||
// | TAB | Q | W | E | R | T | | Y | U | I | O | P | BSPC |
|
||||
// | 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 {
|
||||
display-name = "NUMBER";
|
||||
// -----------------------------------------------------------------------------------------
|
||||
// | TAB | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BSPC |
|
||||
// | 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 {
|
||||
display-name = "SYMBOL";
|
||||
// -----------------------------------------------------------------------------------------
|
||||
// | TAB | ! | @ | # | $ | % | | ^ | & | * | ( | ) | BSPC |
|
||||
// | CTRL | | | | | | | - | = | [ | ] | \ | ` |
|
||||
// | SHFT | | | | | | | _ | + | { | } | "|" | ~ |
|
||||
// | GUI | | SPC | | ENT | | ALT |
|
||||
bindings = <
|
||||
&kp TAB &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp ASTRK &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
|
||||
>;
|
||||
};
|
||||
};
|
||||
};
|
||||
20
app/boards/lowprokb/corneish_zen/corneish_zen.yaml
Normal file
20
app/boards/lowprokb/corneish_zen/corneish_zen.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
identifier: corne-ish_zen
|
||||
name: Corne-ish Zen v2
|
||||
url: https://lowprokb.ca/collections/keyboards/products/corne-ish-zen
|
||||
type: mcu
|
||||
arch: arm
|
||||
toolchain:
|
||||
- zephyr
|
||||
- gnuarmemb
|
||||
- xtools
|
||||
ram: 40
|
||||
supported:
|
||||
- adc
|
||||
- usb_device
|
||||
- ble
|
||||
- ieee802154
|
||||
- pwm
|
||||
- watchdog
|
||||
- gpio
|
||||
- i2c
|
||||
- spi
|
||||
19
app/boards/lowprokb/corneish_zen/corneish_zen.zmk.yml
Normal file
19
app/boards/lowprokb/corneish_zen/corneish_zen.zmk.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
file_format: "1"
|
||||
id: corneish_zen
|
||||
name: Corneish Zen
|
||||
url: https://lowprokb.ca/collections/keyboards/products/corne-ish-zen
|
||||
type: board
|
||||
arch: arm
|
||||
features:
|
||||
- keys
|
||||
- display
|
||||
- studio
|
||||
outputs:
|
||||
- usb
|
||||
- ble
|
||||
revisions:
|
||||
- 2.0.0
|
||||
- 1.0.0
|
||||
siblings:
|
||||
- corneish_zen_left
|
||||
- corneish_zen_right
|
||||
8
app/boards/lowprokb/corneish_zen/corneish_zen_left.dts
Normal file
8
app/boards/lowprokb/corneish_zen/corneish_zen_left.dts
Normal file
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2025 The ZMK Contributors
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "corneish_zen.dtsi"
|
||||
119
app/boards/lowprokb/corneish_zen/corneish_zen_left_1_0_0.overlay
Normal file
119
app/boards/lowprokb/corneish_zen/corneish_zen_left_1_0_0.overlay
Normal file
@@ -0,0 +1,119 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/{
|
||||
chosen {
|
||||
zephyr,display = &epd;
|
||||
zmk,battery = &fuelgauge;
|
||||
};
|
||||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
wakeup-source;
|
||||
|
||||
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>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
spi2_default: spi2_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_SCK, 0, 27)>,
|
||||
<NRF_PSEL(SPIM_MOSI, 0, 8)>,
|
||||
<NRF_PSEL(SPIM_MISO, 0, 22)>;
|
||||
};
|
||||
};
|
||||
|
||||
spi2_sleep: spi2_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_SCK, 0, 27)>,
|
||||
<NRF_PSEL(SPIM_MOSI, 0, 8)>,
|
||||
<NRF_PSEL(SPIM_MISO, 0, 22)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
|
||||
i2c0_default: i2c0_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(TWIM_SDA, 0, 6)>,
|
||||
<NRF_PSEL(TWIM_SCL, 0, 26)>;
|
||||
};
|
||||
};
|
||||
|
||||
i2c0_sleep: i2c0_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(TWIM_SDA, 0, 6)>,
|
||||
<NRF_PSEL(TWIM_SCL, 0, 26)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
status = "okay";
|
||||
compatible = "nordic,nrf-twim";
|
||||
pinctrl-0 = <&i2c0_default>;
|
||||
pinctrl-1 = <&i2c0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
clock-frequency = <100000>;
|
||||
|
||||
fuelgauge: bq274xx@55 {
|
||||
compatible = "ti,bq274xx";
|
||||
reg = <0x55>;
|
||||
design-voltage = <3700>; //Battery Design Voltage 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
|
||||
int-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
&spi2 {
|
||||
status = "okay";
|
||||
compatible = "nordic,nrf-spim";
|
||||
pinctrl-0 = <&spi2_default>;
|
||||
pinctrl-1 = <&spi2_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
cs-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
|
||||
|
||||
epd: il0323@0 {
|
||||
compatible = "gooddisplay,il0323";
|
||||
reg = <0>;
|
||||
width = <80>;
|
||||
height = <128>;
|
||||
spi-max-frequency = <4000000>;
|
||||
dc-gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
|
||||
busy-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
|
||||
reset-gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
|
||||
pwr = [03 00 26 26];
|
||||
cdi = <0xd2>;
|
||||
tcon = <0x22>;
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,76 @@
|
||||
#
|
||||
# Copyright (c) 2022 Darryl deHaan
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
CONFIG_ZMK_SLEEP=y
|
||||
CONFIG_ZMK_DISPLAY=y
|
||||
|
||||
# Enable MPU
|
||||
CONFIG_ARM_MPU=y
|
||||
|
||||
# enable pinctrl
|
||||
CONFIG_PINCTRL=y
|
||||
|
||||
# enable GPIO
|
||||
CONFIG_GPIO=y
|
||||
|
||||
# Enable I2C
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_NRFX=y
|
||||
|
||||
# Enable SPI
|
||||
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
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
||||
|
||||
# enable display drivers
|
||||
CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
|
||||
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=4096
|
||||
CONFIG_LV_Z_BITS_PER_PIXEL=1
|
||||
CONFIG_LV_COLOR_DEPTH_1=y
|
||||
CONFIG_LV_DPI_DEF=145
|
||||
CONFIG_LV_Z_VDB_SIZE=100
|
||||
CONFIG_LV_USE_THEME_MONO=y
|
||||
# CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00
|
||||
CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16=y
|
||||
CONFIG_LV_FONT_MONTSERRAT_26=y
|
||||
CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y
|
||||
|
||||
# custom status screens
|
||||
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM=y
|
||||
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=n
|
||||
CONFIG_CUSTOM_WIDGET_BATTERY_STATUS=y
|
||||
CONFIG_ZMK_WIDGET_BATTERY_STATUS=n
|
||||
CONFIG_CUSTOM_WIDGET_OUTPUT_STATUS=y
|
||||
CONFIG_ZMK_WIDGET_OUTPUT_STATUS=n
|
||||
CONFIG_CUSTOM_WIDGET_LAYER_STATUS=y
|
||||
CONFIG_ZMK_WIDGET_LAYER_STATUS=n
|
||||
|
||||
# Turn on logging, and set ZMK logging to debug output
|
||||
#CONFIG_LOG=y
|
||||
#CONFIG_ZMK_USB_LOGGING=y
|
||||
#CONFIG_ZMK_LOG_LEVEL_DBG=y
|
||||
#CONFIG_LOG_BUFFER_SIZE=65536
|
||||
#CONFIG_LOG_STRDUP_BUF_COUNT=160
|
||||
#CONFIG_I2C_LOG_LEVEL_DBG=y
|
||||
#CONFIG_SPI_LOG_LEVEL_DBG=y
|
||||
#CONFIG_DISPLAY_LOG_LEVEL_DBG=y
|
||||
#CONFIG_LVGL_LOG_LEVEL_DBG=y
|
||||
#CONFIG_LVGL_USE_DEBUG=y
|
||||
#CONFIG_SENSOR_LOG_LEVEL_DBG=y
|
||||
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
/{
|
||||
chosen {
|
||||
zephyr,display = &epd;
|
||||
zmk,battery = &vbatt;
|
||||
};
|
||||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
wakeup-source;
|
||||
|
||||
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>;
|
||||
};
|
||||
};
|
||||
|
||||
vbatt: vbatt {
|
||||
compatible = "zmk,battery-voltage-divider";
|
||||
io-channels = <&adc 0>;
|
||||
output-ohms = <1960000>;
|
||||
full-ohms = <(1960000 + 810000)>;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
spi0_default: spi0_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_SCK, 0, 27)>,
|
||||
<NRF_PSEL(SPIM_MOSI, 0, 8)>,
|
||||
<NRF_PSEL(SPIM_MISO, 0, 22)>;
|
||||
};
|
||||
};
|
||||
|
||||
spi0_sleep: spi0_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_SCK, 0, 27)>,
|
||||
<NRF_PSEL(SPIM_MOSI, 0, 8)>,
|
||||
<NRF_PSEL(SPIM_MISO, 0, 22)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
status = "okay";
|
||||
compatible = "nordic,nrf-spim";
|
||||
pinctrl-0 = <&spi0_default>;
|
||||
pinctrl-1 = <&spi0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
cs-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
|
||||
|
||||
epd: il0323@0 {
|
||||
compatible = "gooddisplay,il0323";
|
||||
reg = <0>;
|
||||
width = <80>;
|
||||
height = <128>;
|
||||
spi-max-frequency = <4000000>;
|
||||
dc-gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
|
||||
busy-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
|
||||
reset-gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
|
||||
pwr = [03 00 26 26];
|
||||
cdi = <0xd2>;
|
||||
tcon = <0x22>;
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,72 @@
|
||||
#
|
||||
# Copyright (c) 2022 Darryl deHaan
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
CONFIG_ZMK_SLEEP=y
|
||||
CONFIG_ZMK_DISPLAY=y
|
||||
|
||||
# Enable MPU
|
||||
CONFIG_ARM_MPU=y
|
||||
|
||||
# enable pinctrl
|
||||
CONFIG_PINCTRL=y
|
||||
|
||||
# enable GPIO
|
||||
CONFIG_GPIO=y
|
||||
|
||||
# Enable SPI
|
||||
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
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
||||
|
||||
# enable display drivers
|
||||
CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
|
||||
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=4096
|
||||
CONFIG_LV_Z_BITS_PER_PIXEL=1
|
||||
CONFIG_LV_COLOR_DEPTH_1=y
|
||||
CONFIG_LV_DPI_DEF=145
|
||||
CONFIG_LV_Z_VDB_SIZE=100
|
||||
CONFIG_LV_USE_THEME_MONO=y
|
||||
# CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00
|
||||
CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16=y
|
||||
CONFIG_LV_FONT_MONTSERRAT_26=y
|
||||
CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y
|
||||
|
||||
# custom status screens
|
||||
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM=y
|
||||
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=n
|
||||
CONFIG_CUSTOM_WIDGET_BATTERY_STATUS=y
|
||||
CONFIG_ZMK_WIDGET_BATTERY_STATUS=n
|
||||
CONFIG_CUSTOM_WIDGET_OUTPUT_STATUS=y
|
||||
CONFIG_ZMK_WIDGET_OUTPUT_STATUS=n
|
||||
CONFIG_CUSTOM_WIDGET_LAYER_STATUS=y
|
||||
CONFIG_ZMK_WIDGET_LAYER_STATUS=n
|
||||
|
||||
# Turn on logging, and set ZMK logging to debug output
|
||||
#CONFIG_LOG=y
|
||||
#CONFIG_ZMK_USB_LOGGING=y
|
||||
#CONFIG_ZMK_LOG_LEVEL_DBG=y
|
||||
#CONFIG_LOG_BUFFER_SIZE=65536
|
||||
#CONFIG_LOG_STRDUP_BUF_COUNT=160
|
||||
#CONFIG_I2C_LOG_LEVEL_DBG=y
|
||||
#CONFIG_SPI_LOG_LEVEL_DBG=y
|
||||
#CONFIG_DISPLAY_LOG_LEVEL_DBG=y
|
||||
#CONFIG_LVGL_LOG_LEVEL_DBG=y
|
||||
#CONFIG_LVGL_USE_DEBUG=y
|
||||
#CONFIG_SENSOR_LOG_LEVEL_DBG=y
|
||||
8
app/boards/lowprokb/corneish_zen/corneish_zen_right.dts
Normal file
8
app/boards/lowprokb/corneish_zen/corneish_zen_right.dts
Normal file
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2025 The ZMK Contributors
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "corneish_zen.dtsi"
|
||||
@@ -0,0 +1,126 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
/{
|
||||
chosen {
|
||||
zephyr,display = &epd;
|
||||
zmk,battery = &fuelgauge;
|
||||
};
|
||||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
wakeup-source;
|
||||
|
||||
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>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&default_transform {
|
||||
col-offset = <6>;
|
||||
};
|
||||
|
||||
&five_column_transform {
|
||||
col-offset = <6>;
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
spi2_default: spi2_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_SCK, 0, 20)>,
|
||||
<NRF_PSEL(SPIM_MOSI, 0, 24)>,
|
||||
<NRF_PSEL(SPIM_MISO, 0, 27)>;
|
||||
};
|
||||
};
|
||||
|
||||
spi2_sleep: spi2_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_SCK, 0, 20)>,
|
||||
<NRF_PSEL(SPIM_MOSI, 0, 24)>,
|
||||
<NRF_PSEL(SPIM_MISO, 0, 27)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
|
||||
i2c0_default: i2c0_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(TWIM_SDA, 0, 16)>,
|
||||
<NRF_PSEL(TWIM_SCL, 0, 13)>;
|
||||
};
|
||||
};
|
||||
|
||||
i2c0_sleep: i2c0_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(TWIM_SDA, 0, 16)>,
|
||||
<NRF_PSEL(TWIM_SCL, 0, 13)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
status = "okay";
|
||||
compatible = "nordic,nrf-twim";
|
||||
pinctrl-0 = <&i2c0_default>;
|
||||
pinctrl-1 = <&i2c0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
clock-frequency = <100000>;
|
||||
|
||||
fuelgauge: bq274xx@55 {
|
||||
compatible = "ti,bq274xx";
|
||||
reg = <0x55>;
|
||||
design-voltage = <3700>; //Battery Design Voltage 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
|
||||
int-gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
&spi2 {
|
||||
status = "okay";
|
||||
compatible = "nordic,nrf-spim";
|
||||
pinctrl-0 = <&spi2_default>;
|
||||
pinctrl-1 = <&spi2_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
cs-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
|
||||
|
||||
epd: il0323@0 {
|
||||
compatible = "gooddisplay,il0323";
|
||||
reg = <0>;
|
||||
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];
|
||||
cdi = <0xd2>;
|
||||
tcon = <0x22>;
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,75 @@
|
||||
#
|
||||
# Copyright (c) 2022 Darryl deHaan
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
CONFIG_ZMK_SLEEP=y
|
||||
CONFIG_ZMK_DISPLAY=y
|
||||
|
||||
# Enable MPU
|
||||
CONFIG_ARM_MPU=y
|
||||
|
||||
# enable pinctrl
|
||||
CONFIG_PINCTRL=y
|
||||
|
||||
# enable GPIO
|
||||
CONFIG_GPIO=y
|
||||
|
||||
# Enable I2C
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_NRFX=y
|
||||
|
||||
# Enable SPI
|
||||
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
|
||||
|
||||
CONFIG_ZMK_USB=n
|
||||
CONFIG_ZMK_BLE=y
|
||||
|
||||
# enable display drivers
|
||||
CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
|
||||
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=4096
|
||||
CONFIG_LV_Z_BITS_PER_PIXEL=1
|
||||
CONFIG_LV_COLOR_DEPTH_1=y
|
||||
CONFIG_LV_DPI_DEF=145
|
||||
CONFIG_LV_Z_VDB_SIZE=100
|
||||
CONFIG_LV_USE_THEME_MONO=y
|
||||
# CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00
|
||||
CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16=y
|
||||
CONFIG_LV_FONT_MONTSERRAT_26=y
|
||||
CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y
|
||||
|
||||
# custom status screens
|
||||
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM=y
|
||||
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=n
|
||||
CONFIG_CUSTOM_WIDGET_BATTERY_STATUS=y
|
||||
CONFIG_ZMK_WIDGET_BATTERY_STATUS=n
|
||||
CONFIG_CUSTOM_WIDGET_PERIPHERAL_STATUS=y
|
||||
CONFIG_ZMK_WIDGET_PERIPHERAL_STATUS=n
|
||||
|
||||
# Turn on logging, and set ZMK logging to debug output
|
||||
#CONFIG_LOG=y
|
||||
#CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS=8000
|
||||
#CONFIG_ZMK_USB_LOGGING=y
|
||||
#CONFIG_ZMK_LOG_LEVEL_DBG=y
|
||||
#CONFIG_LOG_BUFFER_SIZE=20000
|
||||
#CONFIG_LOG_STRDUP_BUF_COUNT=60
|
||||
#CONFIG_I2C_LOG_LEVEL_DBG=y
|
||||
#CONFIG_SPI_LOG_LEVEL_DBG=y
|
||||
#CONFIG_DISPLAY_LOG_LEVEL_DBG=y
|
||||
#CONFIG_LVGL_LOG_LEVEL_DBG=y
|
||||
#CONFIG_LVGL_USE_DEBUG=y
|
||||
#CONFIG_SENSOR_LOG_LEVEL_DBG=y
|
||||
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
/{
|
||||
chosen {
|
||||
zephyr,display = &epd;
|
||||
zmk,battery = &vbatt;
|
||||
};
|
||||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
wakeup-source;
|
||||
|
||||
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>;
|
||||
};
|
||||
};
|
||||
|
||||
vbatt: vbatt {
|
||||
compatible = "zmk,battery-voltage-divider";
|
||||
io-channels = <&adc 0>;
|
||||
output-ohms = <1960000>;
|
||||
full-ohms = <(1960000 + 810000)>;
|
||||
};
|
||||
};
|
||||
|
||||
&default_transform {
|
||||
col-offset = <6>;
|
||||
};
|
||||
|
||||
&five_column_transform {
|
||||
col-offset = <6>;
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
spi0_default: spi0_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_SCK, 0, 20)>,
|
||||
<NRF_PSEL(SPIM_MOSI, 0, 24)>,
|
||||
<NRF_PSEL(SPIM_MISO, 0, 27)>;
|
||||
};
|
||||
};
|
||||
|
||||
spi0_sleep: spi0_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_SCK, 0, 20)>,
|
||||
<NRF_PSEL(SPIM_MOSI, 0, 24)>,
|
||||
<NRF_PSEL(SPIM_MISO, 0, 27)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
status = "okay";
|
||||
compatible = "nordic,nrf-spim";
|
||||
pinctrl-0 = <&spi0_default>;
|
||||
pinctrl-1 = <&spi0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
cs-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
|
||||
|
||||
epd: il0323@0 {
|
||||
compatible = "gooddisplay,il0323";
|
||||
reg = <0>;
|
||||
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];
|
||||
cdi = <0xd2>;
|
||||
tcon = <0x22>;
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,71 @@
|
||||
#
|
||||
# Copyright (c) 2022 Darryl deHaan
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
CONFIG_ZMK_SLEEP=y
|
||||
CONFIG_ZMK_DISPLAY=y
|
||||
|
||||
# Enable MPU
|
||||
CONFIG_ARM_MPU=y
|
||||
|
||||
# enable pinctrl
|
||||
CONFIG_PINCTRL=y
|
||||
|
||||
# enable GPIO
|
||||
CONFIG_GPIO=y
|
||||
|
||||
# Enable SPI
|
||||
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
|
||||
|
||||
CONFIG_ZMK_USB=n
|
||||
CONFIG_ZMK_BLE=y
|
||||
|
||||
# enable display drivers
|
||||
CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
|
||||
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=4096
|
||||
CONFIG_LV_Z_BITS_PER_PIXEL=1
|
||||
CONFIG_LV_COLOR_DEPTH_1=y
|
||||
CONFIG_LV_DPI_DEF=145
|
||||
CONFIG_LV_Z_VDB_SIZE=100
|
||||
CONFIG_LV_USE_THEME_MONO=y
|
||||
# CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00
|
||||
CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16=y
|
||||
CONFIG_LV_FONT_MONTSERRAT_26=y
|
||||
CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y
|
||||
|
||||
# custom status screens
|
||||
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM=y
|
||||
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=n
|
||||
CONFIG_CUSTOM_WIDGET_BATTERY_STATUS=y
|
||||
CONFIG_ZMK_WIDGET_BATTERY_STATUS=n
|
||||
CONFIG_CUSTOM_WIDGET_PERIPHERAL_STATUS=y
|
||||
CONFIG_ZMK_WIDGET_PERIPHERAL_STATUS=n
|
||||
|
||||
# Turn on logging, and set ZMK logging to debug output
|
||||
#CONFIG_LOG=y
|
||||
#CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS=8000
|
||||
#CONFIG_ZMK_USB_LOGGING=y
|
||||
#CONFIG_ZMK_LOG_LEVEL_DBG=y
|
||||
#CONFIG_LOG_BUFFER_SIZE=20000
|
||||
#CONFIG_LOG_STRDUP_BUF_COUNT=60
|
||||
#CONFIG_I2C_LOG_LEVEL_DBG=y
|
||||
#CONFIG_SPI_LOG_LEVEL_DBG=y
|
||||
#CONFIG_DISPLAY_LOG_LEVEL_DBG=y
|
||||
#CONFIG_LVGL_LOG_LEVEL_DBG=y
|
||||
#CONFIG_LVGL_USE_DEBUG=y
|
||||
#CONFIG_SENSOR_LOG_LEVEL_DBG=y
|
||||
77
app/boards/lowprokb/corneish_zen/custom_status_screen.c
Normal file
77
app/boards/lowprokb/corneish_zen/custom_status_screen.c
Normal file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "widgets/battery_status.h"
|
||||
#include "widgets/peripheral_status.h"
|
||||
#include "widgets/output_status.h"
|
||||
#include "widgets/layer_status.h"
|
||||
#include "custom_status_screen.h"
|
||||
|
||||
#include <zephyr/logging/log.h>
|
||||
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
||||
|
||||
LV_IMG_DECLARE(zenlogo);
|
||||
LV_IMG_DECLARE(layers2);
|
||||
|
||||
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_BATTERY_STATUS)
|
||||
static struct zmk_widget_battery_status battery_status_widget;
|
||||
#endif
|
||||
|
||||
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_OUTPUT_STATUS)
|
||||
static struct zmk_widget_output_status output_status_widget;
|
||||
#endif
|
||||
|
||||
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_PERIPHERAL_STATUS)
|
||||
static struct zmk_widget_peripheral_status peripheral_status_widget;
|
||||
#endif
|
||||
|
||||
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_LAYER_STATUS)
|
||||
static struct zmk_widget_layer_status layer_status_widget;
|
||||
#endif
|
||||
|
||||
lv_obj_t *zmk_display_status_screen() {
|
||||
|
||||
lv_obj_t *screen;
|
||||
screen = lv_obj_create(NULL);
|
||||
|
||||
#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), LV_ALIGN_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), LV_ALIGN_TOP_MID, 0, 41);
|
||||
#endif
|
||||
|
||||
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_PERIPHERAL_STATUS)
|
||||
zmk_widget_peripheral_status_init(&peripheral_status_widget, screen);
|
||||
lv_obj_align(zmk_widget_peripheral_status_obj(&peripheral_status_widget), LV_ALIGN_TOP_MID, 0,
|
||||
41);
|
||||
#endif
|
||||
|
||||
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_LAYER_STATUS)
|
||||
lv_obj_t *LayersHeading;
|
||||
LayersHeading = lv_image_create(screen);
|
||||
lv_obj_align(LayersHeading, LV_ALIGN_BOTTOM_MID, 0, -30);
|
||||
lv_image_set_src(LayersHeading, &layers2);
|
||||
|
||||
zmk_widget_layer_status_init(&layer_status_widget, screen);
|
||||
lv_obj_set_style_text_font(zmk_widget_layer_status_obj(&layer_status_widget),
|
||||
&lv_font_montserrat_16, LV_PART_MAIN);
|
||||
lv_obj_align(zmk_widget_layer_status_obj(&layer_status_widget), LV_ALIGN_BOTTOM_MID, 0, -5);
|
||||
#endif
|
||||
|
||||
#if !IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
|
||||
lv_obj_t *zenlogo_icon;
|
||||
zenlogo_icon = lv_image_create(screen);
|
||||
lv_image_set_src(zenlogo_icon, &zenlogo);
|
||||
lv_obj_align(zenlogo_icon, LV_ALIGN_BOTTOM_MID, 0, -5);
|
||||
#endif
|
||||
|
||||
return screen;
|
||||
}
|
||||
12
app/boards/lowprokb/corneish_zen/custom_status_screen.h
Normal file
12
app/boards/lowprokb/corneish_zen/custom_status_screen.h
Normal file
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
lv_obj_t *zmk_display_status_screen();
|
||||
9
app/boards/lowprokb/corneish_zen/pre_dt_board.cmake
Normal file
9
app/boards/lowprokb/corneish_zen/pre_dt_board.cmake
Normal file
@@ -0,0 +1,9 @@
|
||||
#
|
||||
# Copyright (c) 2024 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
# Suppresses duplicate unit-address warning at build time for power, clock, acl and flash-controller
|
||||
# https://docs.zephyrproject.org/latest/build/dts/intro-input-output.html
|
||||
|
||||
list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")
|
||||
98
app/boards/lowprokb/corneish_zen/widgets/battery_status.c
Normal file
98
app/boards/lowprokb/corneish_zen/widgets/battery_status.c
Normal file
@@ -0,0 +1,98 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <zephyr/kernel.h>
|
||||
|
||||
#include <zephyr/logging/log.h>
|
||||
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
||||
|
||||
#include <zmk/display.h>
|
||||
#include <zmk/battery.h>
|
||||
#include "battery_status.h"
|
||||
#include <zmk/usb.h>
|
||||
#include <zmk/events/usb_conn_state_changed.h>
|
||||
#include <zmk/event_manager.h>
|
||||
#include <zmk/events/battery_state_changed.h>
|
||||
|
||||
static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets);
|
||||
|
||||
struct battery_status_state {
|
||||
uint8_t level;
|
||||
#if IS_ENABLED(CONFIG_USB_DEVICE_STACK)
|
||||
bool usb_present;
|
||||
#endif
|
||||
};
|
||||
|
||||
LV_IMG_DECLARE(batt_100);
|
||||
LV_IMG_DECLARE(batt_100_chg);
|
||||
LV_IMG_DECLARE(batt_75);
|
||||
LV_IMG_DECLARE(batt_75_chg);
|
||||
LV_IMG_DECLARE(batt_50);
|
||||
LV_IMG_DECLARE(batt_50_chg);
|
||||
LV_IMG_DECLARE(batt_25);
|
||||
LV_IMG_DECLARE(batt_25_chg);
|
||||
LV_IMG_DECLARE(batt_5);
|
||||
LV_IMG_DECLARE(batt_5_chg);
|
||||
LV_IMG_DECLARE(batt_0);
|
||||
LV_IMG_DECLARE(batt_0_chg);
|
||||
|
||||
static void set_battery_symbol(lv_obj_t *icon, struct battery_status_state state) {
|
||||
uint8_t level = state.level;
|
||||
|
||||
#if IS_ENABLED(CONFIG_USB_DEVICE_STACK)
|
||||
if (level > 95) {
|
||||
lv_image_set_src(icon, state.usb_present ? &batt_100_chg : &batt_100);
|
||||
} else if (level > 74) {
|
||||
lv_image_set_src(icon, state.usb_present ? &batt_75_chg : &batt_75);
|
||||
} else if (level > 49) {
|
||||
lv_image_set_src(icon, state.usb_present ? &batt_50_chg : &batt_50);
|
||||
} else if (level > 24) {
|
||||
lv_image_set_src(icon, state.usb_present ? &batt_25_chg : &batt_25);
|
||||
} else if (level > 5) {
|
||||
lv_image_set_src(icon, state.usb_present ? &batt_5_chg : &batt_5);
|
||||
} else {
|
||||
lv_image_set_src(icon, state.usb_present ? &batt_0_chg : &batt_0);
|
||||
}
|
||||
#endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK) */
|
||||
}
|
||||
|
||||
void battery_status_update_cb(struct battery_status_state state) {
|
||||
struct zmk_widget_battery_status *widget;
|
||||
SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_battery_symbol(widget->obj, state); }
|
||||
}
|
||||
|
||||
static struct battery_status_state battery_status_get_state(const zmk_event_t *eh) {
|
||||
const struct zmk_battery_state_changed *ev = as_zmk_battery_state_changed(eh);
|
||||
|
||||
return (struct battery_status_state){
|
||||
.level = (ev != NULL) ? ev->state_of_charge : zmk_battery_state_of_charge(),
|
||||
#if IS_ENABLED(CONFIG_USB_DEVICE_STACK)
|
||||
.usb_present = zmk_usb_is_powered(),
|
||||
#endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK) */
|
||||
};
|
||||
}
|
||||
|
||||
ZMK_DISPLAY_WIDGET_LISTENER(widget_battery_status, struct battery_status_state,
|
||||
battery_status_update_cb, battery_status_get_state)
|
||||
|
||||
ZMK_SUBSCRIPTION(widget_battery_status, zmk_battery_state_changed);
|
||||
#if IS_ENABLED(CONFIG_USB_DEVICE_STACK)
|
||||
ZMK_SUBSCRIPTION(widget_battery_status, zmk_usb_conn_state_changed);
|
||||
#endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK) */
|
||||
|
||||
int zmk_widget_battery_status_init(struct zmk_widget_battery_status *widget, lv_obj_t *parent) {
|
||||
widget->obj = lv_image_create(parent);
|
||||
|
||||
sys_slist_append(&widgets, &widget->node);
|
||||
widget_battery_status_init();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
lv_obj_t *zmk_widget_battery_status_obj(struct zmk_widget_battery_status *widget) {
|
||||
return widget->obj;
|
||||
}
|
||||
20
app/boards/lowprokb/corneish_zen/widgets/battery_status.h
Normal file
20
app/boards/lowprokb/corneish_zen/widgets/battery_status.h
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#include <zephyr/kernel.h>
|
||||
|
||||
struct zmk_widget_battery_status {
|
||||
sys_snode_t node;
|
||||
lv_obj_t *obj;
|
||||
};
|
||||
|
||||
int zmk_widget_battery_status_init(struct zmk_widget_battery_status *widget, lv_obj_t *parent);
|
||||
lv_obj_t *zmk_widget_battery_status_obj(struct zmk_widget_battery_status *widget);
|
||||
@@ -0,0 +1,4 @@
|
||||
#
|
||||
# Copyright (c) 2022 Darryl deHaan
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_USB_CONNECTED
|
||||
#define LV_ATTRIBUTE_IMG_USB_CONNECTED
|
||||
#endif
|
||||
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_USB_CONNECTED uint8_t USB_connected_map[] = {
|
||||
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
|
||||
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
|
||||
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xc0, 0x00, 0x3f,
|
||||
0xff, 0xff, 0xc0, 0x00, 0xff, 0xff, 0xff, 0xc0, 0x01, 0xff, 0xff, 0xff, 0x80, 0x03, 0xff, 0xff,
|
||||
0xff, 0xfe, 0x07, 0xff, 0xff, 0xff, 0xff, 0x07, 0x1e, 0x30, 0x38, 0x07, 0x0f, 0x1c, 0x20, 0x38,
|
||||
0x07, 0x0f, 0x1c, 0x47, 0x10, 0xc3, 0x3e, 0x1c, 0x43, 0xf1, 0xc7, 0x7e, 0x3c, 0x60, 0x70, 0x0e,
|
||||
0x7e, 0x3c, 0x70, 0x30, 0x0e, 0x7e, 0x38, 0xfc, 0x33, 0xc7, 0xfe, 0x18, 0x8f, 0x23, 0x87, 0x0e,
|
||||
0x00, 0xc6, 0x20, 0x07, 0x0f, 0x01, 0xe0, 0x60, 0x0e, 0x0f, 0x87, 0xf0, 0xe0, 0x3e, 0x07, 0xff,
|
||||
0xff, 0xff, 0xfc, 0x07, 0xff, 0xff, 0xff, 0xf0, 0x03, 0xff, 0xff, 0xfe, 0x00, 0x01, 0xff, 0xff,
|
||||
0xfc, 0x00, 0x00, 0x7f, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
const lv_image_dsc_t USB_connected = {
|
||||
.header =
|
||||
{
|
||||
.magic = LV_IMAGE_HEADER_MAGIC,
|
||||
.cf = LV_COLOR_FORMAT_I1,
|
||||
.w = 40,
|
||||
.h = 31,
|
||||
.stride = 5,
|
||||
},
|
||||
.data_size = sizeof(USB_connected_map),
|
||||
.data = USB_connected_map,
|
||||
};
|
||||
47
app/boards/lowprokb/corneish_zen/widgets/icons/batt_0.c
Normal file
47
app/boards/lowprokb/corneish_zen/widgets/icons/batt_0.c
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_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_image_dsc_t batt_0 = {
|
||||
.header =
|
||||
{
|
||||
.magic = LV_IMAGE_HEADER_MAGIC,
|
||||
.cf = LV_COLOR_FORMAT_I1,
|
||||
.w = 40,
|
||||
.h = 31,
|
||||
.stride = 5,
|
||||
},
|
||||
.data_size = sizeof(batt_0_map),
|
||||
.data = batt_0_map,
|
||||
};
|
||||
47
app/boards/lowprokb/corneish_zen/widgets/icons/batt_0_chg.c
Normal file
47
app/boards/lowprokb/corneish_zen/widgets/icons/batt_0_chg.c
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_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_image_dsc_t batt_0_chg = {
|
||||
.header =
|
||||
{
|
||||
.magic = LV_IMAGE_HEADER_MAGIC,
|
||||
.cf = LV_COLOR_FORMAT_I1,
|
||||
.w = 40,
|
||||
.h = 31,
|
||||
.stride = 5,
|
||||
},
|
||||
.data_size = sizeof(batt_0_chg_map),
|
||||
.data = batt_0_chg_map,
|
||||
};
|
||||
47
app/boards/lowprokb/corneish_zen/widgets/icons/batt_100.c
Normal file
47
app/boards/lowprokb/corneish_zen/widgets/icons/batt_100.c
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_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_image_dsc_t batt_100 = {
|
||||
.header =
|
||||
{
|
||||
.magic = LV_IMAGE_HEADER_MAGIC,
|
||||
.cf = LV_COLOR_FORMAT_I1,
|
||||
.w = 40,
|
||||
.h = 31,
|
||||
.stride = 5,
|
||||
},
|
||||
.data_size = sizeof(batt_100_map),
|
||||
.data = batt_100_map,
|
||||
};
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_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_image_dsc_t batt_100_chg = {
|
||||
.header =
|
||||
{
|
||||
.magic = LV_IMAGE_HEADER_MAGIC,
|
||||
.cf = LV_COLOR_FORMAT_I1,
|
||||
.w = 40,
|
||||
.h = 31,
|
||||
.stride = 5,
|
||||
},
|
||||
.data_size = sizeof(batt_100_chg_map),
|
||||
.data = batt_100_chg_map,
|
||||
};
|
||||
47
app/boards/lowprokb/corneish_zen/widgets/icons/batt_25.c
Normal file
47
app/boards/lowprokb/corneish_zen/widgets/icons/batt_25.c
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_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_image_dsc_t batt_25 = {
|
||||
.header =
|
||||
{
|
||||
.magic = LV_IMAGE_HEADER_MAGIC,
|
||||
.cf = LV_COLOR_FORMAT_I1,
|
||||
.w = 40,
|
||||
.h = 31,
|
||||
.stride = 5,
|
||||
},
|
||||
.data_size = sizeof(batt_25_map),
|
||||
.data = batt_25_map,
|
||||
};
|
||||
47
app/boards/lowprokb/corneish_zen/widgets/icons/batt_25_chg.c
Normal file
47
app/boards/lowprokb/corneish_zen/widgets/icons/batt_25_chg.c
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_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_image_dsc_t batt_25_chg = {
|
||||
.header =
|
||||
{
|
||||
.magic = LV_IMAGE_HEADER_MAGIC,
|
||||
.cf = LV_COLOR_FORMAT_I1,
|
||||
.w = 40,
|
||||
.h = 31,
|
||||
.stride = 5,
|
||||
},
|
||||
.data_size = sizeof(batt_25_chg_map),
|
||||
.data = batt_25_chg_map,
|
||||
};
|
||||
47
app/boards/lowprokb/corneish_zen/widgets/icons/batt_5.c
Normal file
47
app/boards/lowprokb/corneish_zen/widgets/icons/batt_5.c
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_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_image_dsc_t batt_5 = {
|
||||
.header =
|
||||
{
|
||||
.magic = LV_IMAGE_HEADER_MAGIC,
|
||||
.cf = LV_COLOR_FORMAT_I1,
|
||||
.w = 40,
|
||||
.h = 31,
|
||||
.stride = 5,
|
||||
},
|
||||
.data_size = sizeof(batt_5_map),
|
||||
.data = batt_5_map,
|
||||
};
|
||||
47
app/boards/lowprokb/corneish_zen/widgets/icons/batt_50.c
Normal file
47
app/boards/lowprokb/corneish_zen/widgets/icons/batt_50.c
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_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_image_dsc_t batt_50 = {
|
||||
.header =
|
||||
{
|
||||
.magic = LV_IMAGE_HEADER_MAGIC,
|
||||
.cf = LV_COLOR_FORMAT_I1,
|
||||
.w = 40,
|
||||
.h = 31,
|
||||
.stride = 5,
|
||||
},
|
||||
.data_size = sizeof(batt_50_map),
|
||||
.data = batt_50_map,
|
||||
};
|
||||
47
app/boards/lowprokb/corneish_zen/widgets/icons/batt_50_chg.c
Normal file
47
app/boards/lowprokb/corneish_zen/widgets/icons/batt_50_chg.c
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_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_image_dsc_t batt_50_chg = {
|
||||
.header =
|
||||
{
|
||||
.magic = LV_IMAGE_HEADER_MAGIC,
|
||||
.cf = LV_COLOR_FORMAT_I1,
|
||||
.w = 40,
|
||||
.h = 31,
|
||||
.stride = 5,
|
||||
},
|
||||
.data_size = sizeof(batt_50_chg_map),
|
||||
.data = batt_50_chg_map,
|
||||
};
|
||||
47
app/boards/lowprokb/corneish_zen/widgets/icons/batt_5_chg.c
Normal file
47
app/boards/lowprokb/corneish_zen/widgets/icons/batt_5_chg.c
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_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_image_dsc_t batt_5_chg = {
|
||||
.header =
|
||||
{
|
||||
.magic = LV_IMAGE_HEADER_MAGIC,
|
||||
.cf = LV_COLOR_FORMAT_I1,
|
||||
.w = 40,
|
||||
.h = 31,
|
||||
.stride = 5,
|
||||
},
|
||||
.data_size = sizeof(batt_5_chg_map),
|
||||
.data = batt_5_chg_map,
|
||||
};
|
||||
47
app/boards/lowprokb/corneish_zen/widgets/icons/batt_75.c
Normal file
47
app/boards/lowprokb/corneish_zen/widgets/icons/batt_75.c
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_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_image_dsc_t batt_75 = {
|
||||
.header =
|
||||
{
|
||||
.magic = LV_IMAGE_HEADER_MAGIC,
|
||||
.cf = LV_COLOR_FORMAT_I1,
|
||||
.w = 40,
|
||||
.h = 31,
|
||||
.stride = 5,
|
||||
},
|
||||
.data_size = sizeof(batt_75_map),
|
||||
.data = batt_75_map,
|
||||
};
|
||||
47
app/boards/lowprokb/corneish_zen/widgets/icons/batt_75_chg.c
Normal file
47
app/boards/lowprokb/corneish_zen/widgets/icons/batt_75_chg.c
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_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_image_dsc_t batt_75_chg = {
|
||||
.header =
|
||||
{
|
||||
.magic = LV_IMAGE_HEADER_MAGIC,
|
||||
.cf = LV_COLOR_FORMAT_I1,
|
||||
.w = 40,
|
||||
.h = 31,
|
||||
.stride = 5,
|
||||
},
|
||||
.data_size = sizeof(batt_75_chg_map),
|
||||
.data = batt_75_chg_map,
|
||||
};
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING
|
||||
#define LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING
|
||||
#endif
|
||||
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING uint8_t
|
||||
bluetooth_advertising_map[] = {
|
||||
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
|
||||
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
|
||||
|
||||
0x00, 0x40, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x78,
|
||||
0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00,
|
||||
0x20, 0x7f, 0x80, 0x00, 0x70, 0x77, 0xc0, 0x00, 0xf8, 0x73, 0xe0, 0xc0, 0x7c, 0x71,
|
||||
0xe0, 0xe0, 0x3e, 0x73, 0xc0, 0x70, 0x1f, 0x77, 0x86, 0x30, 0x0f, 0xff, 0x07, 0x30,
|
||||
0x07, 0xfe, 0x07, 0x38, 0x03, 0xfc, 0x23, 0x38, 0x01, 0xf8, 0x63, 0x18, 0x01, 0xf8,
|
||||
0x63, 0x18, 0x03, 0xfc, 0x23, 0x38, 0x07, 0xfe, 0x07, 0x38, 0x0f, 0xff, 0x07, 0x30,
|
||||
0x1f, 0x77, 0x86, 0x70, 0x3e, 0x73, 0xc0, 0x70, 0x7c, 0x71, 0xe0, 0xe0, 0xf8, 0x73,
|
||||
0xe0, 0xc0, 0x70, 0x77, 0xc0, 0x00, 0x20, 0x7f, 0x80, 0x00, 0x00, 0x7f, 0x00, 0x00,
|
||||
0x00, 0x7e, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x70,
|
||||
0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
const lv_image_dsc_t bluetooth_advertising = {
|
||||
.header =
|
||||
{
|
||||
.magic = LV_IMAGE_HEADER_MAGIC,
|
||||
.cf = LV_COLOR_FORMAT_I1,
|
||||
.w = 29,
|
||||
.h = 35,
|
||||
.stride = 4,
|
||||
},
|
||||
.data_size = sizeof(bluetooth_advertising_map),
|
||||
.data = bluetooth_advertising_map,
|
||||
};
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
#ifndef LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_1
|
||||
#define LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_1
|
||||
#endif
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_1 uint8_t
|
||||
bluetooth_advertising_1_map[] = {
|
||||
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
|
||||
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
|
||||
|
||||
0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x01, 0xfc, 0x00, 0x00, 0xfe, 0x00,
|
||||
0x00, 0x0f, 0xff, 0x00, 0x20, 0xff, 0x00, 0x00, 0x1f, 0xff, 0xc0, 0x70, 0xf7, 0x80, 0x00,
|
||||
0x3f, 0xff, 0xe0, 0xf8, 0xf3, 0xc1, 0xc0, 0x7f, 0xff, 0xe0, 0x7c, 0xf3, 0xe0, 0xc0, 0xff,
|
||||
0xff, 0xf0, 0x3e, 0xf7, 0xc0, 0xe0, 0xff, 0x8f, 0xf8, 0x1f, 0xff, 0x84, 0x61, 0xfe, 0x0f,
|
||||
0xf8, 0x0f, 0xff, 0x0e, 0x71, 0xfe, 0x0f, 0xf8, 0x07, 0xfe, 0x06, 0x31, 0xff, 0xcf, 0xfc,
|
||||
0x03, 0xfc, 0x27, 0x33, 0xff, 0xcf, 0xfc, 0x01, 0xf8, 0x67, 0x33, 0xff, 0xcf, 0xfc, 0x01,
|
||||
0xf8, 0x67, 0x33, 0xff, 0xcf, 0xfc, 0x03, 0xfc, 0x27, 0x33, 0xff, 0xcf, 0xfc, 0x07, 0xfe,
|
||||
0x06, 0x31, 0xff, 0xcf, 0xfc, 0x0f, 0xff, 0x0e, 0x71, 0xff, 0xcf, 0xf8, 0x1f, 0xff, 0x84,
|
||||
0x61, 0xff, 0xcf, 0xf8, 0x3e, 0xf7, 0xc0, 0xe0, 0xff, 0xcf, 0xf8, 0x7c, 0xf3, 0xe1, 0xc0,
|
||||
0xff, 0xff, 0xf0, 0xf8, 0xf3, 0xc0, 0xc0, 0x7f, 0xff, 0xe0, 0x70, 0xf7, 0x80, 0x00, 0x3f,
|
||||
0xff, 0xe0, 0x20, 0xff, 0x00, 0x00, 0x1f, 0xff, 0x80, 0x00, 0xfe, 0x00, 0x00, 0x0f, 0xff,
|
||||
0x00, 0x00, 0xfc, 0x00, 0x00, 0x01, 0xfc, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
const lv_image_dsc_t bluetooth_advertising_1 = {
|
||||
.header =
|
||||
{
|
||||
.magic = LV_IMAGE_HEADER_MAGIC,
|
||||
.cf = LV_COLOR_FORMAT_I1,
|
||||
.w = 54,
|
||||
.h = 35,
|
||||
.stride = 7,
|
||||
},
|
||||
.data_size = sizeof(bluetooth_advertising_1_map),
|
||||
.data = bluetooth_advertising_1_map,
|
||||
};
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
#ifndef LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_2
|
||||
#define LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_2
|
||||
#endif
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_2 uint8_t
|
||||
bluetooth_advertising_2_map[] = {
|
||||
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
|
||||
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
|
||||
|
||||
0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x03, 0xfc, 0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x0f, 0xff, 0x00, 0x60, 0xff, 0x80, 0x00, 0x1f, 0xff, 0xc0, 0xf0, 0xf7, 0xc0, 0x80,
|
||||
0x7f, 0xff, 0xe0, 0x78, 0xf3, 0xe1, 0xc0, 0x7f, 0xff, 0xf0, 0x3c, 0xf3, 0xc0, 0xe0, 0xff,
|
||||
0x0f, 0xf0, 0x1e, 0xf7, 0x84, 0xe1, 0xfe, 0x07, 0xf8, 0x0f, 0xff, 0x0e, 0x71, 0xfc, 0x63,
|
||||
0xf8, 0x07, 0xfe, 0x0e, 0x71, 0xff, 0xf3, 0xfc, 0x03, 0xfc, 0x06, 0x33, 0xff, 0xe3, 0xfc,
|
||||
0x01, 0xf8, 0x67, 0x33, 0xff, 0xe7, 0xfc, 0x01, 0xf8, 0xe7, 0x33, 0xff, 0xc7, 0xfc, 0x01,
|
||||
0xfc, 0x67, 0x33, 0xff, 0x8f, 0xfc, 0x03, 0xfe, 0x06, 0x33, 0xff, 0x1f, 0xfc, 0x07, 0xff,
|
||||
0x0e, 0x71, 0xfe, 0x3f, 0xfc, 0x0f, 0xff, 0x8e, 0x61, 0xfc, 0x03, 0xf8, 0x1e, 0xf7, 0xc0,
|
||||
0xe1, 0xfc, 0x03, 0xf8, 0x3c, 0xf3, 0xe0, 0xc0, 0xff, 0xff, 0xf0, 0x78, 0xf3, 0xe1, 0xc0,
|
||||
0x7f, 0xff, 0xf0, 0xf0, 0xf7, 0xc0, 0x80, 0x7f, 0xff, 0xe0, 0x60, 0xff, 0x80, 0x00, 0x1f,
|
||||
0xff, 0xc0, 0x00, 0xff, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x03, 0xfc,
|
||||
0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
const lv_image_dsc_t bluetooth_advertising_2 = {
|
||||
.header =
|
||||
{
|
||||
.magic = LV_IMAGE_HEADER_MAGIC,
|
||||
.cf = LV_COLOR_FORMAT_I1,
|
||||
.w = 54,
|
||||
.h = 35,
|
||||
.stride = 7,
|
||||
},
|
||||
.data_size = sizeof(bluetooth_advertising_2_map),
|
||||
.data = bluetooth_advertising_2_map,
|
||||
};
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
#ifndef LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_3
|
||||
#define LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_3
|
||||
#endif
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_3 uint8_t
|
||||
bluetooth_advertising_3_map[] = {
|
||||
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
|
||||
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
|
||||
|
||||
0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x01, 0xfc, 0x00, 0x00, 0xfe, 0x00,
|
||||
0x00, 0x0f, 0xff, 0x00, 0x20, 0xff, 0x00, 0x00, 0x1f, 0xff, 0xc0, 0x70, 0xf7, 0x80, 0x00,
|
||||
0x3f, 0xff, 0xe0, 0xf8, 0xf3, 0xc1, 0xc0, 0x7f, 0xff, 0xf0, 0x7c, 0xf3, 0xe0, 0xc0, 0xff,
|
||||
0x9f, 0xf0, 0x3e, 0xf7, 0xc0, 0xe0, 0xfe, 0x07, 0xf8, 0x1f, 0xff, 0x84, 0x61, 0xfe, 0x03,
|
||||
0xf8, 0x0f, 0xff, 0x0e, 0x71, 0xfe, 0xe3, 0xfc, 0x07, 0xfe, 0x06, 0x31, 0xff, 0xe3, 0xfc,
|
||||
0x03, 0xfc, 0x27, 0x33, 0xff, 0x87, 0xfc, 0x01, 0xf8, 0x67, 0x33, 0xff, 0x87, 0xfc, 0x01,
|
||||
0xf8, 0x67, 0x33, 0xff, 0x83, 0xfc, 0x03, 0xfc, 0x27, 0x33, 0xff, 0xf3, 0xfc, 0x07, 0xfe,
|
||||
0x06, 0x31, 0xfe, 0xf3, 0xfc, 0x0f, 0xff, 0x0e, 0x71, 0xfc, 0x63, 0xfc, 0x1f, 0xff, 0x84,
|
||||
0x61, 0xfe, 0x03, 0xf8, 0x3e, 0xf7, 0xc0, 0xe0, 0xff, 0x0f, 0xf8, 0x7c, 0xf3, 0xe1, 0xc0,
|
||||
0xff, 0xff, 0xf0, 0xf8, 0xf3, 0xc0, 0xc0, 0x7f, 0xff, 0xf0, 0x70, 0xf7, 0x80, 0x00, 0x3f,
|
||||
0xff, 0xe0, 0x20, 0xff, 0x00, 0x00, 0x1f, 0xff, 0xc0, 0x00, 0xfe, 0x00, 0x00, 0x0f, 0xff,
|
||||
0x00, 0x00, 0xfc, 0x00, 0x00, 0x01, 0xfc, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
const lv_image_dsc_t bluetooth_advertising_3 = {
|
||||
.header =
|
||||
{
|
||||
.magic = LV_IMAGE_HEADER_MAGIC,
|
||||
.cf = LV_COLOR_FORMAT_I1,
|
||||
.w = 54,
|
||||
.h = 35,
|
||||
.stride = 7,
|
||||
},
|
||||
.data_size = sizeof(bluetooth_advertising_3_map),
|
||||
.data = bluetooth_advertising_3_map,
|
||||
};
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
#ifndef LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_4
|
||||
#define LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_4
|
||||
#endif
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_4 uint8_t
|
||||
bluetooth_advertising_4_map[] = {
|
||||
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
|
||||
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
|
||||
|
||||
0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x01, 0xfc, 0x00, 0x00, 0xfe, 0x00,
|
||||
0x00, 0x0f, 0xff, 0x00, 0x20, 0xff, 0x00, 0x00, 0x1f, 0xff, 0xc0, 0x70, 0xf7, 0x80, 0x00,
|
||||
0x3f, 0xff, 0xe0, 0xf8, 0xf3, 0xc0, 0xc0, 0x7f, 0xff, 0xe0, 0x7c, 0xf3, 0xe0, 0xc0, 0xff,
|
||||
0xff, 0xf0, 0x3e, 0xf7, 0xc0, 0xe0, 0xff, 0xcf, 0xf8, 0x1f, 0xff, 0x84, 0x61, 0xff, 0x8f,
|
||||
0xf8, 0x0f, 0xff, 0x0e, 0x71, 0xff, 0x0f, 0xf8, 0x07, 0xfe, 0x06, 0x31, 0xff, 0x0f, 0xfc,
|
||||
0x03, 0xfc, 0x27, 0x31, 0xfe, 0x4f, 0xfc, 0x01, 0xf8, 0x67, 0x31, 0xfc, 0x4f, 0xfc, 0x01,
|
||||
0xf8, 0x67, 0x33, 0xfc, 0xcf, 0xfc, 0x03, 0xfc, 0x27, 0x31, 0xf8, 0x07, 0xfc, 0x07, 0xfe,
|
||||
0x06, 0x31, 0xf8, 0x03, 0xfc, 0x0f, 0xff, 0x0e, 0x71, 0xf8, 0x07, 0xf8, 0x1f, 0xff, 0x84,
|
||||
0x61, 0xff, 0xcf, 0xf8, 0x3e, 0xf7, 0xc0, 0xe0, 0xff, 0xcf, 0xf8, 0x7c, 0xf3, 0xe1, 0xc0,
|
||||
0xff, 0xff, 0xf0, 0xf8, 0xf3, 0xc0, 0xc0, 0x7f, 0xff, 0xe0, 0x70, 0xf7, 0x80, 0x00, 0x3f,
|
||||
0xff, 0xc0, 0x20, 0xff, 0x00, 0x00, 0x1f, 0xff, 0x80, 0x00, 0xfe, 0x00, 0x00, 0x07, 0xff,
|
||||
0x00, 0x00, 0xfc, 0x00, 0x00, 0x01, 0xf8, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
const lv_image_dsc_t bluetooth_advertising_4 = {
|
||||
.header =
|
||||
{
|
||||
.magic = LV_IMAGE_HEADER_MAGIC,
|
||||
.cf = LV_COLOR_FORMAT_I1,
|
||||
.w = 54,
|
||||
.h = 35,
|
||||
.stride = 7,
|
||||
},
|
||||
.data_size = sizeof(bluetooth_advertising_4_map),
|
||||
.data = bluetooth_advertising_4_map,
|
||||
};
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
#ifndef LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_5
|
||||
#define LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_5
|
||||
#endif
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_5 uint8_t
|
||||
bluetooth_advertising_5_map[] = {
|
||||
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
|
||||
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
|
||||
|
||||
0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x01, 0xfc, 0x00, 0x00, 0xfe, 0x00,
|
||||
0x00, 0x0f, 0xff, 0x00, 0x20, 0xff, 0x00, 0x00, 0x1f, 0xff, 0x80, 0x70, 0xf7, 0x80, 0x00,
|
||||
0x3f, 0xff, 0xe0, 0xf8, 0xf3, 0xc0, 0xc0, 0x7f, 0xff, 0xe0, 0x7c, 0xf3, 0xe0, 0xe0, 0xff,
|
||||
0xff, 0xf0, 0x3e, 0xf7, 0xc0, 0xe1, 0xfe, 0x07, 0xf8, 0x1f, 0xff, 0x84, 0x61, 0xfe, 0x07,
|
||||
0xf8, 0x0f, 0xff, 0x0e, 0x71, 0xfc, 0x7f, 0xf8, 0x07, 0xfe, 0x06, 0x33, 0xfc, 0x7f, 0xfc,
|
||||
0x03, 0xfc, 0x27, 0x33, 0xfc, 0x07, 0xfc, 0x01, 0xf8, 0x67, 0x33, 0xfc, 0x03, 0xfc, 0x01,
|
||||
0xf8, 0x67, 0x33, 0xff, 0x63, 0xfc, 0x03, 0xfc, 0x27, 0x33, 0xff, 0xf3, 0xfc, 0x07, 0xfe,
|
||||
0x06, 0x33, 0xfe, 0xf3, 0xfc, 0x0f, 0xff, 0x0e, 0x71, 0xfc, 0x63, 0xf8, 0x1f, 0xff, 0x84,
|
||||
0x61, 0xfe, 0x07, 0xf8, 0x3e, 0xf7, 0xc0, 0xe0, 0xff, 0x0f, 0xf8, 0x7c, 0xf3, 0xe1, 0xc0,
|
||||
0xff, 0xff, 0xf0, 0xf8, 0xf3, 0xc0, 0xc0, 0x7f, 0xff, 0xe0, 0x70, 0xf7, 0x80, 0x00, 0x3f,
|
||||
0xff, 0xc0, 0x20, 0xff, 0x00, 0x00, 0x1f, 0xff, 0x80, 0x00, 0xfe, 0x00, 0x00, 0x0f, 0xff,
|
||||
0x00, 0x00, 0xfc, 0x00, 0x00, 0x01, 0xf8, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
const lv_image_dsc_t bluetooth_advertising_5 = {
|
||||
.header =
|
||||
{
|
||||
.magic = LV_IMAGE_HEADER_MAGIC,
|
||||
.cf = LV_COLOR_FORMAT_I1,
|
||||
.w = 54,
|
||||
.h = 35,
|
||||
.stride = 7,
|
||||
},
|
||||
.data_size = sizeof(bluetooth_advertising_5_map),
|
||||
.data = bluetooth_advertising_5_map,
|
||||
};
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
#ifndef LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_1
|
||||
#define LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_1
|
||||
#endif
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_1 uint8_t
|
||||
bluetooth_connected_1_map[] = {
|
||||
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
|
||||
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
|
||||
|
||||
0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x01, 0xfc, 0x00, 0x00, 0x7f, 0x00,
|
||||
0x00, 0x0f, 0xff, 0x00, 0x30, 0x7f, 0x80, 0x00, 0x1f, 0xff, 0xc0, 0x78, 0x77, 0xc0, 0x00,
|
||||
0x3f, 0xff, 0xe0, 0x7c, 0x73, 0xe0, 0x00, 0x7f, 0xff, 0xe0, 0x3e, 0x71, 0xe0, 0x00, 0xff,
|
||||
0xff, 0xf0, 0x1f, 0x73, 0xc0, 0x00, 0xff, 0x8f, 0xf8, 0x0f, 0xff, 0x80, 0x01, 0xfe, 0x0f,
|
||||
0xf8, 0x87, 0xff, 0x08, 0x01, 0xfe, 0x0f, 0xf8, 0xc3, 0xfe, 0x18, 0x01, 0xff, 0xcf, 0xfc,
|
||||
0xe1, 0xfc, 0x38, 0x03, 0xff, 0xcf, 0xfc, 0xf0, 0xf8, 0x78, 0x03, 0xff, 0xcf, 0xfc, 0xf0,
|
||||
0xfc, 0x78, 0x03, 0xff, 0xcf, 0xfc, 0xe1, 0xfc, 0x38, 0x03, 0xff, 0xcf, 0xfc, 0xc3, 0xfe,
|
||||
0x18, 0x01, 0xff, 0xcf, 0xfc, 0x87, 0xff, 0x08, 0x01, 0xff, 0xcf, 0xf8, 0x0f, 0xff, 0x80,
|
||||
0x01, 0xff, 0xcf, 0xf8, 0x1e, 0x73, 0xc0, 0x00, 0xff, 0xcf, 0xf8, 0x3c, 0x71, 0xe0, 0x00,
|
||||
0xff, 0xff, 0xf0, 0x78, 0x73, 0xe0, 0x00, 0x7f, 0xff, 0xe0, 0x78, 0x77, 0xc0, 0x00, 0x3f,
|
||||
0xff, 0xe0, 0x30, 0x7f, 0x80, 0x00, 0x1f, 0xff, 0x80, 0x00, 0x7f, 0x00, 0x00, 0x0f, 0xff,
|
||||
0x00, 0x00, 0x7e, 0x00, 0x00, 0x01, 0xfc, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
const lv_image_dsc_t bluetooth_connected_1 = {
|
||||
.header =
|
||||
{
|
||||
.magic = LV_IMAGE_HEADER_MAGIC,
|
||||
.cf = LV_COLOR_FORMAT_I1,
|
||||
.w = 54,
|
||||
.h = 35,
|
||||
.stride = 7,
|
||||
},
|
||||
.data_size = sizeof(bluetooth_connected_1_map),
|
||||
.data = bluetooth_connected_1_map,
|
||||
};
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
#ifndef LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_2
|
||||
#define LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_2
|
||||
#endif
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_2 uint8_t
|
||||
bluetooth_connected_2_map[] = {
|
||||
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
|
||||
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
|
||||
|
||||
0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x03, 0xfc, 0x00, 0x00, 0x7f, 0x00,
|
||||
0x00, 0x0f, 0xff, 0x00, 0x30, 0x7f, 0x80, 0x00, 0x1f, 0xff, 0xc0, 0x78, 0x73, 0xc0, 0x00,
|
||||
0x7f, 0xff, 0xe0, 0x7c, 0x71, 0xe0, 0x00, 0x7f, 0xff, 0xf0, 0x3e, 0x73, 0xe0, 0x00, 0xff,
|
||||
0x0f, 0xf0, 0x1f, 0x77, 0xc0, 0x01, 0xfe, 0x07, 0xf8, 0x0f, 0xff, 0x80, 0x01, 0xfc, 0x63,
|
||||
0xf8, 0x87, 0xff, 0x08, 0x01, 0xff, 0xf3, 0xfc, 0xc3, 0xfe, 0x18, 0x03, 0xff, 0xe3, 0xfc,
|
||||
0xe1, 0xfc, 0x38, 0x03, 0xff, 0xe7, 0xfc, 0xf0, 0xf8, 0x78, 0x03, 0xff, 0xc7, 0xfc, 0xe1,
|
||||
0xfc, 0x38, 0x03, 0xff, 0x8f, 0xfc, 0xc3, 0xfe, 0x18, 0x03, 0xff, 0x1f, 0xfc, 0x87, 0xff,
|
||||
0x08, 0x01, 0xfe, 0x3f, 0xfc, 0x0f, 0xff, 0x80, 0x01, 0xfc, 0x03, 0xf8, 0x1f, 0x77, 0xc0,
|
||||
0x01, 0xfc, 0x03, 0xf8, 0x3e, 0x73, 0xe0, 0x00, 0xff, 0xff, 0xf0, 0x7c, 0x71, 0xe0, 0x00,
|
||||
0x7f, 0xff, 0xf0, 0x78, 0x73, 0xc0, 0x00, 0x7f, 0xff, 0xe0, 0x30, 0x7f, 0x80, 0x00, 0x1f,
|
||||
0xff, 0xc0, 0x00, 0x7f, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x03, 0xfc,
|
||||
0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
const lv_image_dsc_t bluetooth_connected_2 = {
|
||||
.header =
|
||||
{
|
||||
.magic = LV_IMAGE_HEADER_MAGIC,
|
||||
.cf = LV_COLOR_FORMAT_I1,
|
||||
.w = 54,
|
||||
.h = 35,
|
||||
.stride = 7,
|
||||
},
|
||||
.data_size = sizeof(bluetooth_connected_2_map),
|
||||
.data = bluetooth_connected_2_map,
|
||||
};
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
#ifndef LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_3
|
||||
#define LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_3
|
||||
#endif
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_3 uint8_t
|
||||
bluetooth_connected_3_map[] = {
|
||||
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
|
||||
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
|
||||
|
||||
0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x03, 0xfc, 0x00, 0x00, 0x7f, 0x00,
|
||||
0x00, 0x0f, 0xff, 0x00, 0x30, 0x7f, 0x80, 0x00, 0x1f, 0xff, 0xc0, 0x78, 0x77, 0xc0, 0x00,
|
||||
0x7f, 0xff, 0xe0, 0x7c, 0x73, 0xe0, 0x00, 0x7f, 0xff, 0xf0, 0x3e, 0x71, 0xe0, 0x00, 0xff,
|
||||
0x9f, 0xf0, 0x1f, 0x73, 0xc0, 0x01, 0xfe, 0x07, 0xf8, 0x0f, 0xff, 0x80, 0x01, 0xfc, 0x03,
|
||||
0xf8, 0x87, 0xff, 0x08, 0x01, 0xfe, 0xe3, 0xfc, 0xc3, 0xfe, 0x18, 0x03, 0xff, 0xe3, 0xfc,
|
||||
0xe1, 0xfc, 0x38, 0x03, 0xff, 0x87, 0xfc, 0xf0, 0xf8, 0x78, 0x03, 0xff, 0x87, 0xfc, 0xf0,
|
||||
0xfc, 0x78, 0x03, 0xff, 0x83, 0xfc, 0xe1, 0xfe, 0x38, 0x03, 0xff, 0xf3, 0xfc, 0xc3, 0xff,
|
||||
0x18, 0x03, 0xfe, 0xf3, 0xfc, 0x87, 0xff, 0x88, 0x01, 0xfc, 0x63, 0xf8, 0x0f, 0xf7, 0xc0,
|
||||
0x01, 0xfe, 0x03, 0xf8, 0x1f, 0x73, 0xe0, 0x01, 0xff, 0x0f, 0xf8, 0x3e, 0x71, 0xe0, 0x00,
|
||||
0xff, 0xff, 0xf0, 0x7c, 0x73, 0xe0, 0x00, 0x7f, 0xff, 0xe0, 0x78, 0x77, 0xc0, 0x00, 0x3f,
|
||||
0xff, 0xe0, 0x30, 0x7f, 0x80, 0x00, 0x1f, 0xff, 0x80, 0x00, 0x7f, 0x00, 0x00, 0x0f, 0xff,
|
||||
0x00, 0x00, 0x7e, 0x00, 0x00, 0x01, 0xf8, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
const lv_image_dsc_t bluetooth_connected_3 = {
|
||||
.header =
|
||||
{
|
||||
.magic = LV_IMAGE_HEADER_MAGIC,
|
||||
.cf = LV_COLOR_FORMAT_I1,
|
||||
.w = 54,
|
||||
.h = 35,
|
||||
.stride = 7,
|
||||
},
|
||||
.data_size = sizeof(bluetooth_connected_3_map),
|
||||
.data = bluetooth_connected_3_map,
|
||||
};
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
#ifndef LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_4
|
||||
#define LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_4
|
||||
#endif
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_4 uint8_t
|
||||
bluetooth_connected_4_map[] = {
|
||||
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
|
||||
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
|
||||
|
||||
0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x01, 0xf8, 0x00, 0x00, 0x7f, 0x00,
|
||||
0x00, 0x07, 0xff, 0x00, 0x30, 0x7f, 0x80, 0x00, 0x1f, 0xff, 0x80, 0x78, 0x77, 0xc0, 0x00,
|
||||
0x3f, 0xff, 0xe0, 0x7c, 0x73, 0xe0, 0x00, 0x7f, 0xff, 0xe0, 0x3e, 0x71, 0xe0, 0x00, 0xff,
|
||||
0xff, 0xf0, 0x1f, 0x73, 0xc0, 0x00, 0xff, 0xcf, 0xf8, 0x0f, 0xff, 0x80, 0x01, 0xff, 0x8f,
|
||||
0xf8, 0x87, 0xff, 0x08, 0x01, 0xff, 0x0f, 0xf8, 0xc3, 0xfe, 0x18, 0x01, 0xff, 0x0f, 0xfc,
|
||||
0xe1, 0xfc, 0x38, 0x03, 0xfe, 0x4f, 0xfc, 0xf0, 0xf8, 0x78, 0x03, 0xfc, 0x4f, 0xfc, 0xf0,
|
||||
0xfc, 0x78, 0x03, 0xfc, 0xcf, 0xfc, 0xe1, 0xfe, 0x38, 0x03, 0xf8, 0xc7, 0xfc, 0xc3, 0xff,
|
||||
0x18, 0x01, 0xf8, 0x03, 0xfc, 0x87, 0xff, 0x88, 0x01, 0xf8, 0x03, 0xf8, 0x0f, 0xf7, 0xc0,
|
||||
0x01, 0xff, 0xcf, 0xf8, 0x1f, 0x73, 0xe0, 0x00, 0xff, 0xcf, 0xf8, 0x3e, 0x71, 0xe0, 0x00,
|
||||
0xff, 0xff, 0xf0, 0x7c, 0x73, 0xe0, 0x00, 0x7f, 0xff, 0xe0, 0x78, 0x77, 0xc0, 0x00, 0x3f,
|
||||
0xff, 0xe0, 0x30, 0x7f, 0x80, 0x00, 0x1f, 0xff, 0x80, 0x00, 0x7f, 0x00, 0x00, 0x0f, 0xff,
|
||||
0x00, 0x00, 0x7e, 0x00, 0x00, 0x01, 0xf8, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
const lv_image_dsc_t bluetooth_connected_4 = {
|
||||
.header =
|
||||
{
|
||||
.magic = LV_IMAGE_HEADER_MAGIC,
|
||||
.cf = LV_COLOR_FORMAT_I1,
|
||||
.w = 54,
|
||||
.h = 35,
|
||||
.stride = 7,
|
||||
},
|
||||
.data_size = sizeof(bluetooth_connected_4_map),
|
||||
.data = bluetooth_connected_4_map,
|
||||
};
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
#ifndef LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_5
|
||||
#define LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_5
|
||||
#endif
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_5 uint8_t
|
||||
bluetooth_connected_5_map[] = {
|
||||
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
|
||||
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
|
||||
|
||||
0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x01, 0xfc, 0x00, 0x00, 0x7f, 0x00,
|
||||
0x00, 0x0f, 0xff, 0x00, 0x30, 0x7f, 0x80, 0x00, 0x1f, 0xff, 0x80, 0x78, 0x77, 0xc0, 0x00,
|
||||
0x3f, 0xff, 0xe0, 0x7c, 0x73, 0xe0, 0x00, 0x7f, 0xff, 0xe0, 0x3e, 0x71, 0xe0, 0x00, 0xff,
|
||||
0xff, 0xf0, 0x1f, 0x73, 0xc0, 0x01, 0xfe, 0x07, 0xf8, 0x0f, 0xff, 0x80, 0x01, 0xfe, 0x07,
|
||||
0xf8, 0x87, 0xff, 0x08, 0x01, 0xfc, 0x7f, 0xf8, 0xc3, 0xfe, 0x18, 0x03, 0xfc, 0x7f, 0xfc,
|
||||
0xe1, 0xfc, 0x38, 0x03, 0xfc, 0x07, 0xfc, 0xf0, 0xf8, 0x78, 0x03, 0xfc, 0x03, 0xfc, 0xf0,
|
||||
0xfc, 0x78, 0x03, 0xff, 0x63, 0xfc, 0xe1, 0xfe, 0x38, 0x03, 0xff, 0xf3, 0xfc, 0xc3, 0xff,
|
||||
0x18, 0x03, 0xfe, 0xf3, 0xfc, 0x87, 0xff, 0x88, 0x01, 0xfc, 0x63, 0xf8, 0x0f, 0xf7, 0xc0,
|
||||
0x01, 0xfe, 0x07, 0xf8, 0x1e, 0x73, 0xc0, 0x00, 0xff, 0x0f, 0xf8, 0x3c, 0x71, 0xe0, 0x00,
|
||||
0xff, 0xff, 0xf0, 0x7c, 0x73, 0xe0, 0x00, 0x7f, 0xff, 0xe0, 0x78, 0x77, 0xc0, 0x00, 0x3f,
|
||||
0xff, 0xc0, 0x30, 0x7f, 0x80, 0x00, 0x1f, 0xff, 0x80, 0x00, 0x7f, 0x00, 0x00, 0x0f, 0xff,
|
||||
0x00, 0x00, 0x7e, 0x00, 0x00, 0x01, 0xf8, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
const lv_image_dsc_t bluetooth_connected_5 = {
|
||||
.header =
|
||||
{
|
||||
.magic = LV_IMAGE_HEADER_MAGIC,
|
||||
.cf = LV_COLOR_FORMAT_I1,
|
||||
.w = 54,
|
||||
.h = 35,
|
||||
.stride = 7,
|
||||
},
|
||||
.data_size = sizeof(bluetooth_connected_5_map),
|
||||
.data = bluetooth_connected_5_map,
|
||||
};
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_RIGHT
|
||||
#define LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_RIGHT
|
||||
#endif
|
||||
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_RIGHT
|
||||
uint8_t bluetooth_connected_right_map[] = {
|
||||
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
|
||||
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
|
||||
|
||||
0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 0x3f, 0x80,
|
||||
0x00, 0x0f, 0xfe, 0x00, 0x10, 0x3f, 0xc0, 0x00, 0x3f, 0xff, 0x80, 0x38, 0x3b, 0xe0, 0x00,
|
||||
0x7f, 0xff, 0xc0, 0x7c, 0x39, 0xf0, 0x00, 0xff, 0xff, 0xe0, 0x3e, 0x38, 0xf0, 0x01, 0xff,
|
||||
0xff, 0xf0, 0x1f, 0x39, 0xe0, 0x01, 0xff, 0xfe, 0x30, 0x0f, 0xbb, 0xc0, 0x03, 0xff, 0xfc,
|
||||
0x38, 0x87, 0xff, 0x84, 0x03, 0xff, 0xf8, 0x38, 0xc3, 0xff, 0x0c, 0x07, 0xff, 0xf0, 0x3c,
|
||||
0xe1, 0xfe, 0x1c, 0x07, 0xcf, 0xe0, 0x7c, 0xf0, 0xfc, 0x3c, 0x07, 0x87, 0xc0, 0xfc, 0xf0,
|
||||
0xfc, 0x3c, 0x07, 0x83, 0x81, 0xfc, 0xe1, 0xfe, 0x1c, 0x07, 0x81, 0x03, 0xfc, 0xc3, 0xff,
|
||||
0x0c, 0x07, 0xc0, 0x07, 0xfc, 0x87, 0xff, 0x84, 0x07, 0xe0, 0x0f, 0xfc, 0x0f, 0xbb, 0xc0,
|
||||
0x03, 0xf0, 0x1f, 0xf8, 0x1f, 0x39, 0xe0, 0x03, 0xf8, 0x3f, 0xf8, 0x3e, 0x38, 0xf0, 0x01,
|
||||
0xfc, 0xff, 0xf0, 0x7c, 0x39, 0xf0, 0x01, 0xff, 0xff, 0xf0, 0x38, 0x3b, 0xe0, 0x00, 0xff,
|
||||
0xff, 0xe0, 0x10, 0x3f, 0xc0, 0x00, 0x7f, 0xff, 0xc0, 0x00, 0x3f, 0x80, 0x00, 0x3f, 0xff,
|
||||
0x80, 0x00, 0x3f, 0x00, 0x00, 0x0f, 0xfe, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x03, 0xf8, 0x00,
|
||||
0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
const lv_image_dsc_t bluetooth_connected_right = {
|
||||
.header =
|
||||
{
|
||||
.magic = LV_IMAGE_HEADER_MAGIC,
|
||||
.cf = LV_COLOR_FORMAT_I1,
|
||||
.w = 54,
|
||||
.h = 35,
|
||||
.stride = 7,
|
||||
},
|
||||
.data_size = sizeof(bluetooth_connected_right_map),
|
||||
.data = bluetooth_connected_right_map,
|
||||
};
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_BLUETOOTH_DISCONNECTED_RIGHT
|
||||
#define LV_ATTRIBUTE_IMG_BLUETOOTH_DISCONNECTED_RIGHT
|
||||
#endif
|
||||
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BLUETOOTH_DISCONNECTED_RIGHT
|
||||
uint8_t bluetooth_disconnected_right_map[] = {
|
||||
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
|
||||
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
|
||||
|
||||
0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 0x3f, 0x80,
|
||||
0x00, 0x0f, 0xfe, 0x00, 0x10, 0x3f, 0xc0, 0x00, 0x3f, 0xff, 0x80, 0x38, 0x3b, 0xe0, 0x00,
|
||||
0x7f, 0xff, 0xc0, 0x7c, 0x39, 0xf0, 0x00, 0xff, 0xff, 0xe0, 0x3e, 0x38, 0xf0, 0x01, 0xff,
|
||||
0xff, 0xf0, 0x1f, 0x39, 0xe0, 0x01, 0xe3, 0xf8, 0xf0, 0x0f, 0xbb, 0xc0, 0x03, 0xe1, 0xf0,
|
||||
0xf8, 0x07, 0xff, 0x80, 0x03, 0xe0, 0xe0, 0xf8, 0x03, 0xff, 0x00, 0x07, 0xf0, 0x01, 0xfc,
|
||||
0x01, 0xfe, 0x00, 0x07, 0xf8, 0x03, 0xfc, 0x00, 0xfc, 0x00, 0x07, 0xfc, 0x07, 0xfc, 0x00,
|
||||
0xfc, 0x00, 0x07, 0xfc, 0x07, 0xfc, 0x01, 0xfe, 0x00, 0x07, 0xfc, 0x07, 0xfc, 0x03, 0xff,
|
||||
0x00, 0x07, 0xf8, 0x03, 0xfc, 0x07, 0xff, 0x80, 0x07, 0xf0, 0x01, 0xfc, 0x0f, 0xbb, 0xc0,
|
||||
0x03, 0xe0, 0xe0, 0xf8, 0x1f, 0x39, 0xe0, 0x03, 0xe1, 0xf0, 0xf8, 0x3e, 0x38, 0xf0, 0x01,
|
||||
0xe3, 0xf8, 0xf0, 0x7c, 0x39, 0xf0, 0x01, 0xff, 0xff, 0xf0, 0x38, 0x3b, 0xe0, 0x00, 0xff,
|
||||
0xff, 0xe0, 0x10, 0x3f, 0xc0, 0x00, 0x7f, 0xff, 0xc0, 0x00, 0x3f, 0x80, 0x00, 0x3f, 0xff,
|
||||
0x80, 0x00, 0x3f, 0x00, 0x00, 0x0f, 0xfe, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x03, 0xf8, 0x00,
|
||||
0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
const lv_image_dsc_t bluetooth_disconnected_right = {
|
||||
.header =
|
||||
{
|
||||
.magic = LV_IMAGE_HEADER_MAGIC,
|
||||
.cf = LV_COLOR_FORMAT_I1,
|
||||
.w = 54,
|
||||
.h = 35,
|
||||
.stride = 7,
|
||||
},
|
||||
.data_size = sizeof(bluetooth_disconnected_right_map),
|
||||
.data = bluetooth_disconnected_right_map,
|
||||
};
|
||||
48
app/boards/lowprokb/corneish_zen/widgets/icons/layers.c
Normal file
48
app/boards/lowprokb/corneish_zen/widgets/icons/layers.c
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_LAYERS
|
||||
#define LV_ATTRIBUTE_IMG_LAYERS
|
||||
#endif
|
||||
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_LAYERS uint8_t
|
||||
layers_map[] = {
|
||||
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
|
||||
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
|
||||
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00,
|
||||
0x00, 0x07, 0xfc, 0x00, 0x00, 0x00, 0x1f, 0xff, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xc0, 0x00,
|
||||
0x01, 0xff, 0xff, 0xf0, 0x00, 0x07, 0xff, 0xff, 0xfc, 0x00, 0x1f, 0xff, 0xff, 0xff, 0x00,
|
||||
0x3f, 0xff, 0xff, 0xff, 0x80, 0x1f, 0xff, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xff, 0xfe, 0x00,
|
||||
0x01, 0xff, 0xff, 0xf0, 0x00, 0x00, 0xff, 0xff, 0xe0, 0x00, 0x07, 0x9f, 0xff, 0x3c, 0x00,
|
||||
0x1e, 0x07, 0xfc, 0x0f, 0x00, 0x38, 0x01, 0xe0, 0x03, 0x80, 0x30, 0x00, 0x00, 0x01, 0x80,
|
||||
0x38, 0x00, 0x00, 0x03, 0x80, 0x0e, 0x00, 0x00, 0x0e, 0x00, 0x03, 0xc0, 0x00, 0x78, 0x00,
|
||||
0x01, 0xf0, 0x01, 0xf0, 0x00, 0x07, 0xfc, 0x07, 0xfc, 0x00, 0x1f, 0xff, 0x1f, 0xff, 0x00,
|
||||
0x3f, 0xff, 0xff, 0xff, 0x80, 0x3f, 0xff, 0xff, 0xff, 0x80, 0x1f, 0xff, 0xff, 0xff, 0x00,
|
||||
0x07, 0xff, 0xff, 0xfc, 0x00, 0x00, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x3f, 0xff, 0x80, 0x00,
|
||||
0x00, 0x0f, 0xfe, 0x00, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
const lv_image_dsc_t layers = {
|
||||
.header =
|
||||
{
|
||||
.magic = LV_IMAGE_HEADER_MAGIC,
|
||||
.cf = LV_COLOR_FORMAT_I1,
|
||||
.w = 35,
|
||||
.h = 35,
|
||||
.stride = 5,
|
||||
},
|
||||
.data_size = sizeof(layers_map),
|
||||
.data = layers_map,
|
||||
};
|
||||
44
app/boards/lowprokb/corneish_zen/widgets/icons/layers2.c
Normal file
44
app/boards/lowprokb/corneish_zen/widgets/icons/layers2.c
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_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_image_dsc_t layers2 = {
|
||||
.header =
|
||||
{
|
||||
.magic = LV_IMAGE_HEADER_MAGIC,
|
||||
.cf = LV_COLOR_FORMAT_I1,
|
||||
.w = 78,
|
||||
.h = 12,
|
||||
.stride = 10,
|
||||
},
|
||||
.data_size = sizeof(layers2_map),
|
||||
.data = layers2_map,
|
||||
};
|
||||
62
app/boards/lowprokb/corneish_zen/widgets/icons/zenlogo.c
Normal file
62
app/boards/lowprokb/corneish_zen/widgets/icons/zenlogo.c
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_ZENLOGO
|
||||
#define LV_ATTRIBUTE_IMG_ZENLOGO
|
||||
#endif
|
||||
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_ZENLOGO uint8_t
|
||||
zenlogo_map[] = {
|
||||
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
|
||||
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
|
||||
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0xe3, 0xe3, 0x9e,
|
||||
0x3e, 0x02, 0x72, 0xe0, 0x00, 0x00, 0x06, 0x36, 0x36, 0x33, 0x63, 0x02, 0x8b, 0x10, 0x00,
|
||||
0x00, 0x04, 0x14, 0x14, 0x21, 0x41, 0x02, 0x82, 0x10, 0x00, 0x00, 0x04, 0x04, 0x14, 0x21,
|
||||
0x7f, 0x7a, 0x72, 0x10, 0x00, 0x00, 0x04, 0x04, 0x14, 0x21, 0x40, 0x02, 0x0a, 0x10, 0x00,
|
||||
0x00, 0x04, 0x14, 0x14, 0x21, 0x41, 0x02, 0x0a, 0x10, 0x00, 0x00, 0x06, 0x36, 0x34, 0x21,
|
||||
0x63, 0x02, 0x8a, 0x10, 0x00, 0x00, 0x03, 0xe3, 0xe4, 0x21, 0x3e, 0x02, 0x72, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x03, 0xfc,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 0x00, 0xff, 0xf1,
|
||||
0xf8, 0x00, 0x60, 0x0f, 0xc0, 0x00, 0x00, 0x0f, 0xff, 0xfb, 0xff, 0xe0, 0xf8, 0x1f, 0x80,
|
||||
0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xc1, 0xfc, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xc1, 0xfc, 0x1f, 0x00, 0x7f, 0xc0, 0x1f, 0xff, 0xff, 0xe0, 0x01, 0xfc, 0x3e, 0x00,
|
||||
0x40, 0x1f, 0xff, 0xe0, 0xff, 0xc0, 0x07, 0xfc, 0xfc, 0x00, 0xdf, 0xff, 0x80, 0x01, 0xff,
|
||||
0xc0, 0x0f, 0xdc, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x8f, 0x1f, 0x9f, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x1f, 0xef, 0xff, 0x1f, 0x9f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x8f,
|
||||
0xff, 0x3f, 0x1f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f, 0xfe, 0x3f, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x03, 0xf8, 0x1f, 0x80, 0x7e, 0x0f, 0xe0, 0x00, 0x00, 0x00, 0x07, 0xe0, 0x3e,
|
||||
0x00, 0x7e, 0x0f, 0xe0, 0x00, 0x00, 0x00, 0x0f, 0xc0, 0x3c, 0x00, 0x7e, 0x0f, 0xc0, 0x00,
|
||||
0x00, 0x00, 0x1f, 0xf8, 0x3c, 0x00, 0x78, 0x0f, 0xc0, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xbc,
|
||||
0x00, 0x78, 0x0f, 0xc0, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xfc, 0x00, 0xf8, 0x0f, 0xc0, 0x00,
|
||||
0x00, 0x00, 0x1f, 0xff, 0xfc, 0x0f, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff,
|
||||
0xff, 0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x0f, 0xff, 0xa0, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
const lv_image_dsc_t zenlogo = {
|
||||
.header =
|
||||
{
|
||||
.magic = LV_IMAGE_HEADER_MAGIC,
|
||||
.cf = LV_COLOR_FORMAT_I1,
|
||||
.w = 80,
|
||||
.h = 38,
|
||||
.stride = 10,
|
||||
},
|
||||
.data_size = sizeof(zenlogo_map),
|
||||
.data = zenlogo_map,
|
||||
};
|
||||
68
app/boards/lowprokb/corneish_zen/widgets/layer_status.c
Normal file
68
app/boards/lowprokb/corneish_zen/widgets/layer_status.c
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <zephyr/kernel.h>
|
||||
#include <zephyr/logging/log.h>
|
||||
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
||||
|
||||
#include <zmk/display.h>
|
||||
#include "layer_status.h"
|
||||
#include <zmk/events/layer_state_changed.h>
|
||||
#include <zmk/event_manager.h>
|
||||
#include <zmk/endpoints.h>
|
||||
#include <zmk/keymap.h>
|
||||
|
||||
static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets);
|
||||
|
||||
struct layer_status_state {
|
||||
zmk_keymap_layer_index_t index;
|
||||
const char *label;
|
||||
};
|
||||
|
||||
static void set_layer_symbol(lv_obj_t *label, struct layer_status_state state) {
|
||||
const char *layer_label = state.label;
|
||||
zmk_keymap_layer_index_t active_layer_index = state.index;
|
||||
|
||||
if (layer_label == NULL || strlen(layer_label) == 0) {
|
||||
char text[6] = {};
|
||||
|
||||
sprintf(text, " %i", active_layer_index);
|
||||
|
||||
lv_label_set_text(label, text);
|
||||
} else {
|
||||
lv_label_set_text(label, layer_label);
|
||||
}
|
||||
}
|
||||
|
||||
static void layer_status_update_cb(struct layer_status_state state) {
|
||||
struct zmk_widget_layer_status *widget;
|
||||
SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_layer_symbol(widget->obj, state); }
|
||||
}
|
||||
|
||||
static struct layer_status_state layer_status_get_state(const zmk_event_t *eh) {
|
||||
zmk_keymap_layer_index_t index = zmk_keymap_highest_layer_active();
|
||||
return (struct layer_status_state){
|
||||
.index = index, .label = zmk_keymap_layer_name(zmk_keymap_layer_index_to_id(index))};
|
||||
}
|
||||
|
||||
ZMK_DISPLAY_WIDGET_LISTENER(widget_layer_status, struct layer_status_state, layer_status_update_cb,
|
||||
layer_status_get_state)
|
||||
|
||||
ZMK_SUBSCRIPTION(widget_layer_status, zmk_layer_state_changed);
|
||||
|
||||
int zmk_widget_layer_status_init(struct zmk_widget_layer_status *widget, lv_obj_t *parent) {
|
||||
widget->obj = lv_label_create(parent);
|
||||
|
||||
sys_slist_append(&widgets, &widget->node);
|
||||
|
||||
widget_layer_status_init();
|
||||
return 0;
|
||||
}
|
||||
|
||||
lv_obj_t *zmk_widget_layer_status_obj(struct zmk_widget_layer_status *widget) {
|
||||
return widget->obj;
|
||||
}
|
||||
19
app/boards/lowprokb/corneish_zen/widgets/layer_status.h
Normal file
19
app/boards/lowprokb/corneish_zen/widgets/layer_status.h
Normal file
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <lvgl.h>
|
||||
#include <zephyr/kernel.h>
|
||||
|
||||
struct zmk_widget_layer_status {
|
||||
sys_snode_t node;
|
||||
lv_obj_t *obj;
|
||||
};
|
||||
|
||||
int zmk_widget_layer_status_init(struct zmk_widget_layer_status *widget, lv_obj_t *parent);
|
||||
lv_obj_t *zmk_widget_layer_status_obj(struct zmk_widget_layer_status *widget);
|
||||
131
app/boards/lowprokb/corneish_zen/widgets/output_status.c
Normal file
131
app/boards/lowprokb/corneish_zen/widgets/output_status.c
Normal file
@@ -0,0 +1,131 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <zephyr/kernel.h>
|
||||
#include <zephyr/bluetooth/services/bas.h>
|
||||
|
||||
#include <zephyr/logging/log.h>
|
||||
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
||||
|
||||
#include <zmk/display.h>
|
||||
#include "output_status.h"
|
||||
#include <zmk/event_manager.h>
|
||||
#include <zmk/events/ble_active_profile_changed.h>
|
||||
#include <zmk/events/endpoint_changed.h>
|
||||
#include <zmk/usb.h>
|
||||
#include <zmk/ble.h>
|
||||
#include <zmk/endpoints.h>
|
||||
|
||||
LV_IMG_DECLARE(bluetooth_advertising);
|
||||
LV_IMG_DECLARE(bluetooth_connected_right);
|
||||
LV_IMG_DECLARE(bluetooth_disconnected_right);
|
||||
LV_IMG_DECLARE(bluetooth_connected_1);
|
||||
LV_IMG_DECLARE(bluetooth_connected_2);
|
||||
LV_IMG_DECLARE(bluetooth_connected_3);
|
||||
LV_IMG_DECLARE(bluetooth_connected_4);
|
||||
LV_IMG_DECLARE(bluetooth_connected_5);
|
||||
LV_IMG_DECLARE(bluetooth_advertising_1);
|
||||
LV_IMG_DECLARE(bluetooth_advertising_2);
|
||||
LV_IMG_DECLARE(bluetooth_advertising_3);
|
||||
LV_IMG_DECLARE(bluetooth_advertising_4);
|
||||
LV_IMG_DECLARE(bluetooth_advertising_5);
|
||||
LV_IMG_DECLARE(USB_connected);
|
||||
|
||||
static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets);
|
||||
|
||||
struct output_status_state {
|
||||
struct zmk_endpoint_instance selected_endpoint;
|
||||
bool active_profile_connected;
|
||||
bool active_profile_bonded;
|
||||
};
|
||||
|
||||
static struct output_status_state get_state(const zmk_event_t *_eh) {
|
||||
return (struct output_status_state){
|
||||
.selected_endpoint = zmk_endpoints_selected(),
|
||||
.active_profile_connected = zmk_ble_active_profile_is_connected(),
|
||||
.active_profile_bonded = !zmk_ble_active_profile_is_open(),
|
||||
};
|
||||
}
|
||||
|
||||
static void set_status_symbol(lv_obj_t *icon, struct output_status_state state) {
|
||||
switch (state.selected_endpoint.transport) {
|
||||
case ZMK_TRANSPORT_USB:
|
||||
lv_image_set_src(icon, &USB_connected);
|
||||
break;
|
||||
case ZMK_TRANSPORT_BLE:
|
||||
if (state.active_profile_bonded) {
|
||||
if (state.active_profile_connected) {
|
||||
// sprintf(text, LV_SYMBOL_BLUETOOTH "%i " LV_SYMBOL_OK, active_profile_index);
|
||||
switch (state.selected_endpoint.ble.profile_index) {
|
||||
case 0:
|
||||
lv_image_set_src(icon, &bluetooth_connected_1);
|
||||
break;
|
||||
case 1:
|
||||
lv_image_set_src(icon, &bluetooth_connected_2);
|
||||
break;
|
||||
case 2:
|
||||
lv_image_set_src(icon, &bluetooth_connected_3);
|
||||
break;
|
||||
case 3:
|
||||
lv_image_set_src(icon, &bluetooth_connected_4);
|
||||
break;
|
||||
case 4:
|
||||
lv_image_set_src(icon, &bluetooth_connected_5);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
lv_image_set_src(icon, &bluetooth_disconnected_right);
|
||||
}
|
||||
} else {
|
||||
switch (state.selected_endpoint.ble.profile_index) {
|
||||
case 0:
|
||||
lv_image_set_src(icon, &bluetooth_advertising_1);
|
||||
break;
|
||||
case 1:
|
||||
lv_image_set_src(icon, &bluetooth_advertising_2);
|
||||
break;
|
||||
case 2:
|
||||
lv_image_set_src(icon, &bluetooth_advertising_3);
|
||||
break;
|
||||
case 3:
|
||||
lv_image_set_src(icon, &bluetooth_advertising_4);
|
||||
break;
|
||||
case 4:
|
||||
lv_image_set_src(icon, &bluetooth_advertising_5);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void output_status_update_cb(struct output_status_state state) {
|
||||
struct zmk_widget_output_status *widget;
|
||||
SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_status_symbol(widget->obj, state); }
|
||||
}
|
||||
|
||||
ZMK_DISPLAY_WIDGET_LISTENER(widget_output_status, struct output_status_state,
|
||||
output_status_update_cb, get_state)
|
||||
ZMK_SUBSCRIPTION(widget_output_status, zmk_endpoint_changed);
|
||||
// We don't get an endpoint changed event when the active profile connects/disconnects
|
||||
// but there wasn't another endpoint to switch from/to, so update on BLE events too.
|
||||
#if defined(CONFIG_ZMK_BLE)
|
||||
ZMK_SUBSCRIPTION(widget_output_status, zmk_ble_active_profile_changed);
|
||||
#endif
|
||||
|
||||
int zmk_widget_output_status_init(struct zmk_widget_output_status *widget, lv_obj_t *parent) {
|
||||
widget->obj = lv_image_create(parent);
|
||||
|
||||
sys_slist_append(&widgets, &widget->node);
|
||||
|
||||
widget_output_status_init();
|
||||
return 0;
|
||||
}
|
||||
|
||||
lv_obj_t *zmk_widget_output_status_obj(struct zmk_widget_output_status *widget) {
|
||||
return widget->obj;
|
||||
}
|
||||
19
app/boards/lowprokb/corneish_zen/widgets/output_status.h
Normal file
19
app/boards/lowprokb/corneish_zen/widgets/output_status.h
Normal file
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <lvgl.h>
|
||||
#include <zephyr/kernel.h>
|
||||
|
||||
struct zmk_widget_output_status {
|
||||
sys_snode_t node;
|
||||
lv_obj_t *obj;
|
||||
};
|
||||
|
||||
int zmk_widget_output_status_init(struct zmk_widget_output_status *widget, lv_obj_t *parent);
|
||||
lv_obj_t *zmk_widget_output_status_obj(struct zmk_widget_output_status *widget);
|
||||
60
app/boards/lowprokb/corneish_zen/widgets/peripheral_status.c
Normal file
60
app/boards/lowprokb/corneish_zen/widgets/peripheral_status.c
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <zephyr/kernel.h>
|
||||
|
||||
#include <zephyr/logging/log.h>
|
||||
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
||||
|
||||
#include <zmk/display.h>
|
||||
#include "peripheral_status.h"
|
||||
#include <zmk/event_manager.h>
|
||||
#include <zmk/split/bluetooth/peripheral.h>
|
||||
#include <zmk/events/split_peripheral_status_changed.h>
|
||||
|
||||
LV_IMG_DECLARE(bluetooth_connected_right);
|
||||
LV_IMG_DECLARE(bluetooth_disconnected_right);
|
||||
|
||||
static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets);
|
||||
|
||||
struct peripheral_status_state {
|
||||
bool connected;
|
||||
};
|
||||
|
||||
static struct peripheral_status_state get_state(const zmk_event_t *_eh) {
|
||||
return (struct peripheral_status_state){.connected = zmk_split_bt_peripheral_is_connected()};
|
||||
}
|
||||
|
||||
static void set_status_symbol(lv_obj_t *icon, struct peripheral_status_state state) {
|
||||
LOG_DBG("halves connected? %s", state.connected ? "true" : "false");
|
||||
|
||||
lv_image_set_src(icon,
|
||||
state.connected ? &bluetooth_connected_right : &bluetooth_disconnected_right);
|
||||
}
|
||||
|
||||
static void output_status_update_cb(struct peripheral_status_state state) {
|
||||
struct zmk_widget_peripheral_status *widget;
|
||||
SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_status_symbol(widget->obj, state); }
|
||||
}
|
||||
|
||||
ZMK_DISPLAY_WIDGET_LISTENER(widget_peripheral_status, struct peripheral_status_state,
|
||||
output_status_update_cb, get_state)
|
||||
ZMK_SUBSCRIPTION(widget_peripheral_status, zmk_split_peripheral_status_changed);
|
||||
|
||||
int zmk_widget_peripheral_status_init(struct zmk_widget_peripheral_status *widget,
|
||||
lv_obj_t *parent) {
|
||||
widget->obj = lv_image_create(parent);
|
||||
|
||||
sys_slist_append(&widgets, &widget->node);
|
||||
|
||||
widget_peripheral_status_init();
|
||||
return 0;
|
||||
}
|
||||
|
||||
lv_obj_t *zmk_widget_peripheral_status_obj(struct zmk_widget_peripheral_status *widget) {
|
||||
return widget->obj;
|
||||
}
|
||||
20
app/boards/lowprokb/corneish_zen/widgets/peripheral_status.h
Normal file
20
app/boards/lowprokb/corneish_zen/widgets/peripheral_status.h
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <lvgl.h>
|
||||
#include <zephyr/kernel.h>
|
||||
|
||||
struct zmk_widget_peripheral_status {
|
||||
sys_snode_t node;
|
||||
lv_obj_t *obj;
|
||||
};
|
||||
|
||||
int zmk_widget_peripheral_status_init(struct zmk_widget_peripheral_status *widget,
|
||||
lv_obj_t *parent);
|
||||
lv_obj_t *zmk_widget_peripheral_status_obj(struct zmk_widget_peripheral_status *widget);
|
||||
Reference in New Issue
Block a user