Update LVGL. Freeze async_utils.py. Take lvstm32.py from binding

This commit is contained in:
Amir Gonnen 2020-10-28 00:15:31 +02:00
parent b1276905f1
commit b1aac13b49
4 changed files with 4 additions and 26 deletions

@ -1 +1 @@
Subproject commit 3b4a908cb489cd32682c5b4ba6f79112ce3c44a1
Subproject commit a4927dd0b4ba4cb5a047a29c93f97881d1eb6d6d

View File

@ -0,0 +1 @@
../../../lib/lv_bindings/lib/async_utils.py

View File

@ -0,0 +1 @@
../../../lib/lv_bindings/lib/async_utils.py

View File

@ -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)

View File

@ -0,0 +1 @@
../../../lib/lv_bindings/driver/stm32/lvstm32.py