config.hpp 355 B

12345678910111213141516171819202122232425
  1. #ifndef CONFIG_H
  2. #define CONFIG_H
  3. #include <inttypes.h>
  4. #include <Arduino.h>
  5. #include <avr/wdt.h>
  6. #include <EEPROM.h>
  7. struct config_t {
  8. union {
  9. struct{
  10. char ssid[16];
  11. char pass[16];
  12. char host[24];
  13. int port;
  14. };
  15. uint8_t bytes[16+16+24];
  16. };
  17. };
  18. extern config_t config;
  19. void config_init();
  20. void config_save();
  21. #endif