user_esp_platform.h 647 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef __USER_DEVICE_H__
  2. #define __USER_DEVICE_H__
  3. /* NOTICE---this is for 512KB spi flash.
  4. * you can change to other sector if you use other size spi flash. */
  5. #define ESP_PARAM_START_SEC 0x3D
  6. #define packet_size (2 * 1024)
  7. #define token_size 41
  8. struct esp_platform_saved_param {
  9. uint8 devkey[40];
  10. uint8 token[40];
  11. uint8 activeflag;
  12. uint8 pad[3];
  13. };
  14. enum {
  15. DEVICE_CONNECTING = 40,
  16. DEVICE_ACTIVE_DONE,
  17. DEVICE_ACTIVE_FAIL,
  18. DEVICE_CONNECT_SERVER_FAIL
  19. };
  20. struct dhcp_client_info {
  21. ip_addr_t ip_addr;
  22. ip_addr_t netmask;
  23. ip_addr_t gw;
  24. uint8 flag;
  25. uint8 pad[3];
  26. };
  27. #endif