Repository for import to local machine
Dependencies: DMBasicGUI DMSupport
QSPIBitmap.h@1:a5258871b33d, 2017-07-20 (annotated)
- Committer:
- jmitc91516
- Date:
- Thu Jul 20 08:42:29 2017 +0000
- Revision:
- 1:a5258871b33d
- Child:
- 3:010aeeacd7d7
Version before re-layout (July 2017). Also for mbed CLI import to local machine.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jmitc91516 | 1:a5258871b33d | 1 | #ifndef QSPIBITMAP_H |
jmitc91516 | 1:a5258871b33d | 2 | #define QSPIBITMAP_H |
jmitc91516 | 1:a5258871b33d | 3 | |
jmitc91516 | 1:a5258871b33d | 4 | #include "mbed.h" |
jmitc91516 | 1:a5258871b33d | 5 | #include "DMBoard.h" |
jmitc91516 | 1:a5258871b33d | 6 | |
jmitc91516 | 1:a5258871b33d | 7 | #include "GuiLib.h" |
jmitc91516 | 1:a5258871b33d | 8 | #include "GuiDisplay.h" |
jmitc91516 | 1:a5258871b33d | 9 | |
jmitc91516 | 1:a5258871b33d | 10 | #include "QSPIFileSystem.h" |
jmitc91516 | 1:a5258871b33d | 11 | |
jmitc91516 | 1:a5258871b33d | 12 | class QSPIBitmap |
jmitc91516 | 1:a5258871b33d | 13 | { |
jmitc91516 | 1:a5258871b33d | 14 | public: |
jmitc91516 | 1:a5258871b33d | 15 | QSPIBitmap(); |
jmitc91516 | 1:a5258871b33d | 16 | |
jmitc91516 | 1:a5258871b33d | 17 | QSPIBitmap(char* bitmapName); |
jmitc91516 | 1:a5258871b33d | 18 | |
jmitc91516 | 1:a5258871b33d | 19 | ~QSPIBitmap(); |
jmitc91516 | 1:a5258871b33d | 20 | |
jmitc91516 | 1:a5258871b33d | 21 | void DisplayAt(GuiConst_INT16S X, GuiConst_INT16S Y); |
jmitc91516 | 1:a5258871b33d | 22 | |
jmitc91516 | 1:a5258871b33d | 23 | bool BitmapLoaded(void) { return bitmapLoaded; } |
jmitc91516 | 1:a5258871b33d | 24 | |
jmitc91516 | 1:a5258871b33d | 25 | private: |
jmitc91516 | 1:a5258871b33d | 26 | char name[200]; |
jmitc91516 | 1:a5258871b33d | 27 | |
jmitc91516 | 1:a5258871b33d | 28 | int size; |
jmitc91516 | 1:a5258871b33d | 29 | int debugVar1; |
jmitc91516 | 1:a5258871b33d | 30 | |
jmitc91516 | 1:a5258871b33d | 31 | GuiConst_INT8U* data; |
jmitc91516 | 1:a5258871b33d | 32 | // GuiConst_INT8U data[10000]; |
jmitc91516 | 1:a5258871b33d | 33 | |
jmitc91516 | 1:a5258871b33d | 34 | bool ReadBitmapSizeFile(void); |
jmitc91516 | 1:a5258871b33d | 35 | bool ReadBitmapDataFile(void); |
jmitc91516 | 1:a5258871b33d | 36 | bool GetBitmapFromQSPIDrive(void); |
jmitc91516 | 1:a5258871b33d | 37 | bool bitmapLoaded; |
jmitc91516 | 1:a5258871b33d | 38 | }; |
jmitc91516 | 1:a5258871b33d | 39 | |
jmitc91516 | 1:a5258871b33d | 40 | |
jmitc91516 | 1:a5258871b33d | 41 | class QSPIBitmaps |
jmitc91516 | 1:a5258871b33d | 42 | { |
jmitc91516 | 1:a5258871b33d | 43 | public: |
jmitc91516 | 1:a5258871b33d | 44 | QSPIBitmaps(); |
jmitc91516 | 1:a5258871b33d | 45 | |
jmitc91516 | 1:a5258871b33d | 46 | void SetupArray(void); |
jmitc91516 | 1:a5258871b33d | 47 | |
jmitc91516 | 1:a5258871b33d | 48 | void ClearArray(void); |
jmitc91516 | 1:a5258871b33d | 49 | |
jmitc91516 | 1:a5258871b33d | 50 | void DisplayAllHomePageBitmaps(void); |
jmitc91516 | 1:a5258871b33d | 51 | |
jmitc91516 | 1:a5258871b33d | 52 | void DisplayColumnComponentBitmap(void); |
jmitc91516 | 1:a5258871b33d | 53 | void DisplayDetectorComponentBitmap(void); |
jmitc91516 | 1:a5258871b33d | 54 | void DisplayInjectorComponentBitmap(void); |
jmitc91516 | 1:a5258871b33d | 55 | void DisplayGasComponentBitmap(void); |
jmitc91516 | 1:a5258871b33d | 56 | |
jmitc91516 | 1:a5258871b33d | 57 | bool AllBitmapsLoaded(void); |
jmitc91516 | 1:a5258871b33d | 58 | |
jmitc91516 | 1:a5258871b33d | 59 | private: |
jmitc91516 | 1:a5258871b33d | 60 | bool arraySetUp; |
jmitc91516 | 1:a5258871b33d | 61 | |
jmitc91516 | 1:a5258871b33d | 62 | enum QSPIBitmapIndices { HOME_COLUMN_BITMAP = 0, |
jmitc91516 | 1:a5258871b33d | 63 | HOME_DETECTOR_BITMAP = 1, |
jmitc91516 | 1:a5258871b33d | 64 | HOME_INJECTOR_BITMAP = 2, |
jmitc91516 | 1:a5258871b33d | 65 | HOME_GAS_BITMAP = 3, |
jmitc91516 | 1:a5258871b33d | 66 | COMPONENT_COLUMN_BITMAP = 4, |
jmitc91516 | 1:a5258871b33d | 67 | COMPONENT_DETECTOR_BITMAP = 5, |
jmitc91516 | 1:a5258871b33d | 68 | COMPONENT_INJECTOR_BITMAP = 6, |
jmitc91516 | 1:a5258871b33d | 69 | COMPONENT_GAS_BITMAP = 7, |
jmitc91516 | 1:a5258871b33d | 70 | QSPIBITMAP_COUNT = 8 }; // 'QSPIBITMAP_COUNT' must always be last |
jmitc91516 | 1:a5258871b33d | 71 | |
jmitc91516 | 1:a5258871b33d | 72 | QSPIBitmap* qspibmArray[QSPIBITMAP_COUNT]; |
jmitc91516 | 1:a5258871b33d | 73 | |
jmitc91516 | 1:a5258871b33d | 74 | void DisplayBitmapAtIfLoaded(int bitmapIndex, GuiConst_INT16S X, GuiConst_INT16S Y); |
jmitc91516 | 1:a5258871b33d | 75 | }; |
jmitc91516 | 1:a5258871b33d | 76 | |
jmitc91516 | 1:a5258871b33d | 77 | #endif //QSPIBITMAP_H |