My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

cardreader.h 969B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef __CARDREADERH
  2. #define __CARDREADERH
  3. #ifdef SDSUPPORT
  4. #include "SdFat.h"
  5. class CardReader
  6. {
  7. public:
  8. CardReader();
  9. void initsd();
  10. void write_command(char *buf);
  11. //files auto[0-9].g on the sd card are performed in a row
  12. //this is to delay autostart and hence the initialisaiton of the sd card to some seconds after the normal init, so the device is available quick after a reset
  13. void checkautostart(bool x);
  14. void closefile();
  15. void getfilename(const uint8_t nr);
  16. uint8_t getnrfilenames();
  17. public:
  18. bool savetosd;
  19. SdFile file;
  20. uint32_t filesize;
  21. uint32_t sdpos ;
  22. bool sdmode ;
  23. SdFile root;
  24. bool sdactive ;
  25. char filename[11];
  26. private:
  27. Sd2Card card;
  28. SdVolume volume;
  29. //int16_t n;
  30. unsigned long autostart_atmillis;
  31. bool autostart_stilltocheck; //the sd start is delayed, because otherwise the serial cannot answer fast enought to make contact with the hostsoftware.
  32. };
  33. #endif //SDSUPPORT
  34. #endif