Skip to content

Commit

Permalink
non-static while pointer is used
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Apr 4, 2021
1 parent b7afdce commit 004142e
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,31 +49,31 @@

class DiskIODriver_USBFlash : public DiskIODriver {
private:
static uint32_t pos;
uint32_t pos;

static void usbStateDebug();
void usbStateDebug();

public:
static bool usbStartup();
bool usbStartup();

static bool init(const uint8_t sckRateID=0, const pin_t chipSelectPin=TERN(USE_OTG_USB_HOST, 0, SD_CHIP_SELECT_PIN));
bool init(const uint8_t sckRateID=0, const pin_t chipSelectPin=TERN(USE_OTG_USB_HOST, 0, SD_CHIP_SELECT_PIN));

static void idle();
void idle();

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 readStart(const uint32_t block) { pos = block; return isReady(); }
inline bool readData(uint8_t *dst) { return readBlock(pos++, dst); }
inline bool readStop() const { return true; }

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; }
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); }
inline bool writeStop() const { return true; }

static bool readBlock(uint32_t block, uint8_t *dst);
static bool writeBlock(uint32_t blockNumber, const uint8_t *src);
bool readBlock(uint32_t block, uint8_t *dst);
bool writeBlock(uint32_t blockNumber, const uint8_t *src);

//static bool readCSD(csd_t*) { return true; }
bool readCSD(csd_t*) { return true; }

static uint32_t cardSize();
static bool isInserted();
static bool isReady();
uint32_t cardSize();
bool isInserted();
bool isReady();
};

0 comments on commit 004142e

Please sign in to comment.