Tezzeret  1
Tezzeret
GmTivaSDStorage.hpp
1 /*
2  * GmTivaSDStorage.hpp
3  *
4  * Created on: May 10, 2016
5  * Author: rcram
6  */
7 
8 #ifndef GMTIVASDSTORAGE_HPP_
9 #define GMTIVASDSTORAGE_HPP_
10 
11 #include <stdio.h>
12 #include <string.h>
13 #include <stdlib.h>
14 #include <stdbool.h>
15 #include <GmFatFs/ff.h>
16 
17 #if (GEO_FATFS_TI == GEO_TRUE)
18 #include <driverlib/gpio.h>
19 #include <driverlib/ssi.h>
20 #include <driverlib/sysctl.h>
21 #include <ti/sysbios/family/arm/m3/Hwi.h>
22 /* Status of Disk Functions */
23 typedef BYTE DSTATUS;
24 #define DRIVE_NOT_MOUNTED ~0
25 #endif
26 
27 
28 #include "GeoFatFsSurveyStorage.hpp"
29 #include <ti/drivers/SDSPI.h>
30 #if (GEO_FATFS_TI == GEO_TRUE)
31 #include <ti/drivers/sdspi/SDSPITiva.h>
32 #endif
33 
34 
35 typedef char** GmSessionNames;
36 
37 namespace Geometrics
38 {
40  {
41  public:
42  CTivaSDStorage ();
43  ~CTivaSDStorage ();
44  static int Setup ();
45  int Shutdown () { return 0; };
46 
47  const char *GetDrive ();
48 
49  protected:
50  virtual int GetFatFsBlockSize () { return GEO_SD_FATFS_BLOCK_SIZE; };
51  // static SDSPI_Handle m_sdspiHandle;
52  // static SDSPI_Params m_sdspiParams;
53 
54  public:
55 
56  /********************************************************************/
57  /* Factory setup. This class needs to able to instantiate objects */
58  /* in contexts where the caller doesn't know this derived class. */
59  /* Look for instances of IFatFsStorageFactory in the code to */
60  /* understand the use. */
61  /********************************************************************/
63  {
64  GeoFatFsSurveyStorage *MakeNewSurveyStorage ();
65  };
66 
67  static SdSurveyStorageFactory s_sdSurveyStorageFactory;
68  static void SetAsSurveyStorageFactory (const char whichStorage);
69  GeoFatFsSurveyStorage *GetSimilarStorage ();
70 
71  };
72 
73 
74 
75 }
76 
77 
78 #endif /* GMTIVASDSTORAGE_HPP_ */
Definition: GmTivaSDStorage.hpp:63
Definition: GmTivaSDStorage.hpp:40
Definition: GeoFatFsSurveyStorage.hpp:304
Definition: GeoFatFsSurveyStorage.hpp:19
GmApp/GmLoggingApp.hpp>
Definition: Analogs.hpp:47