MDM166AA: more accurate time setting and cleanup.
8 /* Cmake will define MyLibrary_EXPORTS on Windows when it
9 configures to build a shared library. If you are going to use
10 another build system on windows or create the visual studio
11 projects by hand you need to define MyLibrary_EXPORTS when
12 building a DLL on windows.
14 // We are using the Visual Studio Compiler and building Shared libraries
17 #if defined(MiniDisplay_EXPORTS)
18 #define MDAPI __declspec(dllexport)
20 #define MDAPI __declspec(dllimport)
21 #endif /* MyLibrary_EXPORTS */
22 #else /* defined (_WIN32) */
26 typedef void* MiniDisplayDevice;
30 EMiniDisplayAutoDetect=0,
31 EMiniDisplayFutabaGP1212A01,
32 EMiniDisplayFutabaGP1212A02,
33 EMiniDisplayFutabaMDM166AA,
34 EMiniDisplayAutoDetectFailed
40 EMiniDisplayRequestNone,
41 EMiniDisplayRequestDeviceId,
42 EMiniDisplayRequestFirmwareRevision,
43 EMiniDisplayRequestPowerSupplyStatus
48 Attempt to establish a connection to with a display of the given type.
49 Supports display auto-detection too.
51 @param [IN] The display type we want to connect to.
52 @return Handle to the device we connected to on success, null otherwise.
54 extern "C" MDAPI MiniDisplayDevice MiniDisplayOpen(TMiniDisplayType aType);
57 Close the connection with the given display device.
59 @param [IN] The device to apply this command to.
61 extern "C" MDAPI void MiniDisplayClose(MiniDisplayDevice aDevice);
64 Provides the number of display types supported.
65 That includes the pseudo 'Auto-Detect' display.
66 @return The number of display type supported.
68 extern "C" MDAPI int MiniDisplayTypeCount();
71 Provides the human readable name of the given display type.
73 @param [IN] The display type we want to get the name for.
74 @return The name of the given display type.
76 extern "C" MDAPI wchar_t* MiniDisplayTypeName(TMiniDisplayType aType);
79 Clear our MiniDisplay.
80 @param [IN] The device to apply this command to.
82 extern "C" MDAPI void MiniDisplayClear(MiniDisplayDevice aDevice);
86 @param [IN] The device to apply this command to.
88 extern "C" MDAPI void MiniDisplayFill(MiniDisplayDevice aDevice);
91 Swap our MiniDisplay buffers committing our back buffer content to the screen.
92 @param [IN] The device to apply this command to.
94 extern "C" MDAPI void MiniDisplaySwapBuffers(MiniDisplayDevice aDevice);
97 Provide maximum brightness level for the given device.
98 @param [IN] The device to apply this command to.
99 @return Maximum brightness level.
101 extern "C" MDAPI int MiniDisplayMaxBrightness(MiniDisplayDevice aDevice);
104 Provide minimum brightness level for the given device.
105 @param [IN] The device to apply this command to.
106 @return Minimum brightness level.
108 extern "C" MDAPI int MiniDisplayMinBrightness(MiniDisplayDevice aDevice);
111 Set device brightness level.
112 @param [IN] The device to apply this command to.
113 @param [IN] Brightness level
115 extern "C" MDAPI void MiniDisplaySetBrightness(MiniDisplayDevice aDevice, int aBrightness);
118 Provide pixels width of our display.
119 @param [IN] The device to apply this command to.
120 @return Width in pixels.
122 extern "C" MDAPI int MiniDisplayWidthInPixels(MiniDisplayDevice aDevice);
125 Provide pixels height of our display.
126 @param [IN] The device to apply this command to.
127 @return Height in pixels.
129 extern "C" MDAPI int MiniDisplayHeightInPixels(MiniDisplayDevice aDevice);
133 @param [IN] The device to apply this command to.
134 @param [IN] Pixel X coordinate.
135 @param [IN] Pixel Y coordinate.
136 @param [IN] Pixel value.
138 extern "C" MDAPI void MiniDisplaySetPixel(MiniDisplayDevice aDevice, int aX, int aY, unsigned int aPixel);
140 //TODO: Have an API to specify pixel depth
144 @param [IN] The device to apply this command to.
147 extern "C" MDAPI wchar_t* MiniDisplayVendor(MiniDisplayDevice aDevice);
150 Provide product name.
151 @param [IN] The device to apply this command to.
152 @return Product name.
154 extern "C" MDAPI wchar_t* MiniDisplayProduct(MiniDisplayDevice aDevice);
157 Provide Serial number.
158 @param [IN] The device to apply this command to.
159 @return Serial number name.
161 extern "C" MDAPI wchar_t* MiniDisplaySerialNumber(MiniDisplayDevice aDevice);
165 @param [IN] The device to apply this command to.
167 extern "C" MDAPI void MiniDisplayRequest(MiniDisplayDevice aDevice, TMiniDisplayRequest aRequest);
170 Tell whether or not a request is pending.
171 @param [IN] The device to apply this command to.
172 @return true if we have a request pending, false otherwise.
174 extern "C" MDAPI bool MiniDisplayRequestPending(MiniDisplayDevice aDevice);
178 Provide the current request if any.
179 @param [IN] The device to apply this command to.
180 @return The current request if any.
182 extern "C" MDAPI TMiniDisplayRequest MiniDisplayCurrentRequest(MiniDisplayDevice aDevice);
186 Cancel any pending request.
187 @param [IN] The device to apply this command to.
189 extern "C" MDAPI void MiniDisplayCancelRequest(MiniDisplayDevice aDevice);
192 Attempt request completion.
193 @param [IN] The device to apply this command to.
195 extern "C" MDAPI TMiniDisplayRequest MiniDisplayAttemptRequestCompletion(MiniDisplayDevice aDevice);
199 @param [IN] The device to apply this command to.
200 @return Device ID name.
202 extern "C" MDAPI char* MiniDisplayDeviceId(MiniDisplayDevice aDevice);
205 Provide firmware revision.
206 @param [IN] The device to apply this command to.
207 @return Firmware revision name.
209 extern "C" MDAPI char* MiniDisplayFirmwareRevision(MiniDisplayDevice aDevice);
212 Get power supply status.
213 @param [IN] The device to apply this command to.
215 extern "C" MDAPI bool MiniDisplayPowerSupplyStatus(MiniDisplayDevice aDevice);
218 Turn device Power ON.
219 @param [IN] The device to apply this command to.
221 extern "C" MDAPI void MiniDisplayPowerOn(MiniDisplayDevice aDevice);
224 Turn device Power OFF.
225 @param [IN] The device to apply this command to.
227 extern "C" MDAPI void MiniDisplayPowerOff(MiniDisplayDevice aDevice);
230 Specifies whether or not this display supports power ON/OFF functions.
231 @param [IN] The device to apply this command to.
232 @return True if one can turn display power on and off, false otherwise.
234 extern "C" MDAPI bool MiniDisplaySupportPowerOnOff(MiniDisplayDevice aDevice);
238 @param [IN] The device to apply this command to.
240 extern "C" MDAPI void MiniDisplayShowClock(MiniDisplayDevice aDevice);
244 @param [IN] The device to apply this command to.
246 extern "C" MDAPI void MiniDisplayHideClock(MiniDisplayDevice aDevice);
249 Specifies whether or not this display supports clock functions.
250 @param [IN] The device to apply this command to.
251 @return True if this display supports built-in clock, false otherwise.
253 extern "C" MDAPI bool MiniDisplaySupportClock(MiniDisplayDevice aDevice);