Repository for import to local machine
Dependencies: DMBasicGUI DMSupport
Diff: QSPIBitmap.h
- Revision:
- 1:a5258871b33d
- Child:
- 3:010aeeacd7d7
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QSPIBitmap.h Thu Jul 20 08:42:29 2017 +0000 @@ -0,0 +1,77 @@ +#ifndef QSPIBITMAP_H +#define QSPIBITMAP_H + +#include "mbed.h" +#include "DMBoard.h" + +#include "GuiLib.h" +#include "GuiDisplay.h" + +#include "QSPIFileSystem.h" + +class QSPIBitmap +{ +public: + QSPIBitmap(); + + QSPIBitmap(char* bitmapName); + + ~QSPIBitmap(); + + void DisplayAt(GuiConst_INT16S X, GuiConst_INT16S Y); + + bool BitmapLoaded(void) { return bitmapLoaded; } + +private: + char name[200]; + + int size; + int debugVar1; + + GuiConst_INT8U* data; +// GuiConst_INT8U data[10000]; + + bool ReadBitmapSizeFile(void); + bool ReadBitmapDataFile(void); + bool GetBitmapFromQSPIDrive(void); + bool bitmapLoaded; +}; + + +class QSPIBitmaps +{ +public: + QSPIBitmaps(); + + void SetupArray(void); + + void ClearArray(void); + + void DisplayAllHomePageBitmaps(void); + + void DisplayColumnComponentBitmap(void); + void DisplayDetectorComponentBitmap(void); + void DisplayInjectorComponentBitmap(void); + void DisplayGasComponentBitmap(void); + + bool AllBitmapsLoaded(void); + +private: + bool arraySetUp; + + enum QSPIBitmapIndices { HOME_COLUMN_BITMAP = 0, + HOME_DETECTOR_BITMAP = 1, + HOME_INJECTOR_BITMAP = 2, + HOME_GAS_BITMAP = 3, + COMPONENT_COLUMN_BITMAP = 4, + COMPONENT_DETECTOR_BITMAP = 5, + COMPONENT_INJECTOR_BITMAP = 6, + COMPONENT_GAS_BITMAP = 7, + QSPIBITMAP_COUNT = 8 }; // 'QSPIBITMAP_COUNT' must always be last + + QSPIBitmap* qspibmArray[QSPIBITMAP_COUNT]; + + void DisplayBitmapAtIfLoaded(int bitmapIndex, GuiConst_INT16S X, GuiConst_INT16S Y); +}; + +#endif //QSPIBITMAP_H