settings.h 656 B

123456789101112131415161718192021222324
  1. #pragma once
  2. #include <avr/eeprom.h>
  3. struct config_s {
  4. union {
  5. unsigned char conf_u8[16];
  6. struct {
  7. unsigned char __empty1;
  8. unsigned char __empty2;
  9. } u8;
  10. };
  11. unsigned char flags[4];
  12. };
  13. /* flags list */
  14. #define CONFFLAG_DISABLE_FILTERS 0
  15. unsigned char settings_load(void); /* 0 - ok, 1 - error */
  16. void settings_store(void);
  17. unsigned char check_config_data(void); /* 0 - ok, 1 - error */
  18. void settings_display_and_modify_bool(unsigned char index, __flash const char *name, unsigned char k, unsigned char have_prev, unsigned char have_next);
  19. unsigned char get_flag(unsigned char index);
  20. void set_flag(unsigned char index, unsigned char val);