MDM166AA: more accurate time setting and cleanup.
5 #ifndef FUTABA_MDM166AA_H
6 #define FUTABA_MDM166AA_H
11 const int KMDM166AAWidthInPixels = 96;
12 const int KMDM166AAHeightInPixels = 16;
13 const int KMDM166AAPixelsPerByte = 8;
14 const int KMDM166AAFrameBufferSizeInBytes = KMDM166AAWidthInPixels*KMDM166AAHeightInPixels/KMDM166AAPixelsPerByte; //96*16/8=192
15 const int KMDM166AAFrameBufferPixelCount = KMDM166AAWidthInPixels*KMDM166AAHeightInPixels;
19 MDM166AA is a graphic display module using a FUTABA 96x16dots VFD.
21 class MDM166AA : public FutabaGraphicDisplay
29 virtual void SwapBuffers();
31 virtual int MinBrightness() const {return 0;}
32 virtual int MaxBrightness() const {return 2;}
33 virtual void SetBrightness(int aBrightness);
35 virtual void ShowClock();
36 virtual void HideClock();
37 virtual bool SupportClock(){return true;}
40 virtual int WidthInPixels() const {return KMDM166AAWidthInPixels;}
41 virtual int HeightInPixels() const {return KMDM166AAHeightInPixels;}
43 virtual void SetPixel(unsigned char aX, unsigned char aY, unsigned int aPixel);
44 virtual void SetAllPixels(unsigned char aPattern);
45 virtual int FrameBufferSizeInBytes() const {return KMDM166AAFrameBufferSizeInBytes;}
48 virtual void Request(TMiniDisplayRequest aRequest);
51 void ToggleOffScreenMode();
52 void SetOffScreenMode(bool aOn);
53 bool OffScreenMode() const {return iOffScreenMode;}
55 TMiniDisplayRequest AttemptRequestCompletion();
74 //Specific to MDM166AA
75 //General setting command
76 void SendCommandClear();
77 void SendCommandReset();
80 void SendCommandSetClockData(unsigned char aHour, unsigned char aMinute);
81 void SendCommandClockDisplay(TClockSize aClockSize, TClockFormat aClockFormat);
84 void SendCommandSetAddressCounter(unsigned char aAddressCounter);
85 void SendCommandWriteGraphicData(int aSize, unsigned char* aPixels);
88 void RequestDeviceId();
89 void RequestFirmwareRevision();
90 void RequestPowerSupplyStatus();
98 ///Off screen mode is the recommended default settings to avoid tearing.
99 ///Though turning it off can be useful for debugging
102 BitArrayLow* iFrameNext;
103 BitArrayLow* iFrameCurrent;
104 BitArrayLow* iFramePrevious;
106 BitArrayLow* iFrameAlpha; //owned
107 BitArrayLow* iFrameBeta; //owned
108 BitArrayLow* iFrameGamma; //owned