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

set LV_ASSERT_HANDLER to something user friendly #6

Open
x1ddos opened this issue May 29, 2024 · 1 comment
Open

set LV_ASSERT_HANDLER to something user friendly #6

x1ddos opened this issue May 29, 2024 · 1 comment

Comments

@x1ddos
Copy link
Contributor

x1ddos commented May 29, 2024

the handler is invoked when assertions like LV_ASSERT_MALLOC(p) are triggered.

by default, the handler is set to:

#define LV_ASSERT_HANDLER_INCLUDE <stdint.h>
#define LV_ASSERT_HANDLER while(1)

which would freeze the ui and is not ideal. maybe set it to display an emergency screen with a shutdown button or something else.

note: if malloc assertion is triggered, it could be impossible to construct a new ui screen.

@Stipa88
Copy link

Stipa88 commented Jun 2, 2024

How to add inside the definition that my function is called. #define LV_ASSERT_HANDLER vMyAssert();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants