Tezzeret  1
Tezzeret
GmTivaUsbStorage.hpp
1 /*
2  * GmTivaSDStorage.hpp
3  *
4  * Created on: May 10, 2016
5  * Author: rcram
6  */
7 
8 #ifndef GM_TIVA_USB_STORAGE_HPP_
9 #define GM_TIVA_USB_STORAGE_HPP_
10 
11 #if GEO_USB_STORAGE == GEO_TRUE
12 
13 #include <stdio.h>
14 #include <string.h>
15 #include <stdlib.h>
16 #include <stdbool.h>
17 #include <GmFatFs/ff.h>
18 #include "GeoFatFsSurveyStorage.hpp"
19 
20 //#include <ti/drivers/USBMSCHFatFs.h> // TODO Shouldn't it refer to Geo copy? Issue with SD also.
21 #include <GmFatFs/USBMSCHFatFs.h> // TODO Shouldn't it refer to Geo copy? Issue with SD also.
22 
23 namespace Geometrics
24 {
26  {
27  public:
29  ~GmTivaUsbStorage ();
30  const char *GetDrive ();
31  int Shutdown () {return 0;};
32  protected:
33  virtual int GetFatFsBlockSize () { return GEO_USB_FATFS_BLOCK_SIZE; };
34 
35 
36  public:
37 
38  /********************************************************************/
39  /* Factory setup. This class needs to able to instantiate objects */
40  /* in contexts where the caller doesn't know this derived class. */
41  /* Look for instances of IFatFsStorageFactory in the code to */
42  /* understand the use. */
43  /********************************************************************/
45  {
46  GeoFatFsSurveyStorage *MakeNewSurveyStorage ();
47  };
48 
49  static UsbSurveyStorageFactory s_usbSurveyStorageFactory;
50  static void SetAsSurveyStorageFactory (const char whichStorage);
51  virtual GeoFatFsSurveyStorage *GetSimilarStorage ();
52 
53  };
54 }
55 #endif
56 
57 #endif /* GMTIVASDSTORAGE_HPP_ */
Definition: GeoFatFsSurveyStorage.hpp:304
Definition: GeoFatFsSurveyStorage.hpp:19
Definition: GmTivaUsbStorage.hpp:26
GmApp/GmLoggingApp.hpp>
Definition: Analogs.hpp:47