From c4d37fa787c66cfb0c76e3ae8998675e624485cb Mon Sep 17 00:00:00 2001 From: "ethan.du" Date: Thu, 9 Jan 2020 18:21:11 +0800 Subject: [PATCH] scons compile error --- ports/rtthread/HAL_Timer_rtthread.c | 4 ++-- uiot/dev_model/src/dm_mqtt.c | 2 +- uiot/utils/lite-utils.h | 8 ++++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ports/rtthread/HAL_Timer_rtthread.c b/ports/rtthread/HAL_Timer_rtthread.c index f690704..4e63327 100644 --- a/ports/rtthread/HAL_Timer_rtthread.c +++ b/ports/rtthread/HAL_Timer_rtthread.c @@ -26,13 +26,13 @@ bool HAL_Timer_Expired(Timer *timer) { return timer->end_time < now; } -void HAL_Timer_Countdown_ms(_IN_ Timer *timer, unsigned int timeout_ms) { +void HAL_Timer_Countdown_ms(Timer *timer, uint32_t timeout_ms) { rt_tick_t now; now = rt_tick_get(); timer->end_time = now + rt_tick_from_millisecond(timeout_ms); } -void HAL_Timer_Countdown(_IN_ Timer *timer, unsigned int timeout) { +void HAL_Timer_Countdown(Timer *timer, uint32_t timeout) { rt_tick_t now; now = rt_tick_get(); timer->end_time = now + rt_tick_from_millisecond(timeout * 1000); diff --git a/uiot/dev_model/src/dm_mqtt.c b/uiot/dev_model/src/dm_mqtt.c index 8887d15..8ad7dec 100644 --- a/uiot/dev_model/src/dm_mqtt.c +++ b/uiot/dev_model/src/dm_mqtt.c @@ -624,4 +624,4 @@ do_exit: HAL_Free(msg_report); FUNC_EXIT_RC(ret); -} \ No newline at end of file +} diff --git a/uiot/utils/lite-utils.h b/uiot/utils/lite-utils.h index 7bfdc35..1fd9cc9 100644 --- a/uiot/utils/lite-utils.h +++ b/uiot/utils/lite-utils.h @@ -57,6 +57,14 @@ extern "C" { } while(0) #endif +#ifndef SCNi8 +#define SCNi8 "hhi" +#endif + +#ifndef SCNu8 +#define SCNu8 "hhu" +#endif + char *LITE_strdup(const char *src); char *LITE_format_string(const char *fmt, ...); char *LITE_format_nstring(const int len, const char *fmt, ...);