diff options
| author | jacqueline <me@jacqueline.id.au> | 2024-06-12 17:54:40 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2024-06-12 17:54:40 +1000 |
| commit | 64bd9053a25297f7a442ca831c7da5b44bd33f84 (patch) | |
| tree | a90c6cad25a12028302ab1a5334510fba0229bae /lib/lvgl/src/misc/lv_assert.h | |
| parent | 611176ed667c4ed7ee9f609e958f9404f4aee91d (diff) | |
| download | tangara-fw-64bd9053a25297f7a442ca831c7da5b44bd33f84.tar.gz | |
Update LVGL to v9.1.0
Diffstat (limited to 'lib/lvgl/src/misc/lv_assert.h')
| -rw-r--r-- | lib/lvgl/src/misc/lv_assert.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/lvgl/src/misc/lv_assert.h b/lib/lvgl/src/misc/lv_assert.h index 48db7443..c9dc849c 100644 --- a/lib/lvgl/src/misc/lv_assert.h +++ b/lib/lvgl/src/misc/lv_assert.h @@ -15,7 +15,7 @@ extern "C" { *********************/ #include "../lv_conf_internal.h" #include "lv_log.h" -#include "lv_mem.h" +#include "../stdlib/lv_mem.h" #include LV_ASSERT_HANDLER_INCLUDE /********************* @@ -50,6 +50,14 @@ extern "C" { } \ } while(0) +#define LV_ASSERT_FORMAT_MSG(expr, format, ...) \ + do { \ + if(!(expr)) { \ + LV_LOG_ERROR("Asserted at expression: %s " format , #expr, __VA_ARGS__); \ + LV_ASSERT_HANDLER \ + } \ + } while(0) + /*----------------- * ASSERTS *-----------------*/ @@ -67,7 +75,7 @@ extern "C" { #endif #if LV_USE_ASSERT_MEM_INTEGRITY -# define LV_ASSERT_MEM_INTEGRITY() LV_ASSERT_MSG(lv_mem_test() == LV_RES_OK, "Memory integrity error"); +# define LV_ASSERT_MEM_INTEGRITY() LV_ASSERT_MSG(lv_mem_test() == LV_RESULT_OK, "Memory integrity error"); #else # define LV_ASSERT_MEM_INTEGRITY() #endif |
