MDM166AA swap buffers now working.
5 #ifndef FUTABA_GP1212A01_H
6 #define FUTABA_GP1212A01_H
8 #include "FutabaGP1212.h"
12 GP1212A01A is a graphic display module using a FUTABA 256x64dots VFD.
13 The module do not include character ROM, the customer will compile the character
14 by themselves (from main system).
16 class GP1212A01A : public GP1212XXXX
27 //From FutabaGraphicVfd
28 virtual void SetPixel(unsigned char aX, unsigned char aY, unsigned int aPixel);
29 virtual void SetAllPixels(unsigned char aPattern);
30 virtual int FrameBufferSizeInBytes() const {return KGP12xFrameBufferSizeInBytes;}
31 //virtual void BitBlit(const BitArray& aBitmap, int aSrcWidth, int aSrcHeight, int aTargetX, int aTargetY) const;
33 virtual void SetBrightness(int aBrightness);
37 //Specific to GP1212A01A
38 void SetPixelBlock(unsigned char aX, unsigned char aY, int aHeight, int aSize, unsigned char aValue);
39 void SetPixelBlock(unsigned char aX, unsigned char aY, int aHeight, int aSize, unsigned char* aPixels);
40 //Define display position within our display RAM
41 void SetDisplayPosition(unsigned char aX, unsigned char aY);
42 unsigned char DisplayPositionX() const {return iDisplayPositionX;}
43 unsigned char DisplayPositionY() const {return iDisplayPositionY;}
47 virtual void Request(TMiniDisplayRequest aRequest);
49 void ToggleOffScreenMode();
50 void SetOffScreenMode(bool aOn);
51 bool OffScreenMode() const {return iOffScreenMode;}
53 void SetFrameDifferencing(bool aOn){iUseFrameDifferencing=aOn;}
54 bool FrameDifferencing() const {return iUseFrameDifferencing;}
56 TMiniDisplayRequest AttemptRequestCompletion();
57 FutabaVfdReport& InputReport() {return iInputReport;}
60 void RequestDeviceId();
61 void RequestFirmwareRevision();
62 void RequestPowerSupplyStatus();
72 void SetDisplayPosition(DW aDw,unsigned char aX, unsigned char aY);
73 unsigned char OffScreenY() const;
74 void SendClearCommand();
75 void OffScreenTranslation(unsigned char& aX, unsigned char& aY);
77 void SendModifiedPixelBlocks();
80 unsigned char iDisplayPositionX;
81 unsigned char iDisplayPositionY;
82 ///Off screen mode is the recommended default settings to avoid tearing.
83 ///Though turning it off can be useful for debugging
85 ///Frame differences algo is used to reduce USB bus traffic and improve frame rate in typical use case
86 bool iUseFrameDifferencing;
88 //FutabaVfdReport iReport;
90 //unsigned char iFrameBuffer[256*64];
91 BitArrayHigh* iFrameNext;
92 BitArrayHigh* iFrameCurrent;
93 BitArrayHigh* iFramePrevious;
95 BitArrayHigh* iFrameAlpha;
96 BitArrayHigh* iFrameBeta;
97 BitArrayHigh* iFrameGamma;
99 int iNeedFullFrameUpdate;
100 //unsigned char iFrameBeta[256*64];
101 //unsigned char *iFrontBuffer;
102 //unsigned char *iBackBuffer;
103 FutabaVfdReport iInputReport;