|
-
- #ifndef SdVolume_h
- #include "SdSpiCard.h"
- #include "utility/FatLib.h"
- #define SdVolume_h
- #ifndef USE_SD_VOLUME
- #error SdVolume is deperacated. Remove this line to continue using this class.
- #endif
-
-
- class SdVolume : public FatVolume {
- public:
-
-
- bool init(Sd2Card* dev) {
- return init(dev, 1) ? true : init(dev, 0);
- }
-
-
- bool init(Sd2Card* dev, uint8_t part) {
- m_sdCard = dev;
- return FatVolume::init(part);
- }
-
- private:
-
- bool readBlock(uint32_t block, uint8_t* dst) {
- return m_sdCard->readBlock(block, dst);
- }
- bool writeBlock(uint32_t block, const uint8_t* src) {
- return m_sdCard->writeBlock(block, src);
- }
- bool readBlocks(uint32_t block, uint8_t* dst, size_t n) {
- return m_sdCard->readBlocks(block, dst, n);
- }
- bool writeBlocks(uint32_t block, const uint8_t* src, size_t n) {
- return m_sdCard->writeBlocks(block, src, n);
- }
- Sd2Card* m_sdCard;
- };
- #endif
|