Advertisement
Guest User

user_config.h

a guest
Oct 2nd, 2016
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.69 KB | None | 0 0
  1. #ifndef __USER_CONFIG_H__
  2. #define __USER_CONFIG_H__
  3.  
  4. // #define FLASH_512K
  5. // #define FLASH_1M
  6. // #define FLASH_2M
  7. // #define FLASH_4M
  8. // #define FLASH_8M
  9. // #define FLASH_16M
  10. #define FLASH_AUTOSIZE
  11. #define FLASH_SAFE_API
  12.  
  13. // This adds the asserts in LUA. It also adds some useful extras to the
  14. // node module. This is all silent in normal operation and so can be enabled
  15. // without any harm (except for the code size increase and slight slowdown)
  16. //#define DEVELOPMENT_TOOLS
  17.  
  18. #ifdef DEVELOPMENT_TOOLS
  19. extern void luaL_assertfail(const char *file, int line, const char *message);
  20. #define lua_assert(x) ((x) ? (void) 0 : luaL_assertfail(__FILE__, __LINE__, #x))
  21. #endif
  22.  
  23. // This enables lots of debug output and changes the serial bit rate. This
  24. // is normally only used by hardcore developers
  25. // #define DEVELOP_VERSION
  26. #ifdef DEVELOP_VERSION
  27. #define NODE_DEBUG
  28. #define COAP_DEBUG
  29. #endif /* DEVELOP_VERSION */
  30.  
  31. #define BIT_RATE_DEFAULT BIT_RATE_115200
  32.  
  33. // This enables automatic baud rate detection at startup
  34. #define BIT_RATE_AUTOBAUD
  35.  
  36. #define NODE_ERROR
  37.  
  38. #ifdef NODE_DEBUG
  39. #define NODE_DBG c_printf
  40. #else
  41. #define NODE_DBG
  42. #endif /* NODE_DEBUG */
  43.  
  44. #ifdef NODE_ERROR
  45. #define NODE_ERR c_printf
  46. #else
  47. #define NODE_ERR
  48. #endif /* NODE_ERROR */
  49.  
  50. #define GPIO_INTERRUPT_ENABLE
  51. #define GPIO_INTERRUPT_HOOK_ENABLE
  52. // #define GPIO_SAFE_NO_INTR_ENABLE
  53.  
  54. #define ICACHE_STORE_TYPEDEF_ATTR __attribute__((aligned(4),packed))
  55. #define ICACHE_STORE_ATTR __attribute__((aligned(4)))
  56. #define ICACHE_RAM_ATTR __attribute__((section(".iram0.text")))
  57. #ifdef GPIO_SAFE_NO_INTR_ENABLE
  58. #define NO_INTR_CODE ICACHE_RAM_ATTR __attribute__ ((noinline))
  59. #else
  60. #define NO_INTR_CODE inline
  61. #endif
  62.  
  63. // SSL buffer size used only for espconn-layer secure connections.
  64. // See https://github.com/nodemcu/nodemcu-firmware/issues/1457 for conversation details.
  65. #define SSL_BUFFER_SIZE 5120
  66.  
  67. //#define CLIENT_SSL_ENABLE
  68. //#define MD2_ENABLE
  69. #define SHA2_ENABLE
  70.  
  71. #define BUILD_SPIFFS
  72. #define SPIFFS_CACHE 1
  73.  
  74. //#define BUILD_FATFS
  75.  
  76. // maximum length of a filename
  77. #define FS_OBJ_NAME_LEN 31
  78.  
  79. // Uncomment this next line for fastest startup
  80. // It reduces the format time dramatically
  81. // #define SPIFFS_MAX_FILESYSTEM_SIZE 32768
  82. //
  83. // You can force the spiffs file system to be at a fixed location
  84. // #define SPIFFS_FIXED_LOCATION 0x100000
  85. //
  86. // You can force the SPIFFS file system to end on the next !M boundary
  87. // (minus the 16k parameter space). THis is useful for certain OTA scenarios
  88. // #define SPIFFS_SIZE_1M_BOUNDARY
  89.  
  90. #define LUA_NUMBER_INTEGRAL
  91.  
  92. #define READLINE_INTERVAL 80
  93. #define LUA_TASK_PRIO USER_TASK_PRIO_0
  94. #define LUA_PROCESS_LINE_SIG 2
  95. #define LUA_OPTIMIZE_DEBUG 2
  96.  
  97. #define ENDUSER_SETUP_AP_SSID "SetupGadget"
  98.  
  99. /*
  100. * A valid hostname only contains alphanumeric and hyphen(-) characters, with no hyphens at first or last char
  101. * if WIFI_STA_HOSTNAME not defined: hostname will default to NODE-xxxxxx (xxxxxx being last 3 octets of MAC address)
  102. * if WIFI_STA_HOSTNAME defined: hostname must only contain alphanumeric characters
  103. * if WIFI_STA_HOSTNAME_APPEND_MAC not defined: Hostname MUST be 32 chars or less
  104. * if WIFI_STA_HOSTNAME_APPEND_MAC defined: Hostname MUST be 26 chars or less, since last 3 octets of MAC address will be appended
  105. * if defined hostname is invalid: hostname will default to NODE-xxxxxx (xxxxxx being last 3 octets of MAC address)
  106. */
  107. //#define WIFI_STA_HOSTNAME "NodeMCU"
  108. //#define WIFI_STA_HOSTNAME_APPEND_MAC
  109.  
  110. //#define WIFI_SMART_ENABLE
  111.  
  112. #define WIFI_STATION_STATUS_MONITOR_ENABLE
  113. #define WIFI_SDK_EVENT_MONITOR_ENABLE
  114. #define WIFI_EVENT_MONITOR_DISCONNECT_REASON_LIST_ENABLE
  115.  
  116. #define STRBUF_DEFAULT_INCREMENT 32
  117.  
  118. #endif /* __USER_CONFIG_H__ */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement