Skip to content

Commit

Permalink
Apply review
Browse files Browse the repository at this point in the history
  • Loading branch information
Jpe230 committed Sep 27, 2022
1 parent 4bf554e commit 9336329
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 9 deletions.
5 changes: 5 additions & 0 deletions keyboards/handwired/onekey/keymaps/lvgl/config.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright 2022 Jose Pablo Ramirez (@jpe230)
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

/* SPI pins */
#define SPI_DRIVER SPID0
#define SPI_SCK_PIN GP18
Expand Down
3 changes: 3 additions & 0 deletions keyboards/handwired/onekey/keymaps/lvgl/halconf.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2022 Jose Pablo Ramirez (@jpe230)
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include_next <halconf.h>
Expand Down
3 changes: 3 additions & 0 deletions keyboards/handwired/onekey/keymaps/lvgl/keymap.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2022 Jose Pablo Ramirez (@jpe230)
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H
#include "qp.h"

Expand Down
3 changes: 3 additions & 0 deletions keyboards/handwired/onekey/keymaps/lvgl/mcuconf.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2022 Jose Pablo Ramirez (@jpe230)
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include_next <mcuconf.h>
Expand Down
12 changes: 3 additions & 9 deletions quantum/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,9 @@ int main(void) {
protocol_task();

#ifdef QUANTUM_PAINTER_ENABLE
// Run Quantum Painter animations
void qp_internal_animation_tick(void);
qp_internal_animation_tick();

# ifdef QUANTUM_PAINTER_LVGL_INTEGRATION_ENABLE
// Run LVGL ticks
void qp_lvgl_internal_tick(void);
qp_lvgl_internal_tick();
# endif
// Run Quantum Painter task
void qp_internal_task(void);
qp_internal_task();
#endif

#ifdef DEFERRED_EXEC_ENABLE
Expand Down
12 changes: 12 additions & 0 deletions quantum/painter/qp_draw_image.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,3 +399,15 @@ void qp_internal_animation_tick(void) {
static uint32_t last_anim_exec = 0;
deferred_exec_advanced_task(animation_executors, QUANTUM_PAINTER_CONCURRENT_ANIMATIONS, &last_anim_exec);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Quantum Painter Core API: qp_internal_task

void qp_internal_task(void) {
qp_internal_animation_tick();
#ifdef QUANTUM_PAINTER_LVGL_INTEGRATION_ENABLE
// Run LVGL ticks
void qp_lvgl_internal_tick(void);
qp_lvgl_internal_tick();
#endif
}

0 comments on commit 9336329

Please sign in to comment.