2 #include "MiniDisplay.h"
3 #include "FutabaGP1212A01.h"
9 //Open & Close functions
10 MiniDisplayDevice MiniDisplayOpen(TMiniDisplayType aType)
12 GP1212A01A* device=NULL;
13 device=new GP1212A01A();
14 int success = device->Open();
24 void MiniDisplayClose(MiniDisplayDevice aDevice)
26 delete ((GP1212A01A*)aDevice);
30 void MiniDisplayClear(MiniDisplayDevice aDevice)
37 ((GP1212A01A*)aDevice)->SetAllPixels(0x00);
41 void MiniDisplayFill(MiniDisplayDevice aDevice)
48 ((GP1212A01A*)aDevice)->SetAllPixels(0xFF);
52 void MiniDisplaySwapBuffers(MiniDisplayDevice aDevice)
59 ((GP1212A01A*)aDevice)->SwapBuffers();
62 //-------------------------------------------------------------
63 int MiniDisplayMaxBrightness(MiniDisplayDevice aDevice)
70 return ((GP1212A01A*)aDevice)->MaxBrightness();
73 //-------------------------------------------------------------
74 int MiniDisplayMinBrightness(MiniDisplayDevice aDevice)
81 return ((GP1212A01A*)aDevice)->MinBrightness();
84 //-------------------------------------------------------------
85 void MiniDisplaySetBrightness(MiniDisplayDevice aDevice, int aBrightness)
92 ((GP1212A01A*)aDevice)->SetBrightness(aBrightness);
95 //-------------------------------------------------------------
96 int MiniDisplayWidthInPixels(MiniDisplayDevice aDevice)
103 return ((GP1212A01A*)aDevice)->WidthInPixels();
106 //-------------------------------------------------------------
107 int MiniDisplayHeightInPixels(MiniDisplayDevice aDevice)
114 return ((GP1212A01A*)aDevice)->HeightInPixels();
117 //-------------------------------------------------------------
118 void MiniDisplaySetPixel(MiniDisplayDevice aDevice, int aX, int aY, int aValue)
120 //aValue&=0x00FFFFFF; //Filter out alpha component
121 return ((GP1212A01A*)aDevice)->SetPixel(aX,aY,aValue);
124 //-------------------------------------------------------------
125 wchar_t* MiniDisplayVendor(MiniDisplayDevice aDevice)
127 return ((GP1212A01A*)aDevice)->Vendor();
130 //-------------------------------------------------------------
131 wchar_t* MiniDisplayProduct(MiniDisplayDevice aDevice)
133 return ((GP1212A01A*)aDevice)->Product();
136 //-------------------------------------------------------------
137 wchar_t* MiniDisplaySerialNumber(MiniDisplayDevice aDevice)
139 return ((GP1212A01A*)aDevice)->SerialNumber();
142 //-------------------------------------------------------------
143 void MiniDisplayRequestDeviceId(MiniDisplayDevice aDevice)
145 ((GP1212A01A*)aDevice)->RequestDeviceId();
148 //-------------------------------------------------------------
149 void MiniDisplayRequestPowerSupplyStatus(MiniDisplayDevice aDevice)
151 ((GP1212A01A*)aDevice)->RequestPowerSupplyStatus();
154 //-------------------------------------------------------------
155 void MiniDisplayRequestFirmwareRevision(MiniDisplayDevice aDevice)
157 ((GP1212A01A*)aDevice)->RequestFirmwareRevision();
160 //-------------------------------------------------------------
161 bool MiniDisplayRequestPending(MiniDisplayDevice aDevice)
163 return ((GP1212A01A*)aDevice)->RequestPending();
166 //-------------------------------------------------------------
167 TMiniDisplayRequest MiniDisplayCurrentRequest(MiniDisplayDevice aDevice)
169 return ((GP1212A01A*)aDevice)->CurrentRequest();
172 //-------------------------------------------------------------
173 void MiniDisplayCancelRequest(MiniDisplayDevice aDevice)
175 ((GP1212A01A*)aDevice)->CancelRequest();
178 //-------------------------------------------------------------
179 TMiniDisplayRequest MiniDisplayAttemptRequestCompletion(MiniDisplayDevice aDevice)
181 return ((GP1212A01A*)aDevice)->AttemptRequestCompletion();
184 //-------------------------------------------------------------
185 char* MiniDisplayDeviceId(MiniDisplayDevice aDevice)
187 return ((GP1212A01A*)aDevice)->DeviceId();
190 //-------------------------------------------------------------
191 char* MiniDisplayFirmwareRevision(MiniDisplayDevice aDevice)
193 return ((GP1212A01A*)aDevice)->FirmwareRevision();
196 //-------------------------------------------------------------
197 bool MiniDisplayPowerSupplyStatus(MiniDisplayDevice aDevice)
199 return ((GP1212A01A*)aDevice)->PowerOn();