SDInterface.h 750 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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. uint32_t initTime = 0;
  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. void addPacket(uint8_t* buf, uint32_t len);
  24. void openCapture(String file_name = "");
  25. void runUpdate();
  26. void performUpdate(Stream &updateSource, size_t updateSize);
  27. void main();
  28. //void savePacket(uint8_t* buf, uint32_t len);
  29. };
  30. #endif