From 522836c017ed934ea96c5d4c8060784ff7840b6a Mon Sep 17 00:00:00 2001 From: Ishraq Ibne Ashraf Date: Thu, 1 Mar 2018 23:10:11 +0100 Subject: [PATCH] While compiling with ESP8266_NONOS_SDK-2.2.0 it was found that the SDK defines the function, `void ets_delay_us(uint32_t ms)` (in SDK root, include/osapi.h) which is defined in include/espmissingincludes.h as `void ets_delay_us(uint16_t ms)` which results in the following error: ``` CC espfs/espfs.c In file included from ./include/esp8266.h:33:0, from espfs/espfs.c:23: ./include/espmissingincludes.h:46:6: error: conflicting types for 'ets_delay_us' void ets_delay_us(uint16_t ms); ^ In file included from ./include/esp8266.h:28:0, from espfs/espfs.c:23: ..//include/osapi.h:33:6: note: previous declaration of 'ets_delay_us' was here void ets_delay_us(uint32_t us); ^ ``` Commenting out the function prototype from espmissingincludes.h fixes the problem. --- include/espmissingincludes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/espmissingincludes.h b/include/espmissingincludes.h index 6ade6346..aa50fd9e 100644 --- a/include/espmissingincludes.h +++ b/include/espmissingincludes.h @@ -43,7 +43,7 @@ uint8 wifi_get_opmode(void); uint32 system_get_time(); int rand(void); void ets_bzero(void *s, size_t n); -void ets_delay_us(uint16_t ms); +//void ets_delay_us(uint16_t ms); //Hack: this is defined in SDK 1.4.0 and undefined in 1.3.0. It's only used for this, the symbol itself //has no meaning here.