From 76dc45f54682059e3070006cf8813a4234220530 Mon Sep 17 00:00:00 2001 From: _VIFEXTech <1290176185@qq.com> Date: Wed, 10 Aug 2022 00:09:01 +0800 Subject: [PATCH] fix(printf): add LV_PRIX32 to fix build error (#3555) Co-authored-by: pengyiqiang --- src/draw/sw/lv_draw_sw_letter.c | 2 +- src/misc/lv_printf.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/draw/sw/lv_draw_sw_letter.c b/src/draw/sw/lv_draw_sw_letter.c index 1d740f348..90c92945c 100644 --- a/src/draw/sw/lv_draw_sw_letter.c +++ b/src/draw/sw/lv_draw_sw_letter.c @@ -105,7 +105,7 @@ void lv_draw_sw_letter(lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t * dsc if(letter >= 0x20 && letter != 0xf8ff && /*LV_SYMBOL_DUMMY*/ letter != 0x200c) { /*ZERO WIDTH NON-JOINER*/ - LV_LOG_WARN("lv_draw_letter: glyph dsc. not found for U+%" PRIX32, letter); + LV_LOG_WARN("lv_draw_letter: glyph dsc. not found for U+%" LV_PRIX32, letter); #if LV_USE_FONT_PLACEHOLDER /* draw placeholder */ diff --git a/src/misc/lv_printf.h b/src/misc/lv_printf.h index 76fe612f8..43da576e7 100644 --- a/src/misc/lv_printf.h +++ b/src/misc/lv_printf.h @@ -40,14 +40,20 @@ /* platform-specific printf format for int32_t, usually "d" or "ld" */ #define LV_PRId32 PRId32 #define LV_PRIu32 PRIu32 + #define LV_PRIx32 PRIx32 + #define LV_PRIX32 PRIX32 #else #define LV_PRId32 "d" #define LV_PRIu32 "u" + #define LV_PRIx32 "x" + #define LV_PRIX32 "X" #endif #else /* hope this is correct for ports without __has_include or without inttypes.h */ #define LV_PRId32 "d" #define LV_PRIu32 "u" + #define LV_PRIx32 "x" + #define LV_PRIX32 "X" #endif #ifdef __cplusplus