You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#ifndef _SDCARD_H
|
|
|
|
#define _SDCARD_H
|
|
|
|
|
|
|
|
#include "Arduino.h"
|
|
|
|
#include "FS.h"
|
|
|
|
#include "SD.h"
|
|
|
|
#include "SPI.h"
|
|
|
|
#include "datasource.h"
|
|
|
|
|
|
|
|
class SDCard: public DataSource {
|
|
|
|
public:
|
|
|
|
SDCard();
|
|
|
|
void mount();
|
|
|
|
void umount();
|
|
|
|
static void open(const char *path);
|
|
|
|
static void close();
|
|
|
|
static size_t read();
|
|
|
|
static bool available();
|
|
|
|
static File file;
|
|
|
|
static constexpr fs::FS &fs = SD;
|
|
|
|
private:
|
|
|
|
uint8_t cardType;
|
|
|
|
uint64_t cardSize;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* _SDCARD_H */
|