A small USV for ALIX boards with i2c support
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

eeprom.h 468B

123456789101112131415161718192021222324252627
  1. #ifndef _EEPROM_PARAMETERS_H_
  2. #define _EEPROM_PARAMETERS_H_
  3. struct ee_param {
  4. int16_t uin_loss;
  5. int16_t uin_restore;
  6. int16_t ubat_full;
  7. int16_t ubat_low;
  8. int16_t ubat_critical;
  9. int16_t ibat_full;
  10. uint16_t crc16;
  11. };
  12. #define DEFAULT_PARAMETERS { \
  13. .uin_loss = 12000, \
  14. .uin_restore = 14000, \
  15. .ubat_full = 13300, \
  16. .ubat_low = 12000, \
  17. .ubat_critical = 11000, \
  18. .ibat_full = 150, \
  19. };
  20. uint8_t read_parameters(void);
  21. void write_parameters(void);
  22. #endif