25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
511 B

  1. #pragma once
  2. #include <Arduino.h>
  3. #define POSITIONS_CONFIG_FILENAME "positions.config"
  4. #define POSITIONS_CONFIG_SEED 45
  5. #define POSITIONS_CONFIG_DeFAULT_SAVE_THRESHOLD 10
  6. struct SdPositionConfig_t {
  7. uint8_t seed;
  8. uint8_t saveThreshold;
  9. uint16_t lastSavedEntry;
  10. uint16_t fileIndex;
  11. uint32_t filePosition;
  12. size_t fileRecords;
  13. };
  14. namespace config {
  15. namespace backup {
  16. namespace sd {
  17. void setup();
  18. SdPositionConfig_t get();
  19. void set(SdPositionConfig_t config);
  20. void reset();
  21. }
  22. }
  23. }