diff --git a/platform/os/freertos/HAL_Timer_freertos.c b/platform/os/freertos/HAL_Timer_freertos.c index 326ca63..9263c93 100644 --- a/platform/os/freertos/HAL_Timer_freertos.c +++ b/platform/os/freertos/HAL_Timer_freertos.c @@ -27,13 +27,13 @@ bool HAL_Timer_Expired(Timer *timer) { return timer->end_time < now; } -void HAL_Timer_Countdown_ms(Timer *timer, unsigned int timeout_ms) { +void HAL_Timer_Countdown_ms(Timer *timer, uint32_t timeout_ms) { TickType_t now; now = xTaskGetTickCount(); timer->end_time = now + (timeout_ms / portTICK_RATE_MS); } -void HAL_Timer_Countdown(Timer *timer, unsigned int timeout) { +void HAL_Timer_Countdown(Timer *timer, uint32_t timeout) { TickType_t now; now = xTaskGetTickCount(); timer->end_time = now + (timeout * 1000 / portTICK_RATE_MS); diff --git a/platform/os/linux/HAL_Timer_linux.c b/platform/os/linux/HAL_Timer_linux.c index 0119329..61aaf12 100644 --- a/platform/os/linux/HAL_Timer_linux.c +++ b/platform/os/linux/HAL_Timer_linux.c @@ -29,7 +29,7 @@ bool HAL_Timer_Expired(Timer *timer) { return res.tv_sec < 0 || (res.tv_sec == 0 && res.tv_usec <= 0); } -void HAL_Timer_Countdown_ms(Timer *timer, unsigned int timeout_ms) { +void HAL_Timer_Countdown_ms(Timer *timer, uint32_t timeout_ms) { struct timeval now; gettimeofday(&now, NULL); #ifdef __cplusplus @@ -40,7 +40,7 @@ void HAL_Timer_Countdown_ms(Timer *timer, unsigned int timeout_ms) { timeradd(&now, &interval, &timer->end_time); } -void HAL_Timer_Countdown(Timer *timer, unsigned int timeout) { +void HAL_Timer_Countdown(Timer *timer, uint32_t timeout) { struct timeval now; gettimeofday(&now, NULL); struct timeval interval = {timeout, 0}; diff --git a/src/mqtt/src/mqtt_client_common.c b/src/mqtt/src/mqtt_client_common.c index 52897a7..d14eb22 100644 --- a/src/mqtt/src/mqtt_client_common.c +++ b/src/mqtt/src/mqtt_client_common.c @@ -1272,7 +1272,6 @@ int cycle_for_read(UIoT_Client *pClient, Timer *timer, uint8_t *packet_type, QoS * Should not happen */ return ERR_MQTT_RX_MESSAGE_PACKET_TYPE_INVALID; - break; } } diff --git a/src/sdk-impl/uiot_export.h b/src/sdk-impl/uiot_export.h index a228198..4c5634c 100644 --- a/src/sdk-impl/uiot_export.h +++ b/src/sdk-impl/uiot_export.h @@ -20,9 +20,6 @@ extern "C" { #endif -/* IoT C-SDK version info */ -#define UIOT_DEVICE_SDK_VERSION "1.0.0" - /* MQTT心跳消息发送周期, 单位:s */ #define UIOT_MQTT_KEEP_ALIVE_INTERNAL (240)