New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(demos): add demo for the OSAL #6182
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you Fabian!
Here you can see some errors reported by CI. Fortunately, they are easy to fix.
I feel like this update could be rather an example. Usually we add complex eye catching things in the demos
folder. So would you mind moving it to the examples
folder?
demos/osal/lv_demo_osal.c
Outdated
uint32_t press_count = 0; | ||
|
||
counter_label = lv_label_create(lv_scr_act()); | ||
lv_obj_align(counter_label, LV_ALIGN_CENTER, 0, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need a mutex here? What if this thread is running concurrently with the thread of lv_timer_handler
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, but this would mean that the lv_timer_handler
thread would also need to take this lock. I do not understand how this can be achieved though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. See the latest comments in #6059
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if I followed the disussion correctly there will be some sort of global mutex that may be taken on the PR for that is ready, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, after that PR, there will be a new API you can use in this PR to acquire the global mutex.
f095d89
to
9c099e3
Compare
Moved this to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add
#include "porting/osal/lv_example_osal.h"
to lv_examples.h
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to run it with the CI we need to add it here. However now the CI is running only with pthread
. Do you think it still makes sens to run it as a test?
|
Adds a example demonstrating the use of the OSAL. Resolves: lvgl#6049
Adds a demo demonstrating the use of the OSAL.
Resolves: #6049
Description of the feature or fix
A clear and concise description of what the bug or new feature is.
Notes
lv_conf_template.h
run lv_conf_internal_gen.py and update Kconfig.scripts/code-format.py
(astyle version v3.4.12 needs to be installed) and follow the Code Conventions.