Update LVGL. Freeze async_utils.py. Take lvstm32.py from binding
This commit is contained in:
parent
b1276905f1
commit
b1aac13b49
@ -1 +1 @@
|
||||
Subproject commit 3b4a908cb489cd32682c5b4ba6f79112ce3c44a1
|
||||
Subproject commit a4927dd0b4ba4cb5a047a29c93f97881d1eb6d6d
|
||||
1
ports/esp32/modules/async_utils.py
Symbolic link
1
ports/esp32/modules/async_utils.py
Symbolic link
@ -0,0 +1 @@
|
||||
../../../lib/lv_bindings/lib/async_utils.py
|
||||
1
ports/stm32/modules/async_utils.py
Symbolic link
1
ports/stm32/modules/async_utils.py
Symbolic link
@ -0,0 +1 @@
|
||||
../../../lib/lv_bindings/lib/async_utils.py
|
||||
@ -1,25 +0,0 @@
|
||||
# Module for advancing tick count and scheduling async event for lvgl on STM32.
|
||||
# Import after lvgl module.
|
||||
#
|
||||
# MIT license; Copyright (c) 2020 Amir Gonnen
|
||||
|
||||
import lvgl as lv
|
||||
import micropython
|
||||
import pyb
|
||||
|
||||
class lvstm32():
|
||||
def __init__(self, freq=25, timer_id=4):
|
||||
self.task_handler_ref = self.task_handler # Allocation occurs here
|
||||
self.delay = 1000 // freq
|
||||
tim = pyb.Timer(timer_id)
|
||||
tim.init(freq=freq)
|
||||
tim.callback(self.timer_cb)
|
||||
|
||||
def task_handler(self, _):
|
||||
lv.task_handler()
|
||||
|
||||
def timer_cb(self, t):
|
||||
lv.tick_inc(self.delay)
|
||||
# Passing self.task_handler would cause allocation.
|
||||
micropython.schedule(self.task_handler_ref, 0)
|
||||
|
||||
1
ports/stm32/modules/lvstm32.py
Symbolic link
1
ports/stm32/modules/lvstm32.py
Symbolic link
@ -0,0 +1 @@
|
||||
../../../lib/lv_bindings/driver/stm32/lvstm32.py
|
||||
Loading…
x
Reference in New Issue
Block a user