max80_config.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #ifndef __MAX80_DEFS_H__
  2. #define __MAX80_DEFS_H__
  3. #include <Arduino.h>
  4. #define TRUE 1
  5. #define FALSE 0
  6. // Software config
  7. #define MAX80_FWVERSION 1
  8. #define MAX80_HWVERSION 101
  9. // Serial port settings
  10. #define MAX80_SERIAL_BAUD_RATE 921600
  11. //Logging
  12. #define MAX80_LOGGING_ENABLE_SERIAL
  13. #ifndef MAX80_LOGGING_SERIAL_PORT
  14. #define MAX80_LOGGING_SERIAL_PORT Serial
  15. #endif
  16. #define MAX80_LOGGING_VERBOSE_LEVEL 5
  17. //WIFI
  18. #ifndef MAX80_WIFI_RETRY_TIMEOUT
  19. #define MAX80_WIFI_RETRY_TIMEOUT 00
  20. #endif
  21. #ifndef MAX80_WIFI_TIMEOUT_MS
  22. #define MAX80_WIFI_TIMEOUT_MS 10000
  23. #endif
  24. #ifndef MAX80_WIFI_RECOVER_TIME_MS
  25. #define MAX80_WIFI_RECOVER_TIME_MS 30000
  26. #endif
  27. #define MAX80_WIFI_SSID "MAX80"
  28. #define MAX80_WIFI_PSK "max80!!!"
  29. #define MAX80_WIFI_HOSTNAME "ABC80-MAX80"
  30. #define MAX80_SPIFFS_CONFIG_PART "data"
  31. #define MAX80_CONFIG_FILNAME "/config"
  32. #define MAX80_SPIFFS_PATH "/"
  33. #define MAX80_SPIFFS_PARTITION "data"
  34. #define SSID_MAX_LEN 32
  35. #define PASS_MAX_LEN 64
  36. typedef struct
  37. {
  38. char wifi_ssid[SSID_MAX_LEN];
  39. char wifi_pw [PASS_MAX_LEN];
  40. } max80config;
  41. #define NUM_WIFI_CREDENTIALS 1
  42. typedef struct
  43. {
  44. max80config WiFi_Creds [NUM_WIFI_CREDENTIALS];
  45. uint16_t checksum;
  46. } max80Config;
  47. #endif