diff --git a/app/driver/pwm2.c b/app/driver/pwm2.c index 38da5c21..a052ca30 100644 --- a/app/driver/pwm2.c +++ b/app/driver/pwm2.c @@ -7,11 +7,13 @@ #include #include +#include #include "mem.h" #include "pin_map.h" #include "platform.h" #include "hw_timer.h" #include "driver/pwm2.h" +#include "user_interface.h" #define PWM2_TMR_MAGIC_80MHZ 16 #define PWM2_TMR_MAGIC_160MHZ 32 diff --git a/app/include/pm/pmSleep.h b/app/include/pm/pmSleep.h index 2fb8f46c..ea6c46d4 100644 --- a/app/include/pm/pmSleep.h +++ b/app/include/pm/pmSleep.h @@ -15,7 +15,7 @@ #if defined(PMSLEEP_DEBUG) #define PMSLEEP_DBG(fmt, ...) dbg_printf("\tPMSLEEP(%s):"fmt"\n", __FUNCTION__, ##__VA_ARGS__) #else - #define PMSLEEP_DBG(...) //c_printf(__VA_ARGS__) + #define PMSLEEP_DBG(...) //printf(__VA_ARGS__) #endif #if defined(NODE_ERROR) diff --git a/app/lua/lflash.c b/app/lua/lflash.c index 340c1066..221a6670 100644 --- a/app/lua/lflash.c +++ b/app/lua/lflash.c @@ -14,6 +14,7 @@ #include "lfunc.h" #include "lflash.h" #include "platform.h" +#include "user_interface.h" #include "vfs.h" #include "uzlib.h" diff --git a/app/modules/bme280.c b/app/modules/bme280.c index e8525921..9379445e 100644 --- a/app/modules/bme280.c +++ b/app/modules/bme280.c @@ -11,6 +11,7 @@ #include "module.h" #include "lauxlib.h" #include "platform.h" +#include "user_interface.h" #include /****************************************************/ diff --git a/app/modules/bme680.c b/app/modules/bme680.c index 85efbe20..dcf6b800 100644 --- a/app/modules/bme680.c +++ b/app/modules/bme680.c @@ -9,6 +9,7 @@ #include "module.h" #include "lauxlib.h" #include "platform.h" +#include "user_interface.h" #include #include "bme680_defs.h" diff --git a/app/modules/bmp085.c b/app/modules/bmp085.c index 97eeadfb..75caf2e0 100644 --- a/app/modules/bmp085.c +++ b/app/modules/bmp085.c @@ -1,6 +1,7 @@ #include "module.h" #include "lauxlib.h" #include "platform.h" +#include "user_interface.h" #include #include diff --git a/app/modules/file.c b/app/modules/file.c index 34ff3ed4..db717076 100644 --- a/app/modules/file.c +++ b/app/modules/file.c @@ -585,7 +585,7 @@ static int file_putfile( lua_State* L ) // Lua: fsinfo() static int file_fsinfo( lua_State* L ) { - u32_t total, used; + uint32_t total, used; if (vfs_fsinfo("", &total, &used)) { return luaL_error(L, "file system failed"); } diff --git a/app/modules/hdc1080.c b/app/modules/hdc1080.c index bc3f995f..55d6eddb 100644 --- a/app/modules/hdc1080.c +++ b/app/modules/hdc1080.c @@ -7,6 +7,7 @@ #include "module.h" #include "lauxlib.h" #include "platform.h" +#include "user_interface.h" #include #include #include diff --git a/app/modules/rc.c b/app/modules/rc.c index 4f4c85e6..c65061a7 100644 --- a/app/modules/rc.c +++ b/app/modules/rc.c @@ -1,7 +1,9 @@ #include "module.h" #include "lauxlib.h" #include "platform.h" +#include "user_interface.h" #include "rom.h" + //#include "driver/easygpio.h" //static Ping_Data pingA; #define defPulseLen 185 diff --git a/app/modules/rotary.c b/app/modules/rotary.c index 44397ef7..7a414e9c 100644 --- a/app/modules/rotary.c +++ b/app/modules/rotary.c @@ -9,6 +9,7 @@ #include "module.h" #include "lauxlib.h" #include "platform.h" +#include "task/task.h" #include #include #include "user_interface.h" diff --git a/app/modules/tcs34725.c b/app/modules/tcs34725.c index b5d59f28..d989c022 100644 --- a/app/modules/tcs34725.c +++ b/app/modules/tcs34725.c @@ -22,6 +22,7 @@ #include "module.h" #include "lauxlib.h" #include "platform.h" +#include "user_interface.h" #include // #define TCS34725_ADDRESS (0x29<<1) @@ -352,4 +353,4 @@ LROT_BEGIN(tcs34725) LROT_END( tcs34725, NULL, 0 ) -NODEMCU_MODULE(TCS34725, "tcs34725", tcs34725, NULL); \ No newline at end of file +NODEMCU_MODULE(TCS34725, "tcs34725", tcs34725, NULL); diff --git a/app/modules/uart.c b/app/modules/uart.c index e67b1ea7..2b1f9164 100644 --- a/app/modules/uart.c +++ b/app/modules/uart.c @@ -45,7 +45,7 @@ static int l_uart_on( lua_State* L ) } } - if (lua_anyfunction(L, stack)) { + if (lua_isanyfunction(L, stack)) { if (lua_isnumber(L, stack+1) && lua_tointeger(L, stack+1) == 0) { run_input = false; } diff --git a/app/modules/wps.c b/app/modules/wps.c index e23f6be5..43b52e28 100644 --- a/app/modules/wps.c +++ b/app/modules/wps.c @@ -4,6 +4,7 @@ #include "module.h" #include "lauxlib.h" #include "platform.h" +#include "user_interface.h" static int wps_callback_ref; diff --git a/app/platform/platform.c b/app/platform/platform.c index ad7c2c26..47644dbb 100644 --- a/app/platform/platform.c +++ b/app/platform/platform.c @@ -1124,7 +1124,7 @@ static void platform_task_dispatch (os_event_t *e) { static int task_init_handler (void) { int p, qlen = TASK_DEFAULT_QUEUE_LEN; for (p = 0; p < TASK_PRIORITY_COUNT; p++){ - TQB.task_Q[p] = (os_event_t *) c_malloc( sizeof(os_event_t)*qlen ); + TQB.task_Q[p] = (os_event_t *) malloc( sizeof(os_event_t)*qlen ); if (TQB.task_Q[p]) { os_memset(TQB.task_Q[p], 0, sizeof(os_event_t)*qlen); system_os_task(platform_task_dispatch, p, TQB.task_Q[p], TASK_DEFAULT_QUEUE_LEN); @@ -1146,7 +1146,7 @@ static int task_init_handler (void) { */ platform_task_handle_t platform_task_get_id (platform_task_callback_t t) { if ( (TQB.task_count & (TH_ALLOCATION_BRICK - 1)) == 0 ) { - TQB.task_func = (platform_task_callback_t *) os_realloc( + TQB.task_func = (platform_task_callback_t *) realloc( TQB.task_func, sizeof(platform_task_callback_t) * (TQB.task_count+TH_ALLOCATION_BRICK)); if (!TQB.task_func) { diff --git a/app/platform/sdcard.c b/app/platform/sdcard.c index 143d96c8..d2858612 100644 --- a/app/platform/sdcard.c +++ b/app/platform/sdcard.c @@ -1,7 +1,7 @@ #include "platform.h" #include "driver/spi.h" #include - +#include "user_interface.h" #include "sdcard.h"