1 /** 2 * @file lv_sprintf.h 3 * 4 */ 5 6 #ifndef LV_SPRINTF_H 7 #define LV_SPRINTF_H 8 9 #if defined(__has_include) 10 #if __has_include(LV_INTTYPES_INCLUDE) 11 #include LV_INTTYPES_INCLUDE 12 /* platform-specific printf format for int32_t, usually "d" or "ld" */ 13 #define LV_PRId32 PRId32 14 #define LV_PRIu32 PRIu32 15 #define LV_PRIx32 PRIx32 16 #define LV_PRIX32 PRIX32 17 #else 18 #define LV_PRId32 "d" 19 #define LV_PRIu32 "u" 20 #define LV_PRIx32 "x" 21 #define LV_PRIX32 "X" 22 #endif 23 #else 24 /* hope this is correct for ports without __has_include or without inttypes.h */ 25 #define LV_PRId32 "d" 26 #define LV_PRIu32 "u" 27 #define LV_PRIx32 "x" 28 #define LV_PRIX32 "X" 29 #endif 30 31 #include "../misc/lv_types.h" 32 33 #ifdef __cplusplus 34 extern "C" { 35 #endif 36 37 int lv_snprintf(char * buffer, size_t count, const char * format, ...); 38 39 int lv_vsnprintf(char * buffer, size_t count, const char * format, va_list va); 40 41 #ifdef __cplusplus 42 } /*extern "C"*/ 43 #endif 44 45 #endif /* LV_SPRINTF_H */ 46