user_config.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. #ifndef __USER_CONFIG_H__
  2. #define __USER_CONFIG_H__
  3. // #define DEVKIT_VERSION_0_9 1 // define this only if you use NodeMCU devkit v0.9
  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. // Byte 107 of esp_init_data_default, only one of these 3 can be picked
  13. #define ESP_INIT_DATA_ENABLE_READVDD33
  14. //#define ESP_INIT_DATA_ENABLE_READADC
  15. //#define ESP_INIT_DATA_FIXED_VDD33_VALUE 33
  16. // #define DEVELOP_VERSION
  17. #ifdef DEVELOP_VERSION
  18. #define NODE_DEBUG
  19. #define COAP_DEBUG
  20. #else
  21. #define BIT_RATE_DEFAULT BIT_RATE_115200
  22. #endif /* DEVELOP_VERSION */
  23. #define NODE_ERROR
  24. #ifdef NODE_DEBUG
  25. #define NODE_DBG c_printf
  26. #else
  27. #define NODE_DBG
  28. #endif /* NODE_DEBUG */
  29. #ifdef NODE_ERROR
  30. #define NODE_ERR c_printf
  31. #else
  32. #define NODE_ERR
  33. #endif /* NODE_ERROR */
  34. #define GPIO_INTERRUPT_ENABLE
  35. #define GPIO_INTERRUPT_HOOK_ENABLE
  36. // #define GPIO_SAFE_NO_INTR_ENABLE
  37. #define ICACHE_STORE_TYPEDEF_ATTR __attribute__((aligned(4),packed))
  38. #define ICACHE_STORE_ATTR __attribute__((aligned(4)))
  39. #define ICACHE_RAM_ATTR __attribute__((section(".iram0.text")))
  40. #ifdef GPIO_SAFE_NO_INTR_ENABLE
  41. #define NO_INTR_CODE ICACHE_RAM_ATTR __attribute__ ((noinline))
  42. #else
  43. #define NO_INTR_CODE inline
  44. #endif
  45. //#define CLIENT_SSL_ENABLE
  46. //#define MD2_ENABLE
  47. #define SHA2_ENABLE
  48. #define BUILD_SPIFFS 1
  49. #define SPIFFS_CACHE 1
  50. // #define LUA_NUMBER_INTEGRAL
  51. #define READLINE_INTERVAL 80
  52. #define LUA_TASK_PRIO USER_TASK_PRIO_0
  53. #define LUA_PROCESS_LINE_SIG 2
  54. #define LUA_OPTIMIZE_DEBUG 2
  55. #ifdef DEVKIT_VERSION_0_9
  56. #define KEYLED_INTERVAL 80
  57. #define KEY_SHORT_MS 200
  58. #define KEY_LONG_MS 3000
  59. #define KEY_SHORT_COUNT (KEY_SHORT_MS / READLINE_INTERVAL)
  60. #define KEY_LONG_COUNT (KEY_LONG_MS / READLINE_INTERVAL)
  61. #define LED_HIGH_COUNT_DEFAULT 10
  62. #define LED_LOW_COUNT_DEFAULT 0
  63. #endif
  64. #define ENDUSER_SETUP_AP_SSID "SetupGadget"
  65. /*
  66. * A valid hostname only contains alphanumeric and hyphen(-) characters, with no hyphens at first or last char
  67. * if WIFI_STA_HOSTNAME not defined: hostname will default to NODE-xxxxxx (xxxxxx being last 3 octets of MAC address)
  68. * if WIFI_STA_HOSTNAME defined: hostname must only contain alphanumeric characters
  69. * if WIFI_STA_HOSTNAME_APPEND_MAC not defined: Hostname MUST be 32 chars or less
  70. * if WIFI_STA_HOSTNAME_APPEND_MAC defined: Hostname MUST be 26 chars or less, since last 3 octets of MAC address will be appended
  71. * if defined hostname is invalid: hostname will default to NODE-xxxxxx (xxxxxx being last 3 octets of MAC address)
  72. */
  73. //#define WIFI_STA_HOSTNAME "NodeMCU"
  74. //#define WIFI_STA_HOSTNAME_APPEND_MAC
  75. //#define WIFI_SMART_ENABLE
  76. #define STRBUF_DEFAULT_INCREMENT 32
  77. #endif /* __USER_CONFIG_H__ */