MDM166AA: Clock and Clear adjustments.
5 #ifndef FUTABA_GP1212A02_H
6 #define FUTABA_GP1212A02_H
8 #include "FutabaGP1212.h"
12 GP1212A02A is a graphic display module using a FUTABA 256x64dots VFD.
13 The module will support the interface of I2C, RS-232C and USB2.0 communications.
14 The module include flash ROM (4Mbyte), the customer will definable the BMP data and download
16 It realizes displaying a Japanese font (refer to Table-24) and BMP by I2C, RS-232C or USB2.0
17 communications. Other font tables (ex. Chinese, Korean, European and custom font) can be appended to
19 Since a DC/DC converter is included, 5V power source is required to operate the module.
21 class GP1212A02A : public GP1212XXXX
30 virtual void SwapBuffers();
31 virtual void TurnPowerOn();
32 virtual void TurnPowerOff();
33 virtual bool SupportPowerOnOff(){return true;}
34 virtual void ShowClock();
35 virtual void HideClock();
36 virtual bool SupportClock(){return true;}
37 virtual void SetBrightness(int aBrightness);
40 virtual TMiniDisplayRequest AttemptRequestCompletion();
41 virtual void Request(TMiniDisplayRequest aRequest);
46 virtual void SetPixel(unsigned char aX, unsigned char aY, unsigned int aPixel);
47 virtual void SetAllPixels(unsigned char aPattern);
48 virtual int FrameBufferSizeInBytes() const {return KGP12xFrameBufferSizeInBytes;}
53 void ToggleOffScreenMode();
54 void SetOffScreenMode(bool aOn);
55 bool OffScreenMode() const {return iOffScreenMode;}
57 void SetFrameDifferencing(bool aOn){iUseFrameDifferencing=aOn;}
58 bool FrameDifferencing() const {return iUseFrameDifferencing;}
59 FutabaVfdReport& InputReport() {return iInputReport;}
73 ETargetDisplayWindow=0x30,
74 ETargetDataMemory=0x31
108 enum TFontSizeLogical
130 EFontTransfer = 0x31,
136 //Specific to GP1212A02A
137 //General setting command
138 void SendCommandClear();
139 void SendCommandReset();
141 void BmpDataInput(TTarget aTarget, unsigned short aAddress, TDirection aDirection, unsigned short aSize, unsigned char* aPixels);
143 void SendCommandPower(TPowerStatus aPowerStatus);
145 void SendCommandClockSetting(TWeekDay aWeekDay, unsigned char aHour, unsigned char aMinute);
146 void SendCommandClockDisplay(TClockFormat aClockFormat, unsigned short aAddress, TFontSizeLogical aSize);
147 void SendCommandClockCancel();
149 void SendCommandDefineCharacter(TFontSize aFontSize, unsigned short aCharacterCode, unsigned char* aPixelData);
150 void SendCommandFontAction(TFontAction aFontAction);
151 void SendCommandSelectFontSize(TFontSizeLogical aFontSoze);
155 void BmpBoxSetting(TBmpBoxId aBoxId, unsigned short aAddress, int aWidth, int aHeight);
156 void BmpBoxSelect(TBmpBoxId aBoxId);
157 void BmpBoxDataMemoryTransfer(unsigned short aAddress);
158 void BmpBoxDataInput(unsigned short aSize, unsigned char* aPixels);
161 int ClockCharCount(TClockFormat aFormat);
162 int ClockCharWidthInPixels(TFontSizeLogical aSize);
163 int ClockCharHeightInPixels(TFontSizeLogical aSize);
164 unsigned short ClockCenterAddress(TClockFormat aFormat, TFontSizeLogical aSize);
166 int CharacterSizeInBytes(TFontSize aFontSize);
169 void RequestDeviceId();
170 void RequestFirmwareRevision();
171 void RequestPowerSupplyStatus();
173 void SetClockSetting();
177 unsigned char OffScreenY() const;
178 void OffScreenTranslation(unsigned char& aX, unsigned char& aY);
182 unsigned char iDisplayPositionX;
183 unsigned char iDisplayPositionY;
184 ///Off screen mode is the recommended default settings to avoid tearing.
185 ///Though turning it off can be useful for debugging
187 ///Frame differences algo is used to reduce USB bus traffic and improve frame rate in typical use case
188 bool iUseFrameDifferencing;
190 //FutabaVfdReport iReport;
192 //unsigned char iFrameBuffer[256*64];
193 BitArrayLow* iFrameNext;
194 BitArrayLow* iFrameCurrent;
195 BitArrayLow* iFramePrevious;
197 BitArrayLow* iFrameAlpha;
198 BitArrayLow* iFrameBeta;
199 BitArrayLow* iFrameGamma;
201 int iNeedFullFrameUpdate;
203 FutabaVfdReport iInputReport;
205 unsigned short iNextFrameAddress;