Skip to content

Commit

Permalink
fix(lv_printf.h): to eliminate the errors in Keil and IAR
Browse files Browse the repository at this point in the history
Originally added here but stragely disappeared: #2695
  • Loading branch information
kisvegabor committed Oct 22, 2021
1 parent 9d7f530 commit f6d7dc7
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/misc/lv_printf.h
Expand Up @@ -34,13 +34,17 @@
#ifndef _LV_PRINTF_H_
#define _LV_PRINTF_H_

#if defined(__has_include) && __has_include(<inttypes.h>)
#include<inttypes.h>
/* platform-specific printf format for int32_t, usually "d" or "ld" */
#define LV_PRId32 PRId32
#if defined(__has_include)
# if __has_include(<inttypes.h>)
# include <inttypes.h>
/* platform-specific printf format for int32_t, usually "d" or "ld" */
# define LV_PRId32 PRId32
# else
# define LV_PRId32 "d"
# endif
#else
/* hope this is correct for ports without __has_include or without inttypes.h */
#define LV_PRId32 "d"
/* hope this is correct for ports without __has_include or without inttypes.h */
# define LV_PRId32 "d"
#endif

#ifdef __cplusplus
Expand Down

0 comments on commit f6d7dc7

Please sign in to comment.