diff --git a/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.h b/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.h index ac6e094147a1..537134fa9ce4 100644 --- a/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.h +++ b/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.h @@ -49,31 +49,31 @@ class DiskIODriver_USBFlash : public DiskIODriver { private: - uint32_t pos; + static uint32_t pos; - void usbStateDebug(); + static void usbStateDebug(); public: - bool usbStartup(); + static bool usbStartup(); - bool init(const uint8_t sckRateID=0, const pin_t chipSelectPin=TERN(USE_OTG_USB_HOST, 0, SD_CHIP_SELECT_PIN)); + static bool init(const uint8_t sckRateID=0, const pin_t chipSelectPin=TERN(USE_OTG_USB_HOST, 0, SD_CHIP_SELECT_PIN)); - void idle(); + static void idle(); - inline bool readStart(const uint32_t block) { pos = block; return isReady(); } - inline bool readData(uint8_t *dst) { return readBlock(pos++, dst); } + static inline bool readStart(const uint32_t block) { pos = block; return isReady(); } + static inline bool readData(uint8_t *dst) { return readBlock(pos++, dst); } //static inline bool readStop() { return true; } - inline bool writeStart(const uint32_t block, const uint32_t) { pos = block; return isReady(); } - inline bool writeData(const uint8_t *src) { return writeBlock(pos++, src); } + static inline bool writeStart(const uint32_t block, const uint32_t) { pos = block; return isReady(); } + static inline bool writeData(const uint8_t *src) { return writeBlock(pos++, src); } //static inline bool writeStop() { return true; } - bool readBlock(uint32_t block, uint8_t *dst); - bool writeBlock(uint32_t blockNumber, const uint8_t *src); + static bool readBlock(uint32_t block, uint8_t *dst); + static bool writeBlock(uint32_t blockNumber, const uint8_t *src); //static bool readCSD(csd_t*) { return true; } - uint32_t cardSize(); - bool isInserted(); - bool isReady(); + static uint32_t cardSize(); + static bool isInserted(); + static bool isReady(); };