#ifndef SDCARDMANAGER_H
#define SDCARDMANAGER_H
#include <SD.h>
#include "definition.h"

class SDCardManager : public SDClass
{
  friend class SAB;
  public:
    SDCardManager(const Pin csPin, SPISettings cfg);
    
    double getSize(const SizeUnit sizeUnit = GBYTE);
    boolean mountSD();
    void unMountSD();
  
    boolean isMounted();
  
  protected:
    SDCardManager();
  private:
    const Pin _csPin;
    SPISettings _spiCfg;
    boolean _mounted;
};

#endif //SDCARDMANAGER_H
