Request results getters moved to display base.
5 #ifndef FUTABA_GP1212A02_H
6 #define FUTABA_GP1212A02_H
8 #include "FutabaGP1212.h"
10 #include "FutabaGP1212.h"
11 #include "FutabaVfd.h"
14 GP1212A01A is a graphic display module using a FUTABA 256x64dots VFD.
15 The module do not include character ROM, the customer will compile the character
16 by themselves (from main system).
18 class GP1212A02A : public GP1212XXXX
27 virtual void SwapBuffers();
30 virtual void SetPixel(unsigned char aX, unsigned char aY, bool aOn);
31 virtual void SetAllPixels(unsigned char aPattern);
32 virtual int FrameBufferSizeInBytes() const {return KGP12xFrameBufferSizeInBytes;}
33 virtual void BitBlit(const BitArray& aBitmap, int aSrcWidth, int aSrcHeight, int aTargetX, int aTargetY) const;
34 virtual void SetBrightness(int aBrightness);
38 //Specific to GP1212A01A
39 void SetPixelBlock(unsigned char aX, unsigned char aY, int aHeight, int aSize, unsigned char aValue);
40 void SetPixelBlock(unsigned char aX, unsigned char aY, int aHeight, int aSize, unsigned char* aPixels);
41 //Define display position within our display RAM
42 void SetDisplayPosition(unsigned char aX, unsigned char aY);
43 unsigned char DisplayPositionX() const {return iDisplayPositionX;}
44 unsigned char DisplayPositionY() const {return iDisplayPositionY;}
47 void RequestDeviceId();
48 void RequestFirmwareRevision();
49 void RequestPowerSupplyStatus();
51 void ToggleOffScreenMode();
52 void SetOffScreenMode(bool aOn);
53 bool OffScreenMode() const {return iOffScreenMode;}
55 void SetFrameDifferencing(bool aOn){iUseFrameDifferencing=aOn;}
56 bool FrameDifferencing() const {return iUseFrameDifferencing;}
58 TMiniDisplayRequest AttemptRequestCompletion();
59 FutabaVfdReport& InputReport() {return iInputReport;}
62 char* FirmwareRevision();
71 void SetDisplayPosition(DW aDw,unsigned char aX, unsigned char aY);
72 unsigned char OffScreenY() const;
73 void SendClearCommand();
74 void OffScreenTranslation(unsigned char& aX, unsigned char& aY);
76 void SendModifiedPixelBlocks();
79 unsigned char iDisplayPositionX;
80 unsigned char iDisplayPositionY;
81 ///Off screen mode is the recommended default settings to avoid tearing.
82 ///Though turning it off can be useful for debugging
84 ///Frame differences algo is used to reduce USB bus traffic and improve frame rate in typical use case
85 bool iUseFrameDifferencing;
87 //FutabaVfdReport iReport;
89 //unsigned char iFrameBuffer[256*64];
91 BitArray* iFrameCurrent;
92 BitArray* iFramePrevious;
94 BitArray* iFrameAlpha;
96 BitArray* iFrameGamma;
98 int iNeedFullFrameUpdate;
99 //unsigned char iFrameBeta[256*64];
100 //unsigned char *iFrontBuffer;
101 //unsigned char *iBackBuffer;
102 FutabaVfdReport iInputReport;
104 char iDeviceId[KFutabaMaxHidReportSize];
105 char iFirmwareRevision[KFutabaMaxHidReportSize];