lvgl icon indicating copy to clipboard operation
lvgl copied to clipboard

Clarification OSAL Support (FreeRTOS, Windows, pthread ...)

Open mr-sven opened this issue 10 months ago • 3 comments

Introduce the problem

I'm working on issue https://github.com/lvgl/lvgl/issues/5515 and it's unclear what the effort of this is. My expectation was when using #define LV_USE_OS LV_OS_FREERTOS, I don't have to call lv_timer_handler() because there is already a thread/task for drawing.

Proposal

Better documentation for what the LV_USE_OS flag is. Does it make LVGL threadsafe? Do I need to call lv_task_handler? If yes, do I need a mutex for it?

mr-sven avatar Apr 08 '24 07:04 mr-sven

Thank you for bringing this up. It really needs a better documentation. This page could be a good place for the additions.

Better documentation for what the LV_USE_OS flag is.

It enables the lv_mutex/thread/signal_*() functions. They are used during rendering to make LVGL yield the rendering task while it's waiting for a GPU or flushing. LV_USE_OS is also required for som GPU and for multi-core software rendering (each core has its own thread).

Does it make LVGL threadsafe?

No, it doesn't.

Do I need to call lv_task_handler?

Yes, you can do it anywhere and anyhow you want, but typically it's called in a task

If yes, do I need a mutex for it?

You need a mutex only if you call lv_* functions from an other thread too.

kisvegabor avatar Apr 08 '24 11:04 kisvegabor

I now pointed out the issue on https://github.com/lvgl/lvgl/issues/5515, but I don't know if this is the right approach to fix it.

mr-sven avatar Apr 10 '24 11:04 mr-sven

I now pointed out the issue on https://github.com/lvgl/lvgl/issues/5515, but I don't know if this is the right approach to fix it.

Probably I'm missing something but can't see how #5515 is related to this.

kisvegabor avatar Apr 18 '24 11:04 kisvegabor

We need some feedback on this issue.

Now we mark this as "stale" because there was no activity here for 14 days.

Remove the "stale" label or comment else this will be closed in 7 days.

lvgl-bot avatar May 03 '24 01:05 lvgl-bot

As there was no activity here for a while we close this issue. But don't worry, the conversation is still here and you can get back to it at any time.

So feel free to comment if you have remarks or ideas on this topic.

lvgl-bot avatar May 10 '24 01:05 lvgl-bot