Skip to content
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

docs(display): use lv_display_delete_refr_timer to delete display timer #5835

Merged
merged 1 commit into from
Mar 12, 2024
Merged

docs(display): use lv_display_delete_refr_timer to delete display timer #5835

merged 1 commit into from
Mar 12, 2024

Conversation

jakergrossman
Copy link
Contributor

@jakergrossman jakergrossman commented Mar 12, 2024

While not a valid LVGL program, the following snippet illustrates the problem with the current
example:

// main.c
#include <lvgl.h>

int main(void) {
	lv_display_t* disp = (void*)0xFEEDBEEF;

	lv_timer_delete(disp->refr_timer);
	disp->refr_timer = NULL;
}

Because lv_display_t is an opaque typedef:

../main.c: In function ‘main’:
../main.c:6:29: error: invalid use of incomplete typedef ‘lv_display_t’ {aka ‘struct _lv_display_t’}
    6 |         lv_timer_delete(disp->refr_timer);
      |                             ^~
../main.c:7:13: error: invalid use of incomplete typedef ‘lv_display_t’ {aka ‘struct _lv_display_t’}
    7 |         disp->refr_timer = NULL;
      |             ^~

@FASTSHIFT FASTSHIFT merged commit 0a9d86d into lvgl:master Mar 12, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants