iMONDisplayDefines.h
author StephaneLenclud
Sat, 13 Apr 2013 00:45:13 +0200
changeset 7 ad71cf47d037
permissions -rw-r--r--
Now parses second line of text from set VFD text messages.
     1 #ifndef __IMON_DISPLAY_API_DEFINES_H__
     2 #define __IMON_DISPLAY_API_DEFINES_H__
     3 
     4 //////////////////////////////////////////////////
     5 //////////////////////////////////////////////////
     6 //	Enumerations
     7 
     8 /**DSPResult
     9 @brief	These enumeration values represent the returned result for iMON Display API function calls.\n
    10 			All iMON Display API function calls return one of this result values.\n
    11 			For meaning of each result, refer the comment of each line below*/
    12 enum DSPResult
    13 {
    14 	DSP_SUCCEEDED = 0,				//// Function Call Succeeded Without Error
    15 	DSP_E_FAIL,						//// Unspecified Failure
    16 	DSP_E_OUTOFMEMORY,				//// Failed to Allocate Necessary Memory
    17 	DSP_E_INVALIDARG,				//// One or More Arguments Are Not Valid
    18 	DSP_E_NOT_INITED,				//// API is Not Initialized
    19 	DSP_E_POINTER,					//// Pointer is Not Valid
    20 
    21 	DSP_S_INITED = 0x1000,			//// API is Initialized
    22 	DSP_S_NOT_INITED,				//// API is Not Initialized
    23 	DSP_S_IN_PLUGIN_MODE,			//// API Can Control iMON Display (Display Plug-in Mode)
    24 	DSP_S_NOT_IN_PLUGIN_MODE,		//// API Can't Control iMON Display
    25 };
    26 
    27 
    28 /**DSPNInitResult
    29 @brief	These enumeration values represent the result status for requesting Display Plug-in Mode to iMON.\n
    30 			iMON Display API notifies one of this result values to the caller application after requesting Display Plug-in Mode to iMON.\n
    31 			For more information, refer the comment of each line below*/
    32 enum DSPNInitResult
    33 {
    34 	DSPN_SUCCEEDED = 0,				//// Display Plug-in Mode is Initialized Successfully
    35 	DSPN_ERR_IN_USED = 0x0100,		//// Display Plug-in is Already Used by Other Application
    36 	DSPN_ERR_HW_DISCONNECTED,		//// iMON HW is Not Connected
    37 	DSPN_ERR_NOT_SUPPORTED_HW,		//// The Connected iMON HW doesn't Support Display Plug-in
    38 	DSPN_ERR_PLUGIN_DISABLED,		//// Display Plug-in Mode Option is Disabled
    39 	DSPN_ERR_IMON_NO_REPLY,			//// The Latest iMON is Not Installed or iMON Not Running
    40 	DSPN_ERR_UNKNOWN = 0x0200,		//// Unknown Failure
    41 };
    42 
    43 
    44 /**DSPType
    45 @brief	These enumeration values represent display type.\n
    46 			Currently iMON Display API supports VFD and LCD products.*/
    47 enum DSPType
    48 {
    49 	DSPN_DSP_NONE	= 0,
    50 	DSPN_DSP_VFD	= 0x01,			//// VFD products
    51 	DSPN_DSP_LCD	= 0x02,			//// LCD products
    52 };
    53 
    54 
    55 /**DSPNotifyCode
    56 @brief	These enumeration values represent the notification codes.\n
    57 			iMON Display API will send or post message to the caller application.\n
    58 			The caller application should assign the message and the winodw handle to receivce message with IMON_Display_Init fucntion.\n
    59 			These enumeration values are used with WPARAM parameter of the message.\n 
    60 			For more information, see the explanation of each notification code below*/
    61 enum DSPNotifyCode
    62 {
    63 	/**DSPNM_PLUGIN_SUCCEED
    64 	@brief	When API succeeds to get the control for the display, API will post caller-specified message with DSPNM_PLUGIN_SUCCEED as WPARAM parameter.\n
    65 				LPARAM represents DSPType. This value can be 0x01 (VFD), 0x02 (LCD) or 0x03 (VFD+LCD).*/
    66 	DSPNM_PLUGIN_SUCCEED = 0,
    67 
    68 	/**DSPNM_PLUGIN_FAILED
    69 	@brief	When API fails to get the control for the display, API will post caller-specified message with DSPNM_PLUGIN_FAILED as WPARAM parameter.\n
    70 				LPARAM represents error code with DSPNResult.*/
    71 	DSPNM_PLUGIN_FAILED,
    72 
    73 	/**DSPNM_IMON_RESTARTED
    74 	@brief	When iMON starts, API will post caller-specified message with DSPNM_IMON_RESTARTED as WPARAM parameter.\n
    75 				LPARAM represents DSPType. This value can be 0 (No Display), 0x01 (VFD), 0x02 (LCD) or 0x03 (VFD+LCD).*/
    76 	DSPNM_IMON_RESTARTED,
    77 
    78 	/**DSPNM_IMON_CLOSED
    79 	@brief	When iMON closed, API will post caller-specified message with DSPNM_IMON_CLOSED as WPARAM parameter.\n
    80 				LPARAM is not used.*/
    81 	DSPNM_IMON_CLOSED,
    82 
    83 	/**DSPNM_HW_CONNECTED
    84 	@brief	When iMON HW newly connected, API will post caller-specified message with DSPNM_HW_CONNECTED as WPARAM parameter.\n
    85 				LPARAM represents DSPType. This value can be 0 (No Display), 0x01 (VFD), 0x02 (LCD) or 0x03 (VFD+LCD).*/
    86 	DSPNM_HW_CONNECTED,
    87 
    88 	/**DSPNM_HW_DISCONNECTED
    89 	@brief	When iMON HW disconnected, API will post caller-specified message with DSPNM_HW_DISCONNECTED as WPARAM parameter.\n
    90 				LPARAM is DSPNResult value, DSPN_ERR_HW_DISCONNECTED.*/
    91 	DSPNM_HW_DISCONNECTED,
    92 
    93 
    94 	/**DSPNM_LCD_TEXT_SCROLL_DONE
    95 	@brief	When iMON LCD finishes scrolling Text, API will post caller-specified message with DSPNM_LCD_TEXT_SCROLL_DONE as WPARAM parameter.\n
    96 				The caller application may need to know when text scroll is finished, for sending next text.\n
    97 				LPARAM is not used.*/
    98 	DSPNM_LCD_TEXT_SCROLL_DONE = 0x1000,
    99 };
   100 
   101 //////////////////////////////////////////////////
   102 //////////////////////////////////////////////////
   103 //	Structure
   104 
   105 /**DspEqData
   106 @brief	This structure contains Equalizer data for 16 bands. 
   107 @param	BandData    It represents Equalizer data for 16 bands. Its range is from 0 to 100.*/
   108 typedef struct DspEqData
   109 {
   110 	int BandData[16];
   111 
   112 } DSPEQDATA, *PDSPEQDATA;
   113 
   114 #endif	//__IMON_DISPLAY_API_DEFINES_H__