user_config.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifndef __USER_CONFIG_H__
  2. #define __USER_CONFIG_H__
  3. #define ESP_PLATFORM 1
  4. #define LEWEI_PLATFORM 0
  5. #define USE_OPTIMIZE_PRINTF
  6. #if ESP_PLATFORM
  7. #define PLUG_DEVICE 0
  8. #define LIGHT_DEVICE 1
  9. #define SENSOR_DEVICE 0
  10. #if SENSOR_DEVICE
  11. #define HUMITURE_SUB_DEVICE 1
  12. #define FLAMMABLE_GAS_SUB_DEVICE 0
  13. #endif
  14. //#define SERVER_SSL_ENABLE
  15. //#define CLIENT_SSL_ENABLE
  16. //#define UPGRADE_SSL_ENABLE
  17. #define USE_DNS
  18. #ifdef USE_DNS
  19. #define ESP_DOMAIN "iot.espressif.cn"
  20. #endif
  21. //#define SOFTAP_ENCRYPT
  22. #ifdef SOFTAP_ENCRYPT
  23. #define PASSWORD "v*%W>L<@i&Nxe!"
  24. #endif
  25. #if SENSOR_DEVICE
  26. #define SENSOR_DEEP_SLEEP
  27. #if HUMITURE_SUB_DEVICE
  28. #define SENSOR_DEEP_SLEEP_TIME 30000000
  29. #elif FLAMMABLE_GAS_SUB_DEVICE
  30. #define SENSOR_DEEP_SLEEP_TIME 60000000
  31. #endif
  32. #endif
  33. #if LIGHT_DEVICE
  34. #define USE_US_TIMER
  35. #endif
  36. #if PLUG_DEVICE || LIGHT_DEVICE
  37. #define BEACON_TIMEOUT 150000000
  38. #define BEACON_TIME 50000
  39. #endif
  40. #define AP_CACHE 1
  41. #if AP_CACHE
  42. #define AP_CACHE_NUMBER 5
  43. #endif
  44. #elif LEWEI_PLATFORM
  45. #endif
  46. #endif