MDM166AA: Clock and Clear adjustments.
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=0,
41 EMiniDisplayRequestDeviceId,
42 EMiniDisplayRequestFirmwareRevision,
43 EMiniDisplayRequestPowerSupplyStatus
48 Define the various type of icons we support.
49 For binary compatibility new entries must be added at the end.
53 EMiniDisplayIconNetworkSignal=0,
54 EMiniDisplayIconInternet,
55 EMiniDisplayIconEmail,
57 EMiniDisplayIconVolume,
58 EMiniDisplayIconVolumeLabel,
60 EMiniDisplayIconPause,
61 EMiniDisplayIconRecording
66 Attempt to establish a connection to with a display of the given type.
67 Supports display auto-detection too.
69 @param [IN] The display type we want to connect to.
70 @return Handle to the device we connected to on success, null otherwise.
72 extern "C" MDAPI MiniDisplayDevice MiniDisplayOpen(TMiniDisplayType aType);
75 Close the connection with the given display device.
77 @param [IN] The device to apply this command to.
79 extern "C" MDAPI void MiniDisplayClose(MiniDisplayDevice aDevice);
82 Provides the number of display types supported.
83 That includes the pseudo 'Auto-Detect' display.
84 @return The number of display type supported.
86 extern "C" MDAPI int MiniDisplayTypeCount();
89 Provides the human readable name of the given display type.
91 @param [IN] The display type we want to get the name for.
92 @return The name of the given display type.
94 extern "C" MDAPI wchar_t* MiniDisplayTypeName(TMiniDisplayType aType);
97 Clear our MiniDisplay.
98 @param [IN] The device to apply this command to.
100 extern "C" MDAPI void MiniDisplayClear(MiniDisplayDevice aDevice);
103 Fill our MiniDisplay.
104 @param [IN] The device to apply this command to.
106 extern "C" MDAPI void MiniDisplayFill(MiniDisplayDevice aDevice);
109 Swap our MiniDisplay buffers committing our back buffer content to the screen.
110 @param [IN] The device to apply this command to.
112 extern "C" MDAPI void MiniDisplaySwapBuffers(MiniDisplayDevice aDevice);
115 Provide maximum brightness level for the given device.
116 @param [IN] The device to apply this command to.
117 @return Maximum brightness level.
119 extern "C" MDAPI int MiniDisplayMaxBrightness(MiniDisplayDevice aDevice);
122 Provide minimum brightness level for the given device.
123 @param [IN] The device to apply this command to.
124 @return Minimum brightness level.
126 extern "C" MDAPI int MiniDisplayMinBrightness(MiniDisplayDevice aDevice);
129 Set device brightness level.
130 @param [IN] The device to apply this command to.
131 @param [IN] Brightness level
133 extern "C" MDAPI void MiniDisplaySetBrightness(MiniDisplayDevice aDevice, int aBrightness);
136 Provide pixels width of our display.
137 @param [IN] The device to apply this command to.
138 @return Width in pixels.
140 extern "C" MDAPI int MiniDisplayWidthInPixels(MiniDisplayDevice aDevice);
143 Provide pixels height of our display.
144 @param [IN] The device to apply this command to.
145 @return Height in pixels.
147 extern "C" MDAPI int MiniDisplayHeightInPixels(MiniDisplayDevice aDevice);
151 @param [IN] The device to apply this command to.
152 @param [IN] Pixel X coordinate.
153 @param [IN] Pixel Y coordinate.
154 @param [IN] Pixel value.
156 extern "C" MDAPI void MiniDisplaySetPixel(MiniDisplayDevice aDevice, int aX, int aY, unsigned int aPixel);
158 //TODO: Have an API to specify pixel depth
162 @param [IN] The device to apply this command to.
165 extern "C" MDAPI wchar_t* MiniDisplayVendor(MiniDisplayDevice aDevice);
168 Provide product name.
169 @param [IN] The device to apply this command to.
170 @return Product name.
172 extern "C" MDAPI wchar_t* MiniDisplayProduct(MiniDisplayDevice aDevice);
175 Provide Serial number.
176 @param [IN] The device to apply this command to.
177 @return Serial number name.
179 extern "C" MDAPI wchar_t* MiniDisplaySerialNumber(MiniDisplayDevice aDevice);
183 @param [IN] The device to apply this command to.
185 extern "C" MDAPI void MiniDisplayRequest(MiniDisplayDevice aDevice, TMiniDisplayRequest aRequest);
188 Tell whether or not a request is pending.
189 @param [IN] The device to apply this command to.
190 @return true if we have a request pending, false otherwise.
192 extern "C" MDAPI bool MiniDisplayRequestPending(MiniDisplayDevice aDevice);
196 Provide the current request if any.
197 @param [IN] The device to apply this command to.
198 @return The current request if any.
200 extern "C" MDAPI TMiniDisplayRequest MiniDisplayCurrentRequest(MiniDisplayDevice aDevice);
204 Cancel any pending request.
205 @param [IN] The device to apply this command to.
207 extern "C" MDAPI void MiniDisplayCancelRequest(MiniDisplayDevice aDevice);
210 Attempt request completion.
211 @param [IN] The device to apply this command to.
213 extern "C" MDAPI TMiniDisplayRequest MiniDisplayAttemptRequestCompletion(MiniDisplayDevice aDevice);
217 @param [IN] The device to apply this command to.
218 @return Device ID name.
220 extern "C" MDAPI char* MiniDisplayDeviceId(MiniDisplayDevice aDevice);
223 Provide firmware revision.
224 @param [IN] The device to apply this command to.
225 @return Firmware revision name.
227 extern "C" MDAPI char* MiniDisplayFirmwareRevision(MiniDisplayDevice aDevice);
230 Get power supply status.
231 @param [IN] The device to apply this command to.
233 extern "C" MDAPI bool MiniDisplayPowerSupplyStatus(MiniDisplayDevice aDevice);
236 Turn device Power ON.
237 @param [IN] The device to apply this command to.
239 extern "C" MDAPI void MiniDisplayPowerOn(MiniDisplayDevice aDevice);
242 Turn device Power OFF.
243 @param [IN] The device to apply this command to.
245 extern "C" MDAPI void MiniDisplayPowerOff(MiniDisplayDevice aDevice);
248 Specifies whether or not this display supports power ON/OFF functions.
249 @param [IN] The device to apply this command to.
250 @return True if one can turn display power on and off, false otherwise.
252 extern "C" MDAPI bool MiniDisplaySupportPowerOnOff(MiniDisplayDevice aDevice);
256 @param [IN] The device to apply this command to.
258 extern "C" MDAPI void MiniDisplayShowClock(MiniDisplayDevice aDevice);
262 @param [IN] The device to apply this command to.
264 extern "C" MDAPI void MiniDisplayHideClock(MiniDisplayDevice aDevice);
267 Specifies whether or not this display supports clock functions.
268 @param [IN] The device to apply this command to.
269 @return True if this display supports built-in clock, false otherwise.
271 extern "C" MDAPI bool MiniDisplaySupportClock(MiniDisplayDevice aDevice);
274 Tells how many icons of the given are supported by the specified device.
275 Typically icons on a VFD hardware have several segments that can be light up separately.
276 @param [IN] The device to apply this command to.
277 @param [IN] The type of icon we are interested in.
278 @return The number of icons of this kind this display supports.
280 extern "C" MDAPI int MiniDisplayIconCount(MiniDisplayDevice aDevice, TMiniDisplayIconType aIcon);
283 Tells how many status the icon of the specified type supports for the given device.
284 Status are typically brightness level on VFD hardware.
285 Most icon will just support 2 status: 0 for Off and 1 for On.
286 @param [IN] The device to apply this command to.
287 @param [IN] The type of icon we are interested in.
288 @return The number of icons of this kind this display supports.
290 extern "C" MDAPI int MiniDisplayIconStatusCount(MiniDisplayDevice aDevice, TMiniDisplayIconType aIcon);
293 Set the status of the given icon for the specified device.
294 @param [IN] The device to apply this command to.
295 @param [IN] The type of icon we are interested in.
296 @param [IN] The index of the icon of the given type.
297 @param [IN] The status the icon is to assume.
299 extern "C" MDAPI void MiniDisplaySetIconStatus(MiniDisplayDevice aDevice, TMiniDisplayIconType aIcon, int aIndex, int aStatus);