SDCard version

Fork of gr-peach-opencv-project-sd-card by the do

Committer:
thedo
Date:
Fri Jul 21 01:26:54 2017 +0000
Revision:
167:2ee3e82cb6f5
Parent:
166:240bc5a0f42a
gr-peach-opencv-project-sd-card

Who changed what in which revision?

UserRevisionLine numberNew contents of line
thedo 166:240bc5a0f42a 1 #ifndef M_STORAGE_HPP
thedo 166:240bc5a0f42a 2 #define M_STORAGE_HPP
thedo 166:240bc5a0f42a 3
thedo 166:240bc5a0f42a 4 #include "mbed.h"
thedo 166:240bc5a0f42a 5 #include "rtos.h"
thedo 166:240bc5a0f42a 6 #include "FATFileSystem.h"
thedo 166:240bc5a0f42a 7 #include "SDBlockDevice_GR_PEACH.h"
thedo 166:240bc5a0f42a 8 #include "USBHostMSD.h"
thedo 166:240bc5a0f42a 9
thedo 166:240bc5a0f42a 10 enum mStorageError
thedo 166:240bc5a0f42a 11 {
thedo 166:240bc5a0f42a 12 STORG_PASS, STORG_FAIL
thedo 166:240bc5a0f42a 13 };
thedo 166:240bc5a0f42a 14
thedo 166:240bc5a0f42a 15 class cStorage
thedo 166:240bc5a0f42a 16 {
thedo 166:240bc5a0f42a 17 private:
thedo 166:240bc5a0f42a 18 FATFileSystem *fs;
thedo 166:240bc5a0f42a 19 SDBlockDevice_GR_PEACH sd;
thedo 166:240bc5a0f42a 20 USBHostMSD usb;
thedo 166:240bc5a0f42a 21 bool mounted;
thedo 166:240bc5a0f42a 22 public:
thedo 166:240bc5a0f42a 23 /* Constructor */
thedo 166:240bc5a0f42a 24 cStorage(char *name);
thedo 166:240bc5a0f42a 25
thedo 166:240bc5a0f42a 26 /* Destructor */
thedo 166:240bc5a0f42a 27 ~cStorage(void);
thedo 166:240bc5a0f42a 28
thedo 166:240bc5a0f42a 29 /*Check sd card is connected*/
thedo 166:240bc5a0f42a 30 mStorageError isConnectSdCard();
thedo 166:240bc5a0f42a 31 mStorageError mountSdCard();
thedo 166:240bc5a0f42a 32 mStorageError unmountSdCard();
thedo 166:240bc5a0f42a 33 };
thedo 166:240bc5a0f42a 34 #endif //M_STORAGE_HPP