fix some stuff
This commit is contained in:
parent
8a2543403b
commit
0150764ed3
2 changed files with 6 additions and 60 deletions
12
.github/workflows/build.yml
vendored
12
.github/workflows/build.yml
vendored
|
@ -3,12 +3,12 @@ name: Build
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/build.yml'
|
- ".github/workflows/build.yml"
|
||||||
- 'app/**'
|
- "app/**"
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/build.yml'
|
- ".github/workflows/build.yml"
|
||||||
- 'app/**'
|
- "app/**"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
@ -62,7 +62,7 @@ jobs:
|
||||||
- tidbit
|
- tidbit
|
||||||
- helix_4_left
|
- helix_4_left
|
||||||
- helix_4_right
|
- helix_4_right
|
||||||
cmake-args: ['']
|
cmake-args: [""]
|
||||||
include:
|
include:
|
||||||
- board: bdn9_rev2
|
- board: bdn9_rev2
|
||||||
- board: dz60rgb_rev1
|
- board: dz60rgb_rev1
|
||||||
|
@ -126,7 +126,7 @@ jobs:
|
||||||
if: ${{ !matrix.skip-archive }}
|
if: ${{ !matrix.skip-archive }}
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: '${{ steps.variables.outputs.artifact-name }}'
|
name: "${{ steps.variables.outputs.artifact-name }}"
|
||||||
path: |
|
path: |
|
||||||
build/zephyr/zmk.hex
|
build/zephyr/zmk.hex
|
||||||
build/zephyr/zmk.uf2
|
build/zephyr/zmk.uf2
|
||||||
|
|
|
@ -1,54 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2020 The ZMK Contributors
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <init.h>
|
|
||||||
#include <device.h>
|
|
||||||
#include <devicetree.h>
|
|
||||||
|
|
||||||
#include <logging/log.h>
|
|
||||||
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
|
||||||
|
|
||||||
#include <drivers/display.h>
|
|
||||||
#include <lvgl.h>
|
|
||||||
|
|
||||||
#define ZMK_DISPLAY_NAME CONFIG_LVGL_DISPLAY_DEV_NAME
|
|
||||||
|
|
||||||
static struct device *display;
|
|
||||||
|
|
||||||
static lv_obj_t *screen;
|
|
||||||
|
|
||||||
int zmk_display_init() {
|
|
||||||
lv_obj_t *hello_world_label;
|
|
||||||
lv_obj_t *count_label;
|
|
||||||
|
|
||||||
LOG_DBG("");
|
|
||||||
|
|
||||||
display = device_get_binding(ZMK_DISPLAY_NAME);
|
|
||||||
if (display == NULL) {
|
|
||||||
LOG_ERR("Failed to find display device");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
screen = lv_obj_create(NULL, NULL);
|
|
||||||
lv_scr_load(screen);
|
|
||||||
|
|
||||||
hello_world_label = lv_label_create(lv_scr_act(), NULL);
|
|
||||||
lv_label_set_text(hello_world_label, "ZMK v0.1.0");
|
|
||||||
lv_obj_align(hello_world_label, NULL, LV_ALIGN_CENTER, 0, 0);
|
|
||||||
count_label = lv_label_create(lv_scr_act(), NULL);
|
|
||||||
lv_label_set_text(count_label, CONFIG_ZMK_KEYBOARD_NAME);
|
|
||||||
lv_obj_align(count_label, NULL, LV_ALIGN_IN_BOTTOM_MID, 0, 0);
|
|
||||||
lv_task_handler();
|
|
||||||
display_blanking_off(display);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void zmk_display_task_handler() {
|
|
||||||
lv_tick_inc(10);
|
|
||||||
lv_task_handler();
|
|
||||||
k_sleep(K_MSEC(10));
|
|
||||||
}
|
|
Loading…
Add table
Reference in a new issue