Unverified Commit 310faf7f authored by Terry Ellison's avatar Terry Ellison Committed by GitHub
Browse files

Merge pull request #2886 from nodemcu/dev

Next master drop
parents 68c425c0 a08e74d9
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#define __MODULE_H__ #define __MODULE_H__
#include "user_modules.h" #include "user_modules.h"
#include "lrodefs.h" #include "lrotable.h"
/* Registering a module within NodeMCU is really easy these days! /* Registering a module within NodeMCU is really easy these days!
* *
...@@ -18,11 +18,11 @@ ...@@ -18,11 +18,11 @@
* *
* Then simply put a line like this at the bottom of your module file: * Then simply put a line like this at the bottom of your module file:
* *
* NODEMCU_MODULE(MYNAME, "myname", myname_map, luaopen_myname); * NODEMCU_MODULE(MYNAME, "myname", myname, luaopen_myname);
* *
* or perhaps * or perhaps
* *
* NODEMCU_MODULE(MYNAME, "myname", myname_map, NULL); * NODEMCU_MODULE(MYNAME, "myname", myname, NULL);
* *
* if you don't need an init function. * if you don't need an init function.
* *
...@@ -67,13 +67,8 @@ ...@@ -67,13 +67,8 @@
*/ */
#define NODEMCU_MODULE(cfgname, luaname, map, initfunc) \ #define NODEMCU_MODULE(cfgname, luaname, map, initfunc) \
const LOCK_IN_SECTION(libs) \ const LOCK_IN_SECTION(libs) \
luaL_Reg MODULE_PASTE_(lua_lib_,cfgname) = { luaname, initfunc }; \ luaR_entry MODULE_PASTE_(lua_lib_,cfgname) = { luaname, LRO_FUNCVAL(initfunc) }; \
const LOCK_IN_SECTION(rotable) \ const LOCK_IN_SECTION(rotable) \
luaR_entry MODULE_EXPAND_PASTE_(cfgname,MODULE_EXPAND_PASTE_(_module_selected,MODULE_PASTE_(LUA_USE_MODULES_,cfgname))) \ luaR_entry MODULE_EXPAND_PASTE_(cfgname,MODULE_EXPAND_PASTE_(_module_selected,MODULE_PASTE_(LUA_USE_MODULES_,cfgname))) \
= {LSTRKEY(luaname), LROVAL(map)} = {luaname, LRO_ROVAL(map ## _map)}
#if !defined(LUA_CROSS_COMPILER) && !(MIN_OPT_LEVEL==2 && LUA_OPTIMIZE_MEMORY==2)
# error "NodeMCU modules must be built with LTR enabled (MIN_OPT_LEVEL=2 and LUA_OPTIMIZE_MEMORY=2)"
#endif
#endif #endif
#ifndef __FPM_SLEEP_H__ #ifndef __FPM_SLEEP_H__
#define __FPM_SLEEP_H__ #define __FPM_SLEEP_H__
#include "user_interface.h" #include "user_interface.h"
#include "c_types.h" #include <stdint.h>
#include "lauxlib.h" #include "lauxlib.h"
#include "gpio.h" #include "gpio.h"
#include "platform.h" #include "platform.h"
#include "task/task.h" #include "task/task.h"
#include "c_string.h" #include <string.h>
#if defined(DEVELOP_VERSION) #if defined(DEVELOP_VERSION)
#define PMSLEEP_DEBUG #define PMSLEEP_DEBUG
...@@ -24,23 +24,17 @@ ...@@ -24,23 +24,17 @@
#define PMSLEEP_ERR(...) #define PMSLEEP_ERR(...)
#endif #endif
#define PMSLEEP_SLEEP_MIN_TIME 50000 #define PMSLEEP_SLEEP_MIN_TIME 50000
#define PMSLEEP_SLEEP_MAX_TIME 268435454 //FPM_MAX_SLEEP_TIME-1 #define PMSLEEP_SLEEP_MAX_TIME 268435454 //FPM_MAX_SLEEP_TIME-1
#define pmSleep_INIT_CFG(X) pmSleep_param_t X = {.sleep_duration=0, .wake_pin=255, \ #define pmSleep_INIT_CFG(X) pmSleep_param_t X = {.sleep_duration=0, .wake_pin=255, \
.preserve_opmode=TRUE, .suspend_cb_ptr=NULL, .resume_cb_ptr=NULL} .preserve_opmode=TRUE, .suspend_cb_ptr=NULL, .resume_cb_ptr=NULL}
#define PMSLEEP_INT_MAP \ #define PMSLEEP_INT_MAP \
{ LSTRKEY( "INT_BOTH" ), LNUMVAL( GPIO_PIN_INTR_ANYEDGE ) }, \ LROT_NUMENTRY( INT_BOTH, GPIO_PIN_INTR_ANYEDGE ) \
{ LSTRKEY( "INT_UP" ), LNUMVAL( GPIO_PIN_INTR_POSEDGE ) }, \ LROT_NUMENTRY( INT_UP, GPIO_PIN_INTR_POSEDGE ) \
{ LSTRKEY( "INT_DOWN" ), LNUMVAL( GPIO_PIN_INTR_NEGEDGE ) }, \ LROT_NUMENTRY( INT_DOWN, GPIO_PIN_INTR_NEGEDGE ) \
{ LSTRKEY( "INT_HIGH" ), LNUMVAL( GPIO_PIN_INTR_HILEVEL ) }, \ LROT_NUMENTRY( INT_HIGH, GPIO_PIN_INTR_HILEVEL ) \
{ LSTRKEY( "INT_LOW" ), LNUMVAL( GPIO_PIN_INTR_LOLEVEL ) } LROT_NUMENTRY( INT_LOW, GPIO_PIN_INTR_LOLEVEL )
typedef struct pmSleep_param{ typedef struct pmSleep_param{
uint32 sleep_duration; uint32 sleep_duration;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#ifndef _ROM_H_ #ifndef _ROM_H_
#define _ROM_H_ #define _ROM_H_
#include "c_types.h" #include <stdint.h>
#include "ets_sys.h" #include "ets_sys.h"
// SHA1 is assumed to match the netbsd sha1.h headers // SHA1 is assumed to match the netbsd sha1.h headers
......
#ifndef RTC_ACCESS_H #ifndef RTC_ACCESS_H
#define RTC_ACCESS_H #define RTC_ACCESS_H
#include <c_types.h> #include <stdint.h>
#define RTC_MMIO_BASE 0x60000700 #define RTC_MMIO_BASE 0x60000700
#define RTC_USER_MEM_BASE 0x60001200 #define RTC_USER_MEM_BASE 0x60001200
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
* relevant functions and expose these instead, through the rtctime.c module. * relevant functions and expose these instead, through the rtctime.c module.
*/ */
#include <c_types.h> #include <stdint.h>
#include "sections.h" #include "sections.h"
#ifndef _RTCTIME_INTERNAL_H_ #ifndef _RTCTIME_INTERNAL_H_
......
...@@ -7,50 +7,53 @@ ...@@ -7,50 +7,53 @@
// *************************************************************************** // ***************************************************************************
// Enable display drivers // Enable display drivers
// //
// Uncomment the U8G2_DISPLAY_TABLE_ENTRY for the device(s) you want to // Copy the uncommented U8G2_DISPLAY_TABLE_ENTRY for the device(s) you want to
// compile into the firmware. // compile into the firmware to U8G2_DISPLAY_TABLE_I2C or U8G2_DISPLAY_TABLE_SPI.
// Stick to the assignments to *_I2C and *_SPI tables. // Stick to the assignments to *_I2C and *_SPI tables.
#ifndef U8G2_DISPLAY_TABLE_I2C_EXTRA #ifndef U8G2_DISPLAY_TABLE_I2C_EXTRA
// I2C based displays go into here: // I2C based displays go into here:
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1610_i2c_ea_dogxl160_f, uc1610_i2c_ea_dogxl160) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1325_i2c_nhd_128x64_f, ssd1325_i2c_nhd_128x64) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1306_i2c_64x48_er_f, ssd1306_i2c_64x48_er) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1608_i2c_erc24064_f, uc1608_i2c_erc24064) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7588_i2c_jlx12864_f, st7588_i2c_jlx12864) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1309_i2c_128x64_noname0_f, ssd1309_i2c_128x64_noname0) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1611_i2c_ea_dogxl240_f, uc1611_i2c_ea_dogxl240) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1305_i2c_128x32_noname_f, ssd1305_i2c_128x32_noname) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1306_i2c_128x32_univision_f, ssd1306_i2c_128x32_univision) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1608_i2c_240x128_f, uc1608_i2c_240x128) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ld7032_i2c_60x32_f, ld7032_i2c_60x32) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ld7032_i2c_60x32_f, ld7032_i2c_60x32) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1611_i2c_ew50850_f, uc1611_i2c_ew50850) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1604_i2c_jlx19264_f, uc1604_i2c_jlx19264) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1601_i2c_128x32_f, uc1601_i2c_128x32) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_sh1106_i2c_128x64_vcomh0_f, sh1106_i2c_128x64_vcomh0) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_sh1106_i2c_128x64_vcomh0_f, sh1106_i2c_128x64_vcomh0) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1306_i2c_96x16_er_f, ssd1306_i2c_96x16_er) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_sh1106_i2c_128x64_noname_f, sh1106_i2c_128x64_noname) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_sh1106_i2c_128x64_noname_f, sh1106_i2c_128x64_noname) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_sh1107_i2c_64x128_f, sh1107_i2c_64x128) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_sh1107_i2c_64x128_f, sh1107_i2c_64x128) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_sh1107_i2c_seeed_96x96_f, sh1107_i2c_seeed_96x96) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_sh1107_i2c_128x128_f, sh1107_i2c_128x128) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_sh1107_i2c_128x128_f, sh1107_i2c_128x128) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_sh1107_i2c_seeed_96x96_f, sh1107_i2c_seeed_96x96) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_sh1108_i2c_160x160_f, sh1108_i2c_160x160) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_sh1108_i2c_160x160_f, sh1108_i2c_160x160) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_sh1122_i2c_256x64_f, sh1122_i2c_256x64) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_sh1122_i2c_256x64_f, sh1122_i2c_256x64) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1306_i2c_128x64_vcomh0_f, ssd1306_i2c_128x64_vcomh0) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd0323_i2c_os128064_f, ssd0323_i2c_os128064) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1305_i2c_128x32_noname_f, ssd1305_i2c_128x32_noname) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1306_i2c_64x48_er_f, ssd1306_i2c_64x48_er) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1306_i2c_96x16_er_f, ssd1306_i2c_96x16_er) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1306_i2c_128x32_univision_f, ssd1306_i2c_128x32_univision) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1306_i2c_128x64_alt0_f, ssd1306_i2c_128x64_alt0) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1306_i2c_128x64_noname_f, ssd1306_i2c_128x64_noname) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1306_i2c_128x64_noname_f, ssd1306_i2c_128x64_noname) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1306_i2c_128x64_vcomh0_f, ssd1306_i2c_128x64_vcomh0) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1309_i2c_128x64_noname0_f, ssd1309_i2c_128x64_noname0) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1309_i2c_128x64_noname2_f, ssd1309_i2c_128x64_noname2) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1309_i2c_128x64_noname2_f, ssd1309_i2c_128x64_noname2) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1306_i2c_128x64_alt0_f, ssd1306_i2c_128x64_alt0) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1318_i2c_128x96_f, ssd1318_i2c_128x96) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1611_i2c_ea_dogm240_f, uc1611_i2c_ea_dogm240) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1318_i2c_128x96_xcp_f, ssd1318_i2c_128x96_xcp) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1325_i2c_nhd_128x64_f, ssd1325_i2c_nhd_128x64) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1326_i2c_er_256x32_f, ssd1326_i2c_er_256x32 )\ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1326_i2c_er_256x32_f, ssd1326_i2c_er_256x32 )\
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1327_i2c_seeed_96x96_f, ssd1327_i2c_seeed_96x96) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1327_i2c_ea_w128128_f, ssd1327_i2c_ea_w128128) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1327_i2c_ea_w128128_f, ssd1327_i2c_ea_w128128) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1327_i2c_midas_128x128_f, ssd1327_i2c_midas_128x128) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1327_i2c_midas_128x128_f, ssd1327_i2c_midas_128x128) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1327_i2c_seeed_96x96_f, ssd1327_i2c_seeed_96x96) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7567_i2c_64x32_f, st7567_i2c_64x32) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7567_i2c_64x32_f, st7567_i2c_64x32) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7588_i2c_jlx12864_f, st7588_i2c_jlx12864) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st75256_i2c_jlx256128_f, st75256_i2c_jlx256128) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st75256_i2c_jlx256128_f, st75256_i2c_jlx256128) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st75256_i2c_jlx256160_f, st75256_i2c_jlx256160) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st75256_i2c_jlx256160_f, st75256_i2c_jlx256160) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st75256_i2c_jlx240160_f, st75256_i2c_jlx240160) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st75256_i2c_jlx240160_f, st75256_i2c_jlx240160) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st75256_i2c_jlx25664_f, st75256_i2c_jlx25664) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st75256_i2c_jlx25664_f, st75256_i2c_jlx25664) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st75256_i2c_jlx172104_f, st75256_i2c_jlx172104) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st75256_i2c_jlx172104_f, st75256_i2c_jlx172104) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1601_i2c_128x32_f, uc1601_i2c_128x32) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1604_i2c_jlx19264_f, uc1604_i2c_jlx19264) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1608_i2c_240x128_f, uc1608_i2c_240x128) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1608_i2c_erc24064_f, uc1608_i2c_erc24064) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1610_i2c_ea_dogxl160_f, uc1610_i2c_ea_dogxl160) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1611_i2c_ea_dogm240_f, uc1611_i2c_ea_dogm240) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1611_i2c_ea_dogxl240_f, uc1611_i2c_ea_dogxl240) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1611_i2c_ew50850_f, uc1611_i2c_ew50850) \
#define U8G2_DISPLAY_TABLE_I2C \ #define U8G2_DISPLAY_TABLE_I2C \
U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1306_i2c_128x64_noname_f, ssd1306_i2c_128x64_noname) \ U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1306_i2c_128x64_noname_f, ssd1306_i2c_128x64_noname) \
...@@ -67,83 +70,89 @@ ...@@ -67,83 +70,89 @@
#ifndef U8G2_DISPLAY_TABLE_SPI_EXTRA #ifndef U8G2_DISPLAY_TABLE_SPI_EXTRA
// SPI based displays go into here: // SPI based displays go into here:
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1606_172x72_f, ssd1606_172x72) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_hx1230_96x68_f, hx1230_96x68) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1608_240x128_f, uc1608_240x128) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7565_erc12864_f, st7565_erc12864) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1309_128x64_noname0_f, ssd1309_128x64_noname0) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1601_128x32_f, uc1601_128x32) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1608_erc24064_f, uc1608_erc24064) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7565_lm6059_f, st7565_lm6059) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1611_ea_dogxl240_f, uc1611_ea_dogxl240) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7565_nhd_c12864_f, st7565_nhd_c12864) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1306_128x64_vcomh0_f, ssd1306_128x64_vcomh0) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1305_128x32_noname_f, ssd1305_128x32_noname) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_max7219_32x8_f, max7219_32x8) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ls013b7dh03_128x128_f, ls013b7dh03_128x128) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_il3820_v2_296x128_f, il3820_v2_296x128) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_il3820_v2_296x128_f, il3820_v2_296x128) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1610_ea_dogxl160_f, uc1610_ea_dogxl160) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ist3020_erc19264_f, ist3020_erc19264) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1611_ea_dogm240_f, uc1611_ea_dogm240) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_lc7981_160x80_f, lc7981_160x80) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1604_jlx19264_f, uc1604_jlx19264) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_lc7981_160x160_f, lc7981_160x160) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7920_s_192x32_f, st7920_s_192x32) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_lc7981_240x64_f, lc7981_240x64) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1325_nhd_128x64_f, ssd1325_nhd_128x64) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_lc7981_240x128_f, lc7981_240x128) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1306_128x64_noname_f, ssd1306_128x64_noname) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1306_128x64_alt0_f, ssd1306_128x64_alt0) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_sed1520_122x32_f, sed1520_122x32) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7565_ea_dogm128_f, st7565_ea_dogm128) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ld7032_60x32_f, ld7032_60x32) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ld7032_60x32_f, ld7032_60x32) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1607_200x200_f, ssd1607_200x200) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ls013b7dh03_128x128_f, ls013b7dh03_128x128) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1309_128x64_noname2_f, ssd1309_128x64_noname2) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_max7219_32x8_f, max7219_32x8) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_sh1106_128x64_noname_f, sh1106_128x64_noname) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_nt7534_tg12864r_f, nt7534_tg12864r) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_pcd8544_84x48_f, pcd8544_84x48) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_pcf8812_96x65_f, pcf8812_96x65) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_sed1520_122x32_f, sed1520_122x32) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_sh1107_64x128_f, sh1107_64x128) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_sh1107_64x128_f, sh1107_64x128) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_sh1107_seeed_96x96_f, sh1107_seeed_96x96) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_sh1106_128x64_noname_f, sh1106_128x64_noname) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_sh1106_128x64_vcomh0_f, sh1106_128x64_vcomh0) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_sh1107_128x128_f, sh1107_128x128) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_sh1107_128x128_f, sh1107_128x128) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_sh1108_160x160_f, sh1108_160x160) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_sh1108_160x160_f, sh1108_160x160) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_sh1107_seeed_96x96_f, sh1107_seeed_96x96) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_sh1122_256x64_f, sh1122_256x64) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_sh1122_256x64_f, sh1122_256x64) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd0323_os128064_f, ssd0323_os128064) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1305_128x32_noname_f, ssd1305_128x32_noname) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1306_64x48_er_f, ssd1306_64x48_er) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1306_96x16_er_f, ssd1306_96x16_er) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1306_128x32_univision_f, ssd1306_128x32_univision) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1306_128x32_univision_f, ssd1306_128x32_univision) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7920_s_128x64_f, st7920_s_128x64) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1306_128x64_alt0_f, ssd1306_128x64_alt0) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7565_64128n_f, st7565_64128n) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1306_128x64_noname_f, ssd1306_128x64_noname) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1701_ea_dogs102_f, uc1701_ea_dogs102) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1306_128x64_vcomh0_f, ssd1306_128x64_vcomh0) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1611_ew50850_f, uc1611_ew50850) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1309_128x64_noname0_f, ssd1309_128x64_noname0) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1322_nhd_256x64_f, ssd1322_nhd_256x64) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1309_128x64_noname2_f, ssd1309_128x64_noname2) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1318_128x96_f, ssd1318_128x96) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1318_128x96_xcp_f, ssd1318_128x96_xcp) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1322_nhd_128x64_f, ssd1322_nhd_128x64) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1322_nhd_128x64_f, ssd1322_nhd_128x64) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7565_ea_dogm132_f, st7565_ea_dogm132) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1322_nhd_256x64_f, ssd1322_nhd_256x64) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1329_128x96_noname_f, ssd1329_128x96_noname) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1325_nhd_128x64_f, ssd1325_nhd_128x64) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7565_zolen_128x64_f, st7565_zolen_128x64) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st75256_jlx256128_f, st75256_jlx256128) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1306_96x16_er_f, ssd1306_96x16_er) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ist3020_erc19264_f, ist3020_erc19264) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7588_jlx12864_f, st7588_jlx12864) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1326_er_256x32_f, ssd1326_er_256x32 )\ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1326_er_256x32_f, ssd1326_er_256x32 )\
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1327_seeed_96x96_f, ssd1327_seeed_96x96) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1327_ea_w128128_f, ssd1327_ea_w128128) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1327_ea_w128128_f, ssd1327_ea_w128128) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1327_midas_128x128_f, ssd1327_midas_128x128) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1327_midas_128x128_f, ssd1327_midas_128x128) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st75256_jlx172104_f, st75256_jlx172104) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1327_seeed_96x96_f, ssd1327_seeed_96x96) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1329_128x96_noname_f, ssd1329_128x96_noname) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1606_172x72_f, ssd1606_172x72) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1607_200x200_f, ssd1607_200x200) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1607_gd_200x200_f, ssd1607_gd_200x200) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1607_ws_200x200_f, ssd1607_ws_200x200) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7565_64128n_f, st7565_64128n) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7565_ea_dogm132_f, st7565_ea_dogm132) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7565_ea_dogm128_f, st7565_ea_dogm128) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7565_erc12864_f, st7565_erc12864) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7565_erc12864_alt_f, st7565_erc12864_alt) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7565_lm6059_f, st7565_lm6059) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7565_nhd_c12832_f, st7565_nhd_c12832) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7565_nhd_c12832_f, st7565_nhd_c12832) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st75256_jlx256160_f, st75256_jlx256160) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7565_nhd_c12864_f, st7565_nhd_c12864) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st75256_jlx240160_f, st75256_jlx240160) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7565_zolen_128x64_f, st7565_zolen_128x64) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st75256_jlx25664_f, st75256_jlx25664) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1306_64x48_er_f, ssd1306_64x48_er) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_pcf8812_96x65_f, pcf8812_96x65) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7567_pi_132x64_f, st7567_pi_132x64) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7567_jlx12864_f, st7567_jlx12864) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7567_enh_dg128064i_f, st7567_enh_dg128064i) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7567_enh_dg128064i_f, st7567_enh_dg128064i) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7567_64x32_f, st7567_64x32) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7567_64x32_f, st7567_64x32) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7586s_s028hn118a_f, st7586s_s028hn118a) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7567_jlx12864_f, st7567_jlx12864) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7567_pi_132x64_f, st7567_pi_132x64) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7586s_erc240160_f, st7586s_erc240160) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7586s_erc240160_f, st7586s_erc240160) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_pcd8544_84x48_f, pcd8544_84x48) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7586s_s028hn118a_f, st7586s_s028hn118a) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_sh1106_128x64_vcomh0_f, sh1106_128x64_vcomh0) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7588_jlx12864_f, st7588_jlx12864) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_nt7534_tg12864r_f, nt7534_tg12864r) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7920_s_192x32_f, st7920_s_192x32) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1701_mini12864_f, uc1701_mini12864) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st7920_s_128x64_f, st7920_s_128x64) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_t6963_240x128_f, t6963_240x128) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st75256_jlx25664_f, st75256_jlx25664) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_t6963_240x64_f, t6963_240x64) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st75256_jlx172104_f, st75256_jlx172104) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_t6963_256x64_f, t6963_256x64) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st75256_jlx240160_f, st75256_jlx240160) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st75256_jlx256128_f, st75256_jlx256128) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_st75256_jlx256160_f, st75256_jlx256160) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_t6963_128x64_f, t6963_128x64) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_t6963_128x64_f, t6963_128x64) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_t6963_160x80_f, t6963_160x80) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_t6963_160x80_f, t6963_160x80) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_lc7981_160x80_f, lc7981_160x80) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_t6963_240x64_f, t6963_240x64) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_lc7981_160x160_f, lc7981_160x160) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_t6963_240x128_f, t6963_240x128) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_lc7981_240x128_f, lc7981_240x128) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_t6963_256x64_f, t6963_256x64) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_lc7981_240x64_f, lc7981_240x64) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1601_128x32_f, uc1601_128x32) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_hx1230_96x68_f, hx1230_96x68) \ // U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1604_jlx19264_f, uc1604_jlx19264) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1608_240x128_f, uc1608_240x128) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1608_erc24064_f, uc1608_erc24064) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1610_ea_dogxl160_f, uc1610_ea_dogxl160) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1611_ea_dogm240_f, uc1611_ea_dogm240) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1611_ea_dogxl240_f, uc1611_ea_dogxl240) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1611_ew50850_f, uc1611_ew50850) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1701_ea_dogs102_f, uc1701_ea_dogs102) \
// U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_uc1701_mini12864_f, uc1701_mini12864) \
#define U8G2_DISPLAY_TABLE_SPI \ #define U8G2_DISPLAY_TABLE_SPI \
U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1306_128x64_noname_f, ssd1306_128x64_noname) \ U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_ssd1306_128x64_noname_f, ssd1306_128x64_noname) \
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
// this out and enabling the explicitly size, e.g. FLASH_4M. Valid sizes are // this out and enabling the explicitly size, e.g. FLASH_4M. Valid sizes are
// FLASH_512K, FLASH_1M, FLASH_2M, FLASH_4M, FLASH_8M, FLASH_16M. // FLASH_512K, FLASH_1M, FLASH_2M, FLASH_4M, FLASH_8M, FLASH_16M.
#define FLASH_AUTOSIZE //#define FLASH_AUTOSIZE
//#define FLASH_4M #define FLASH_4M
// The firmware now selects a baudrate of 115,200 by default, but the driver // The firmware now selects a baudrate of 115,200 by default, but the driver
...@@ -41,13 +41,13 @@ ...@@ -41,13 +41,13 @@
// The Lua Flash Store (LFS) allows you to store Lua code in Flash memory and // The Lua Flash Store (LFS) allows you to store Lua code in Flash memory and
// the Lua VMS will execute this code directly from flash without needing any // the Lua VMS will execute this code directly from flash without needing any
// RAM overhead. If you want to enable LFS then set the following define to // RAM overhead. You can now configure LFS directly in the System Partition
// the size of the store that you need. This can be any multiple of 4kB up to // Table insted of at compile time. However for backwards compatibility setting
// a maximum 256Kb. // LUA_FLASH_STORE defines the default partition size if the NodeMCU partition
// tool is not used.
//#define LUA_FLASH_STORE 0x10000 //#define LUA_FLASH_STORE 0x10000
// By default Lua executes the file init.lua at start up. The following // By default Lua executes the file init.lua at start up. The following
// define allows you to replace this with an alternative startup. Warning: // define allows you to replace this with an alternative startup. Warning:
// you must protect this execution otherwise you will enter a panic loop; // you must protect this execution otherwise you will enter a panic loop;
...@@ -71,11 +71,14 @@ ...@@ -71,11 +71,14 @@
// general, limiting the size of the FS only to what your application needs // general, limiting the size of the FS only to what your application needs
// gives the fastest start-up and imaging times. // gives the fastest start-up and imaging times.
// You can now configure SPIFFS size and position directly in the System
// Partition Table. However backwards compatibility SPIFFS_MAX_FILESYSTEM_SIZE
// can be set and this defines the default SPIFFS partition size if the NodeMCU
// partition tool is not used. The value (~0x0) means the maximum size remaining.
#define BUILD_SPIFFS #define BUILD_SPIFFS
//#define SPIFFS_FIXED_LOCATION 0x100000
//#define SPIFFS_MAX_FILESYSTEM_SIZE 0x20000
//#define SPIFFS_SIZE_1M_BOUNDARY
#define SPIFFS_CACHE 1 // Enable if you use you SPIFFS in R/W mode #define SPIFFS_CACHE 1 // Enable if you use you SPIFFS in R/W mode
//#define SPIFFS_MAX_FILESYSTEM_SIZE 0x20000
#define SPIFFS_MAX_OPEN_FILES 4 // maximum number of open files for SPIFFS #define SPIFFS_MAX_OPEN_FILES 4 // maximum number of open files for SPIFFS
#define FS_OBJ_NAME_LEN 31 // maximum length of a filename #define FS_OBJ_NAME_LEN 31 // maximum length of a filename
...@@ -156,6 +159,22 @@ ...@@ -156,6 +159,22 @@
#define ENDUSER_SETUP_AP_SSID "SetupGadget" #define ENDUSER_SETUP_AP_SSID "SetupGadget"
// I2C software driver partially supports use of GPIO16 (D0) pin for SCL line.
// GPIO16 does not support open-drain mode and works in push-pull mode,
// so clock stretching will not be possible, because circuit in slave device that
// supposed to drive SCL low during stretching will not be capable to hold SCL low.
// Also I2C speed will be limited to no more than 400000 Hz (FAST mode).
// This define is does not have an effect on an old driver (see I2C_MASTER_OLD_VERSION).
//#define I2C_MASTER_GPIO16_ENABLE
// For compatibility reasons you can switch to old version of I2C software driver.
// It does not support changing speed, have only one bus id = 0, does not support GPIO16
// and works only in Standard(slow) mode with clock speed around 50kHz.
#define I2C_MASTER_OLD_VERSION
// The following sections are only relevent for those developers who are // The following sections are only relevent for those developers who are
// developing modules or core Lua changes and configure how extra diagnostics // developing modules or core Lua changes and configure how extra diagnostics
// are enabled in the firmware. These should only be configured if you are // are enabled in the firmware. These should only be configured if you are
...@@ -190,6 +209,24 @@ ...@@ -190,6 +209,24 @@
// change this if you have tracked the implications through the Firmware sources // change this if you have tracked the implications through the Firmware sources
// and understand the these. // and understand the these.
#define NODEMCU_EAGLEROM_PARTITION 1
#define NODEMCU_IROM0TEXT_PARTITION 2
#define NODEMCU_LFS0_PARTITION 3
#define NODEMCU_LFS1_PARTITION 4
#define NODEMCU_TLSCERT_PARTITION 5
#define NODEMCU_SPIFFS0_PARTITION 6
#define NODEMCU_SPIFFS1_PARTITION 7
#ifndef LUA_FLASH_STORE
# define LUA_FLASH_STORE 0x0
#endif
#define SPIFFS_FIXED_LOCATION 0x0
#ifndef SPIFFS_MAX_FILESYSTEM_SIZE
# define SPIFFS_MAX_FILESYSTEM_SIZE 0xFFFFFFFF
#endif
//#define SPIFFS_SIZE_1M_BOUNDARY
#define LUA_TASK_PRIO USER_TASK_PRIO_0 #define LUA_TASK_PRIO USER_TASK_PRIO_0
#define LUA_PROCESS_LINE_SIG 2 #define LUA_PROCESS_LINE_SIG 2
#define LUA_OPTIMIZE_DEBUG 2 #define LUA_OPTIMIZE_DEBUG 2
...@@ -207,7 +244,7 @@ extern void luaL_dbgbreak(void); ...@@ -207,7 +244,7 @@ extern void luaL_dbgbreak(void);
#endif #endif
#endif #endif
#if !defined(LUA_NUMBER_INTEGRAL) && defined (LUA_DWORD_ALIGNED_TVALUES) #if !defined(LUA_NUMBER_INTEGRAL) && !defined (LUA_DWORD_ALIGNED_TVALUES)
#define LUA_PACK_TVALUES #define LUA_PACK_TVALUES
#else #else
#undef LUA_PACK_TVALUES #undef LUA_PACK_TVALUES
...@@ -218,6 +255,11 @@ extern void luaL_dbgbreak(void); ...@@ -218,6 +255,11 @@ extern void luaL_dbgbreak(void);
#define COAP_DEBUG #define COAP_DEBUG
#endif /* DEVELOP_VERSION */ #endif /* DEVELOP_VERSION */
#if !defined(LUA_CROSS_COMPILER) && !defined(dbg_printf)
extern void dbg_printf(const char *fmt, ...);
#endif
#ifdef NODE_DEBUG #ifdef NODE_DEBUG
#define NODE_DBG dbg_printf #define NODE_DBG dbg_printf
#else #else
...@@ -236,12 +278,7 @@ extern void luaL_dbgbreak(void); ...@@ -236,12 +278,7 @@ extern void luaL_dbgbreak(void);
#define ICACHE_STORE_ATTR __attribute__((aligned(4))) #define ICACHE_STORE_ATTR __attribute__((aligned(4)))
#define ICACHE_STRING(x) ICACHE_STRING2(x) #define ICACHE_STRING(x) ICACHE_STRING2(x)
#define ICACHE_STRING2(x) #x #define ICACHE_STRING2(x) #x
#define ICACHE_RAM_ATTR \ #define ICACHE_RAM_ATTR __attribute__((section(".iram0.text." __FILE__ "." ICACHE_STRING(__LINE__))))
__attribute__((section(".iram0.text." __FILE__ "." ICACHE_STRING(__LINE__))))
#define ICACHE_FLASH_RESERVED_ATTR \
__attribute__((section(".irom.reserved." __FILE__ "." ICACHE_STRING(__LINE__)),\
used,unused,aligned(INTERNAL_FLASH_SECTOR_SIZE)))
#ifdef GPIO_SAFE_NO_INTR_ENABLE #ifdef GPIO_SAFE_NO_INTR_ENABLE
#define NO_INTR_CODE ICACHE_RAM_ATTR __attribute__ ((noinline)) #define NO_INTR_CODE ICACHE_RAM_ATTR __attribute__ ((noinline))
#else #else
......
#include "c_types.h" #include <stdint.h>
#include <stddef.h>
#include "user_config.h" #include "user_config.h"
...@@ -274,8 +275,10 @@ ...@@ -274,8 +275,10 @@
//#define MBEDTLS_MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */ //#define MBEDTLS_MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
//#define MBEDTLS_PLATFORM_STD_MEM_HDR <stdlib.h> /**< Header to include if MBEDTLS_PLATFORM_NO_STD_FUNCTIONS is defined. Don't define if no header is needed. */ //#define MBEDTLS_PLATFORM_STD_MEM_HDR <stdlib.h> /**< Header to include if MBEDTLS_PLATFORM_NO_STD_FUNCTIONS is defined. Don't define if no header is needed. */
#define MBEDTLS_PLATFORM_STD_CALLOC pvPortCalloc /**< Default allocator to use, can be undefined */ extern void *mbedtls_calloc_wrap(size_t n, size_t sz);
#define MBEDTLS_PLATFORM_STD_FREE vPortFree /**< Default free to use, can be undefined */ #define MBEDTLS_PLATFORM_STD_CALLOC mbedtls_calloc_wrap /**< Default allocator to use, can be undefined */
extern void mbedtls_free_wrap(void *p);
#define MBEDTLS_PLATFORM_STD_FREE mbedtls_free_wrap /**< Default free to use, can be undefined */
//#define MBEDTLS_PLATFORM_STD_EXIT exit /**< Default exit to use, can be undefined */ //#define MBEDTLS_PLATFORM_STD_EXIT exit /**< Default exit to use, can be undefined */
//#define MBEDTLS_PLATFORM_STD_TIME time /**< Default time to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled */ //#define MBEDTLS_PLATFORM_STD_TIME time /**< Default time to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled */
//#define MBEDTLS_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */ //#define MBEDTLS_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
//#define LUA_USE_MODULES_CRON //#define LUA_USE_MODULES_CRON
//#define LUA_USE_MODULES_CRYPTO //#define LUA_USE_MODULES_CRYPTO
#define LUA_USE_MODULES_DHT #define LUA_USE_MODULES_DHT
//#define LUA_USE_MODULES_DS18B20
//#define LUA_USE_MODULES_ENCODER //#define LUA_USE_MODULES_ENCODER
//#define LUA_USE_MODULES_ENDUSER_SETUP // USE_DNS in dhcpserver.h needs to be enabled for this module to work. //#define LUA_USE_MODULES_ENDUSER_SETUP // USE_DNS in dhcpserver.h needs to be enabled for this module to work.
#define LUA_USE_MODULES_FILE #define LUA_USE_MODULES_FILE
...@@ -43,7 +42,9 @@ ...@@ -43,7 +42,9 @@
#define LUA_USE_MODULES_OW #define LUA_USE_MODULES_OW
//#define LUA_USE_MODULES_PCM //#define LUA_USE_MODULES_PCM
//#define LUA_USE_MODULES_PERF //#define LUA_USE_MODULES_PERF
//#define LUA_USE_MODULES_PIPE
//#define LUA_USE_MODULES_PWM //#define LUA_USE_MODULES_PWM
//#define LUA_USE_MODULES_PWM2
//#define LUA_USE_MODULES_RC //#define LUA_USE_MODULES_RC
//#define LUA_USE_MODULES_RFSWITCH //#define LUA_USE_MODULES_RFSWITCH
//#define LUA_USE_MODULES_ROTARY //#define LUA_USE_MODULES_ROTARY
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#define __USER_VERSION_H__ #define __USER_VERSION_H__
#include "version.h" /* ESP firmware header */ #include "version.h" /* ESP firmware header */
#include <buildinfo.h>
#define NODE_VERSION_MAJOR ESP_SDK_VERSION_MAJOR #define NODE_VERSION_MAJOR ESP_SDK_VERSION_MAJOR
#define NODE_VERSION_MINOR ESP_SDK_VERSION_MINOR #define NODE_VERSION_MINOR ESP_SDK_VERSION_MINOR
...@@ -11,10 +12,12 @@ ...@@ -11,10 +12,12 @@
#define NODE_VERSION_STR(x) #x #define NODE_VERSION_STR(x) #x
#define NODE_VERSION_XSTR(x) NODE_VERSION_STR(x) #define NODE_VERSION_XSTR(x) NODE_VERSION_STR(x)
#define NODE_VERSION "NodeMCU " ESP_SDK_VERSION_STRING "." NODE_VERSION_XSTR(NODE_VERSION_INTERNAL) # define NODE_VERSION "NodeMCU " ESP_SDK_VERSION_STRING "." NODE_VERSION_XSTR(NODE_VERSION_INTERNAL) " " NODE_VERSION_LONG
// Leave the space after # in the line above. It busts replacement of NODE_VERSION in the docker build which is not needed anymore with this PR.
// Can be removed when the script is adapted
#ifndef BUILD_DATE #ifndef BUILD_DATE
#define BUILD_DATE "unspecified" #define BUILD_DATE BUILDINFO_BUILD_DATE
#endif #endif
extern char SDK_VERSION[]; extern char SDK_VERSION[];
......
...@@ -36,8 +36,6 @@ endif ...@@ -36,8 +36,6 @@ endif
# Required for each makefile to inherit from the parent # Required for each makefile to inherit from the parent
# #
INCLUDES := $(INCLUDES) -I $(PDIR)include
INCLUDES += -I ./
PDIR := ../$(PDIR) PDIR := ../$(PDIR)
sinclude $(PDIR)Makefile sinclude $(PDIR)Makefile
#include "c_ctype.h"
#include "c_types.h"
// int isalnum(int c){}
// int isalpha(int c){}
// int iscntrl(int c){}
// int isdigit(int c){}
// // int isgraph(int c){}
// int islower(int c){}
// int isprint(int c){}
// int ispunct(int c){}
// int isspace(int c){}
// int isupper(int c){}
// int isxdigit(int c){}
// int tolower(int c){}
// int toupper(int c){}
#ifndef _C_CTYPE_H_
#define _C_CTYPE_H_
#if 0
int isalnum(int);
int isalpha(int);
int iscntrl(int);
int isdigit(int);
// int isgraph(int);
int islower(int);
int isprint(int);
int ispunct(int);
int isspace(int);
int isupper(int);
int isxdigit(int);
int tolower(int);
int toupper(int);
#if !defined(__STRICT_ANSI__) || defined(__cplusplus) || __STDC_VERSION__ >= 199901L
// int isblank(int);
#endif
#ifndef __STRICT_ANSI__
// int isascii(int);
// int toascii(int);
#define _tolower(__c) ((unsigned char)(__c) - 'A' + 'a')
#define _toupper(__c) ((unsigned char)(__c) - 'a' + 'A')
#endif
#define _U 01
#define _L 02
#define _N 04
#define _S 010
#define _P 020
#define _C 040
#define _X 0100
#define _B 0200
/* For C++ backward-compatibility only. */
// extern char _ctype_[];
#endif
#endif /* _C_CTYPE_H_ */
#ifndef __c_errno_h
#define __c_errno_h
#include <errno.h>
// #ifndef errno
// extern int errno;
// #endif
// #define EDOM 1
// #define ERANGE 2
// #define EILSEQ 4
// #define ESIGNUM 3
// #define EINVAL 5
// #define ENOMEM 6
#endif
/* end of c_errno.h */
#ifndef __c_fcntl_h
#define __c_fcntl_h
#include <fcntl.h>
#endif
/* end of c_fcntl.h */
#ifndef __c_limits_h
#define __c_limits_h
#include <limits.h>
#if 0
#define CHAR_BIT 8
/* max number of bits for smallest object that is not a bit-field (byte) */
#define SCHAR_MIN (-128)
/* mimimum value for an object of type signed char */
#define SCHAR_MAX 127
/* maximum value for an object of type signed char */
#define UCHAR_MAX 255
/* maximum value for an object of type unsigned char */
#ifdef __FEATURE_SIGNED_CHAR
#define CHAR_MIN (-128)
/* minimum value for an object of type char */
#define CHAR_MAX 127
/* maximum value for an object of type char */
#else
#define CHAR_MIN 0
/* minimum value for an object of type char */
#define CHAR_MAX 255
/* maximum value for an object of type char */
#endif
#define SHRT_MIN (-0x8000)
/* minimum value for an object of type short int */
#define SHRT_MAX 0x7fff
/* maximum value for an object of type short int */
#define USHRT_MAX 65535
/* maximum value for an object of type unsigned short int */
#define INT_MIN (~0x7fffffff) /* -2147483648 and 0x80000000 are unsigned */
/* minimum value for an object of type int */
#define INT_MAX 0x7fffffff
/* maximum value for an object of type int */
#define UINT_MAX 0xffffffffU
/* maximum value for an object of type unsigned int */
#define LONG_MIN (~0x7fffffffL)
/* minimum value for an object of type long int */
#define LONG_MAX 0x7fffffffL
/* maximum value for an object of type long int */
#define ULONG_MAX 0xffffffffUL
/* maximum value for an object of type unsigned long int */
#if !defined(__STRICT_ANSI__) || (defined(__STDC_VERSION__) && 199901L <= __STDC_VERSION__)
#define LLONG_MIN (~0x7fffffffffffffffLL)
/* minimum value for an object of type long long int */
#define LLONG_MAX 0x7fffffffffffffffLL
/* maximum value for an object of type long long int */
#define ULLONG_MAX 0xffffffffffffffffULL
/* maximum value for an object of type unsigned long int */
#endif
#endif
#endif
/* end of c_limits.h */
/*
c_locale.h
Values appropriate for the formatting of monetary and other
numberic quantities.
*/
#ifndef _C_LOCALE_H_
#define _C_LOCALE_H_
#include <locale.h>
#if 0
#ifndef NULL
#define NULL 0
#endif
#define LC_ALL 0
#define LC_COLLATE 1
#define LC_CTYPE 2
#define LC_MONETARY 3
#define LC_NUMERIC 4
#define LC_TIME 5
#define LC_MESSAGES 6
struct lconv
{
char *decimal_point;
char *thousands_sep;
char *grouping;
char *int_curr_symbol;
char *currency_symbol;
char *mon_decimal_point;
char *mon_thousands_sep;
char *mon_grouping;
char *positive_sign;
char *negative_sign;
char int_frac_digits;
char frac_digits;
char p_cs_precedes;
char p_sep_by_space;
char n_cs_precedes;
char n_sep_by_space;
char p_sign_posn;
char n_sign_posn;
char int_n_cs_precedes;
char int_n_sep_by_space;
char int_n_sign_posn;
char int_p_cs_precedes;
char int_p_sep_by_space;
char int_p_sign_posn;
};
#ifndef _REENT_ONLY
// char *setlocale(int category, const char *locale);
struct lconv *localeconv(void);
#endif
// struct _reent;
// char *_setlocale_r(struct _reent *, int category, const char *locale);
// struct lconv *_localeconv_r(struct _reent *);
#endif
#endif /* _C_LOCALE_H_ */
#ifndef _C_MATH_H_
#define _C_MATH_H_
#include <math.h>
double floor(double);
double pow(double, double);
#if 0
#ifndef HUGE_VAL
#define HUGE_VAL (1.0e99)
#endif
#ifndef HUGE_VALF
#define HUGE_VALF (1.0e999999999F)
#endif
#if !defined(HUGE_VALL) && defined(_HAVE_LONG_DOUBLE)
#define HUGE_VALL (1.0e999999999L)
#endif
#if !defined(INFINITY)
#define INFINITY (HUGE_VALF)
#endif
/* Reentrant ANSI C functions. */
#ifndef __math_68881
// double atan(double);
// double cos(double);
// double sin(double);
// double tan(double);
// double tanh(double);
// double frexp(double, int *);
// double modf(double, double *);
// double ceil(double);
// double fabs(double);
// double floor(double);
#endif /* ! defined (__math_68881) */
/* Non reentrant ANSI C functions. */
#ifndef _REENT_ONLY
#ifndef __math_68881
// double acos(double);
// double asin(double);
// double atan2(double, double);
// double cosh(double);
// double sinh(double);
// double exp(double);
// double ldexp(double, int);
// double log(double);
// double log10(double);
// double pow(double, double);
// double sqrt(double);
// double fmod(double, double);
#endif /* ! defined (__math_68881) */
#endif /* ! defined (_REENT_ONLY) */
#endif
#endif /* _MATH_H_ */
#ifndef _C_SIGNAL_H_
#define _C_SIGNAL_H_
#include <signal.h>
#endif /* _C_SIGNAL_H_ */
#ifndef __c_stdarg_h
#define __c_stdarg_h
#if defined(__GNUC__)
#include <stdarg.h>
#else
typedef char * va_list;
#define _INTSIZEOF(n) ((sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1))
#define va_start(ap,v) (ap = (va_list)&v + _INTSIZEOF(v))
#define va_arg(ap,t) (*(t *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)))
#define va_end(ap) (ap = (va_list)0)
#endif
#endif
/* end of c_stdarg.h */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment