SDInterface.h 791 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef SDInterface_h
  2. #define SDInterface_h
  3. #include "SD.h"
  4. #include "Buffer.h"
  5. #include "Display.h"
  6. #include <Update.h>
  7. extern Buffer buffer_obj;
  8. extern Display display_obj;
  9. #define SD_CS 12
  10. class SDInterface {
  11. private:
  12. bool sd_running = false;
  13. public:
  14. uint8_t cardType;
  15. //uint64_t cardSizeBT;
  16. //uint64_t cardSizeKB;
  17. uint64_t cardSizeMB;
  18. //uint64_t cardSizeGB;
  19. bool supported = false;
  20. bool do_save = true;
  21. String card_sz;
  22. bool initSD();
  23. bool stopSD();
  24. bool startSD();
  25. void addPacket(uint8_t* buf, uint32_t len);
  26. void openCapture(String file_name = "");
  27. void runUpdate();
  28. void performUpdate(Stream &updateSource, size_t updateSize);
  29. void main();
  30. //void savePacket(uint8_t* buf, uint32_t len);
  31. };
  32. #endif