esp32 soundboard project
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.

26 lines
423 B

8 years ago
#ifndef _SDCARD_H
#define _SDCARD_H
#include "Arduino.h"
#include "FS.h"
#include "SD.h"
#include "SPI.h"
8 years ago
class SDCard {
public:
SDCard();
void mount();
void umount();
8 years ago
void open(const char *path);
void close();
size_t read(uint16_t *buffer, size_t len);
bool available();
8 years ago
private:
fs::FS &fs = SD;
uint8_t cardType;
uint64_t cardSize;
8 years ago
File file;
8 years ago
};
#endif /* _SDCARD_H */