Commit graph

7 commits

Author SHA1 Message Date
Nathan Collins
fe711aad10 Zephyr: don't block main thread with animations
Make sure we sleep, even if there are animations. Previously we would
spin the event loop forever once an animation started.

Ideally we need some slint API to get the duration until the next
animation tick.
2024-07-08 16:46:33 +02:00
Nathan Collins
43ea064207 Zephyr: handle touch events
Define a simple callback to handle touch events from Zephyr. We expect
an input_sdl_touch device to exist in the device tree. This is a fairly
simple implementation as a proof of concept.

The default behaviour of Zephyr (as configured) is to handle inputs in a
separate thread. Each `input_event` describes a specific change, with the
`sync` member specifying when the event has reached a stable state. We
use slint::invoke_from_event_loop to dispatch the slint event in the
main thread.
2024-07-08 16:46:33 +02:00
Nathan Collins
c32b941f62 Zephyr: Turn off display blanking once
This stops the display from flickering in the native_sim.
2024-07-08 16:46:33 +02:00
Nathan Collins
3a12cfbdfc Enable asserts in Zephyr
Turn on Zephyr asserts to help root out issues with the Zephyr
platform code.
2024-07-08 16:46:33 +02:00
Nathan Collins
4a2c4ab89c Fix ZephyrWindowAdapter rendering
Use the correct offset into the buffer. In combination with
zephyrproject-rtos/zephyr#72007 partial rendering now works as
expected.
2024-07-08 16:46:33 +02:00
Nathan Collins
8a4a3c22c2 Update examples/printerdemo_mcu/zephyr/README.md
Don't forget to source the Zephyr virtual env.
2024-07-08 16:46:33 +02:00
Nathan Collins
cc39d0a016 Render printerdemo in Zephyr RTOS
Add a variant of the printerdemo_mcu that works with Zephyr. For now
we only target the native_sim, and only have rendering set up. Future
commits will add touch support, and investigate synchronization
issues.
2024-07-08 16:46:33 +02:00