Repository for import to local machine
Dependencies: DMBasicGUI DMSupport
QSPIBitmap.h@8:26e49e6955bd, 2017-07-31 (annotated)
- Committer:
- jmitc91516
- Date:
- Mon Jul 31 15:37:57 2017 +0000
- Revision:
- 8:26e49e6955bd
- Parent:
- 3:010aeeacd7d7
Method ramp scrolling improved, and more bitmaps moved to QSPI memory
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 | 8:26e49e6955bd | 21 | void ShowAt(GuiConst_INT16S X, GuiConst_INT16S Y, GuiConst_INT32S transparentColour); |
jmitc91516 | 8:26e49e6955bd | 22 | void ShowAreaAt(GuiConst_INT16S X, GuiConst_INT16S Y, GuiConst_INT16S AX1, GuiConst_INT16S AY1, GuiConst_INT16S AX2, GuiConst_INT16S AY2, GuiConst_INT32S transparentColour); |
jmitc91516 | 1:a5258871b33d | 23 | |
jmitc91516 | 1:a5258871b33d | 24 | bool BitmapLoaded(void) { return bitmapLoaded; } |
jmitc91516 | 1:a5258871b33d | 25 | |
jmitc91516 | 1:a5258871b33d | 26 | private: |
jmitc91516 | 1:a5258871b33d | 27 | char name[200]; |
jmitc91516 | 1:a5258871b33d | 28 | |
jmitc91516 | 1:a5258871b33d | 29 | int size; |
jmitc91516 | 1:a5258871b33d | 30 | int debugVar1; |
jmitc91516 | 1:a5258871b33d | 31 | |
jmitc91516 | 1:a5258871b33d | 32 | GuiConst_INT8U* data; |
jmitc91516 | 1:a5258871b33d | 33 | // GuiConst_INT8U data[10000]; |
jmitc91516 | 1:a5258871b33d | 34 | |
jmitc91516 | 1:a5258871b33d | 35 | bool ReadBitmapSizeFile(void); |
jmitc91516 | 1:a5258871b33d | 36 | bool ReadBitmapDataFile(void); |
jmitc91516 | 1:a5258871b33d | 37 | bool GetBitmapFromQSPIDrive(void); |
jmitc91516 | 1:a5258871b33d | 38 | bool bitmapLoaded; |
jmitc91516 | 1:a5258871b33d | 39 | }; |
jmitc91516 | 1:a5258871b33d | 40 | |
jmitc91516 | 1:a5258871b33d | 41 | |
jmitc91516 | 1:a5258871b33d | 42 | class QSPIBitmaps |
jmitc91516 | 1:a5258871b33d | 43 | { |
jmitc91516 | 1:a5258871b33d | 44 | public: |
jmitc91516 | 1:a5258871b33d | 45 | QSPIBitmaps(); |
jmitc91516 | 1:a5258871b33d | 46 | |
jmitc91516 | 1:a5258871b33d | 47 | void SetupArray(void); |
jmitc91516 | 1:a5258871b33d | 48 | |
jmitc91516 | 1:a5258871b33d | 49 | void ClearArray(void); |
jmitc91516 | 1:a5258871b33d | 50 | |
jmitc91516 | 1:a5258871b33d | 51 | void DisplayAllHomePageBitmaps(void); |
jmitc91516 | 1:a5258871b33d | 52 | |
jmitc91516 | 1:a5258871b33d | 53 | void DisplayColumnComponentBitmap(void); |
jmitc91516 | 1:a5258871b33d | 54 | void DisplayDetectorComponentBitmap(void); |
jmitc91516 | 1:a5258871b33d | 55 | void DisplayInjectorComponentBitmap(void); |
jmitc91516 | 1:a5258871b33d | 56 | void DisplayGasComponentBitmap(void); |
jmitc91516 | 1:a5258871b33d | 57 | |
jmitc91516 | 8:26e49e6955bd | 58 | void DisplayBootScreenBitmap(void); |
jmitc91516 | 8:26e49e6955bd | 59 | void DisplayBlankBackgroundBitmap(void); |
jmitc91516 | 8:26e49e6955bd | 60 | |
jmitc91516 | 8:26e49e6955bd | 61 | void DisplayUpArrowBitmap(GuiConst_INT16S X, GuiConst_INT16S Y); |
jmitc91516 | 8:26e49e6955bd | 62 | void DisplayDownArrowBitmap(GuiConst_INT16S X, GuiConst_INT16S Y); |
jmitc91516 | 8:26e49e6955bd | 63 | |
jmitc91516 | 1:a5258871b33d | 64 | bool AllBitmapsLoaded(void); |
jmitc91516 | 1:a5258871b33d | 65 | |
jmitc91516 | 1:a5258871b33d | 66 | private: |
jmitc91516 | 1:a5258871b33d | 67 | bool arraySetUp; |
jmitc91516 | 1:a5258871b33d | 68 | |
jmitc91516 | 1:a5258871b33d | 69 | enum QSPIBitmapIndices { HOME_COLUMN_BITMAP = 0, |
jmitc91516 | 1:a5258871b33d | 70 | HOME_DETECTOR_BITMAP = 1, |
jmitc91516 | 1:a5258871b33d | 71 | HOME_INJECTOR_BITMAP = 2, |
jmitc91516 | 1:a5258871b33d | 72 | HOME_GAS_BITMAP = 3, |
jmitc91516 | 1:a5258871b33d | 73 | COMPONENT_COLUMN_BITMAP = 4, |
jmitc91516 | 1:a5258871b33d | 74 | COMPONENT_DETECTOR_BITMAP = 5, |
jmitc91516 | 1:a5258871b33d | 75 | COMPONENT_INJECTOR_BITMAP = 6, |
jmitc91516 | 1:a5258871b33d | 76 | COMPONENT_GAS_BITMAP = 7, |
jmitc91516 | 8:26e49e6955bd | 77 | BOOT_SCREEN_BITMAP = 8, |
jmitc91516 | 8:26e49e6955bd | 78 | BLANK_BACKGROUND_BITMAP = 9, |
jmitc91516 | 8:26e49e6955bd | 79 | UP_ARROW_BITMAP = 10, |
jmitc91516 | 8:26e49e6955bd | 80 | DOWN_ARROW_BITMAP = 11, |
jmitc91516 | 8:26e49e6955bd | 81 | QSPIBITMAP_COUNT = 12 }; // 'QSPIBITMAP_COUNT' must always be last - it tells the class how large its array should be |
jmitc91516 | 1:a5258871b33d | 82 | |
jmitc91516 | 1:a5258871b33d | 83 | QSPIBitmap* qspibmArray[QSPIBITMAP_COUNT]; |
jmitc91516 | 1:a5258871b33d | 84 | |
jmitc91516 | 3:010aeeacd7d7 | 85 | void DisplayBitmapAtIfLoaded(int bitmapIndex, GuiConst_INT16S X, GuiConst_INT16S Y, GuiConst_INT32S transparentColour); |
jmitc91516 | 1:a5258871b33d | 86 | }; |
jmitc91516 | 1:a5258871b33d | 87 | |
jmitc91516 | 1:a5258871b33d | 88 | #endif //QSPIBITMAP_H |