RT1050 GUI demo using emWin library

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers GUIDRV_FlexColor.h Source File

GUIDRV_FlexColor.h

00001 /*********************************************************************
00002 *                SEGGER Microcontroller GmbH & Co. KG                *
00003 *        Solutions for real time microcontroller applications        *
00004 **********************************************************************
00005 *                                                                    *
00006 *        (c) 1996 - 2016  SEGGER Microcontroller GmbH & Co. KG       *
00007 *                                                                    *
00008 *        Internet: www.segger.com    Support:  support@segger.com    *
00009 *                                                                    *
00010 **********************************************************************
00011 
00012 ** emWin V5.38 - Graphical user interface for embedded applications **
00013 All  Intellectual Property rights  in the Software belongs to  SEGGER.
00014 emWin is protected by  international copyright laws.  Knowledge of the
00015 source code may not be used to write a similar product.  This file may
00016 only be used in accordance with the following terms:
00017 
00018 The software has been licensed to  NXP Semiconductors USA, Inc.  whose
00019 registered  office  is  situated  at 411 E. Plumeria Drive, San  Jose,
00020 CA 95134, USA  solely for  the  purposes  of  creating  libraries  for
00021 NXPs M0, M3/M4 and  ARM7/9 processor-based  devices,  sublicensed  and
00022 distributed under the terms and conditions of the NXP End User License
00023 Agreement.
00024 Full source code is available at: www.segger.com
00025 
00026 We appreciate your understanding and fairness.
00027 ----------------------------------------------------------------------
00028 Licensing information
00029 
00030 Licensor:                 SEGGER Microcontroller Systems LLC
00031 Licensed to:              NXP Semiconductors, 1109 McKay Dr, M/S 76, San Jose, CA 95131, USA
00032 Licensed SEGGER software: emWin
00033 License number:           GUI-00186
00034 License model:            emWin License Agreement, dated August 20th 2011
00035 Licensed product:         -
00036 Licensed platform:        NXP's ARM 7/9, Cortex-M0,M3,M4
00037 Licensed number of seats: -
00038 ----------------------------------------------------------------------
00039 File        : GUIDRV_FlexColor.h
00040 Purpose     : Interface definition for GUIDRV_FlexColor driver
00041 ---------------------------END-OF-HEADER------------------------------
00042 */
00043 
00044 #ifndef GUIDRV_FLEXCOLOR_H
00045 #define GUIDRV_FLEXCOLOR_H
00046 
00047 #include "GUI.h"
00048 
00049 #if defined(__cplusplus)
00050 extern "C" {     /* Make sure we have C-declarations in C++ programs */
00051 #endif
00052 
00053 /*********************************************************************
00054 *
00055 *       Configuration macros
00056 */
00057 //
00058 // Operation modes (16bpp)
00059 //
00060 #define GUIDRV_FLEXCOLOR_M16C0B8  GUIDRV_FlexColor_SetMode16bppC0B8
00061 #define GUIDRV_FLEXCOLOR_M16C1B8  GUIDRV_FlexColor_SetMode16bppC1B8
00062 #define GUIDRV_FLEXCOLOR_M16C0B16 GUIDRV_FlexColor_SetMode16bppC0B16
00063 #define GUIDRV_FLEXCOLOR_M16C1B16 GUIDRV_FlexColor_SetMode16bppC1B16
00064 
00065 //
00066 // Operation modes (18bpp)
00067 //
00068 #define GUIDRV_FLEXCOLOR_M18C0B9  GUIDRV_FlexColor_SetMode18bppC0B9
00069 #define GUIDRV_FLEXCOLOR_M18C1B9  GUIDRV_FlexColor_SetMode18bppC1B9
00070 #define GUIDRV_FLEXCOLOR_M18C0B18 GUIDRV_FlexColor_SetMode18bppC0B18
00071 #define GUIDRV_FLEXCOLOR_M18C1B18 GUIDRV_FlexColor_SetMode18bppC1B18
00072 
00073 //
00074 // Operation mode (24bpp)
00075 //
00076 #define GUIDRV_FLEXCOLOR_M24C0B8  GUIDRV_FlexColor_SetMode24bppC0B8
00077 
00078 //
00079 // Controller selection
00080 //
00081 #define GUIDRV_FLEXCOLOR_F66702   GUIDRV_FlexColor_SetFunc66702
00082 #define GUIDRV_FLEXCOLOR_F66708   GUIDRV_FlexColor_SetFunc66708
00083 #define GUIDRV_FLEXCOLOR_F66709   GUIDRV_FlexColor_SetFunc66709
00084 #define GUIDRV_FLEXCOLOR_F66712   GUIDRV_FlexColor_SetFunc66712
00085 #define GUIDRV_FLEXCOLOR_F66714   GUIDRV_FlexColor_SetFunc66714
00086 #define GUIDRV_FLEXCOLOR_F66715   GUIDRV_FlexColor_SetFunc66715
00087 #define GUIDRV_FLEXCOLOR_F66718   GUIDRV_FlexColor_SetFunc66718
00088 #define GUIDRV_FLEXCOLOR_F66719   GUIDRV_FlexColor_SetFunc66719
00089 #define GUIDRV_FLEXCOLOR_F66720   GUIDRV_FlexColor_SetFunc66720
00090 #define GUIDRV_FLEXCOLOR_F66721   GUIDRV_FlexColor_SetFunc66721
00091 #define GUIDRV_FLEXCOLOR_F66722   GUIDRV_FlexColor_SetFunc66722
00092 #define GUIDRV_FLEXCOLOR_F66723   GUIDRV_FlexColor_SetFunc66723
00093 #define GUIDRV_FLEXCOLOR_F66772   GUIDRV_FlexColor_SetFunc66772
00094 
00095 //
00096 // Hardware interfaces
00097 //
00098 #define GUIDRV_FLEXCOLOR_IF_TYPE_I  0
00099 #define GUIDRV_FLEXCOLOR_IF_TYPE_II 1
00100 
00101 //
00102 // Reading interface
00103 //
00104 #define GUIDRV_FLEXCOLOR_READ_FUNC_I   0
00105 #define GUIDRV_FLEXCOLOR_READ_FUNC_II  1
00106 #define GUIDRV_FLEXCOLOR_READ_FUNC_III 2
00107 
00108 /*********************************************************************
00109 *
00110 *       Configuration structure
00111 */
00112 typedef struct {
00113   //
00114   // Driver specific configuration items
00115   //
00116   int FirstSEG;
00117   int FirstCOM;
00118   int Orientation;
00119   U16 RegEntryMode;
00120   int NumDummyReads;
00121 } CONFIG_FLEXCOLOR;
00122 
00123 /*********************************************************************
00124 *
00125 *       Display drivers
00126 */
00127 //
00128 // Addresses
00129 //
00130 extern const GUI_DEVICE_API GUIDRV_Win_API;
00131 
00132 extern const GUI_DEVICE_API GUIDRV_FlexColor_API;
00133 
00134 //
00135 // Macros to be used in configuration files
00136 //
00137 #if defined(WIN32) && !defined(LCD_SIMCONTROLLER)
00138 
00139   #define GUIDRV_FLEXCOLOR &GUIDRV_Win_API
00140 
00141 #else
00142 
00143   #define GUIDRV_FLEXCOLOR &GUIDRV_FlexColor_API
00144 
00145 #endif
00146 
00147 /*********************************************************************
00148 *
00149 *       Configuration interface
00150 */
00151 #if !defined(WIN32) || defined(LCD_SIMCONTROLLER)
00152 
00153   //
00154   // Display controller configuration
00155   //
00156   void GUIDRV_FlexColor_SetFunc66702     (GUI_DEVICE * pDevice);
00157   void GUIDRV_FlexColor_SetFunc66708     (GUI_DEVICE * pDevice);
00158   void GUIDRV_FlexColor_SetFunc66709     (GUI_DEVICE * pDevice);
00159   void GUIDRV_FlexColor_SetFunc66712     (GUI_DEVICE * pDevice);
00160   void GUIDRV_FlexColor_SetFunc66714     (GUI_DEVICE * pDevice);
00161   void GUIDRV_FlexColor_SetFunc66715     (GUI_DEVICE * pDevice);
00162   void GUIDRV_FlexColor_SetFunc66718     (GUI_DEVICE * pDevice);
00163   void GUIDRV_FlexColor_SetFunc66719     (GUI_DEVICE * pDevice);
00164   void GUIDRV_FlexColor_SetFunc66720     (GUI_DEVICE * pDevice);
00165   void GUIDRV_FlexColor_SetFunc66721     (GUI_DEVICE * pDevice);
00166   void GUIDRV_FlexColor_SetFunc66722     (GUI_DEVICE * pDevice);
00167   void GUIDRV_FlexColor_SetFunc66723     (GUI_DEVICE * pDevice);
00168   void GUIDRV_FlexColor_SetFunc66772     (GUI_DEVICE * pDevice);
00169 
00170   //
00171   // Operation mode configuration (16bpp)
00172   //
00173   void GUIDRV_FlexColor_SetMode16bppC0B8 (GUI_DEVICE * pDevice);
00174   void GUIDRV_FlexColor_SetMode16bppC1B8 (GUI_DEVICE * pDevice);
00175   void GUIDRV_FlexColor_SetMode16bppC0B16(GUI_DEVICE * pDevice);
00176   void GUIDRV_FlexColor_SetMode16bppC1B16(GUI_DEVICE * pDevice);
00177 
00178   //
00179   // Drawing mode configuration (18bpp)
00180   //
00181   void GUIDRV_FlexColor_SetMode18bppC0B9 (GUI_DEVICE * pDevice);
00182   void GUIDRV_FlexColor_SetMode18bppC1B9 (GUI_DEVICE * pDevice);
00183   void GUIDRV_FlexColor_SetMode18bppC0B18(GUI_DEVICE * pDevice);
00184   void GUIDRV_FlexColor_SetMode18bppC1B18(GUI_DEVICE * pDevice);
00185 
00186   //
00187   // Drawing mode configuration (24bpp)
00188   //
00189   void GUIDRV_FlexColor_SetMode24bppC0B8 (GUI_DEVICE * pDevice);
00190 
00191   //
00192   // User interface
00193   //
00194   void GUIDRV_FlexColor_SetFunc(GUI_DEVICE * pDevice, GUI_PORT_API * pHW_API, void (* pfFunc)(GUI_DEVICE *), void (* pfMode)(GUI_DEVICE *));
00195   void GUIDRV_FlexColor_Config (GUI_DEVICE * pDevice, CONFIG_FLEXCOLOR * pConfig);
00196 
00197   //
00198   // Setting up hardware interface to be used
00199   //
00200   void GUIDRV_FlexColor_SetInterface66712_B9 (GUI_DEVICE * pDevice, int Type);
00201   void GUIDRV_FlexColor_SetInterface66712_B18(GUI_DEVICE * pDevice, int Type);
00202   #define GUIDRV_FlexColor_SetInterface66715_B9(pDevice, Type)  GUIDRV_FlexColor_SetInterface66712_B9(pDevice, Type)
00203   #define GUIDRV_FlexColor_SetInterface66715_B18(pDevice, Type) GUIDRV_FlexColor_SetInterface66712_B18(pDevice, Type)
00204 
00205   //
00206   // Setting up interface for reading back data
00207   //
00208   void GUIDRV_FlexColor_SetReadFunc66709_B16(GUI_DEVICE * pDevice, int Func);
00209   void GUIDRV_FlexColor_SetReadFunc66712_B9 (GUI_DEVICE * pDevice, int Func);
00210   void GUIDRV_FlexColor_SetReadFunc66712_B16(GUI_DEVICE * pDevice, int Func);
00211   #define GUIDRV_FlexColor_SetReadFunc66715_B9(pDevice, Func)  GUIDRV_FlexColor_SetReadFunc66712_B9(pDevice, Func)
00212   #define GUIDRV_FlexColor_SetReadFunc66715_B16(pDevice, Func) GUIDRV_FlexColor_SetReadFunc66712_B16(pDevice, Func)
00213   void GUIDRV_FlexColor_SetReadFunc66720_B16(GUI_DEVICE * pDevice, int Func);
00214   void GUIDRV_FlexColor_SetReadFunc66772_B8 (GUI_DEVICE * pDevice, int Func);
00215   void GUIDRV_FlexColor_SetReadFunc66772_B16(GUI_DEVICE * pDevice, int Func);
00216 
00217 #else
00218 
00219   //
00220   // Display controller configuration
00221   //
00222   #define GUIDRV_FlexColor_SetFunc66708(pDevice)
00223   #define GUIDRV_FlexColor_SetFunc66709(pDevice)
00224   #define GUIDRV_FlexColor_SetFunc66712(pDevice)
00225   #define GUIDRV_FlexColor_SetFunc66714(pDevice)
00226   #define GUIDRV_FlexColor_SetFunc66715(pDevice)
00227   #define GUIDRV_FlexColor_SetFunc66718(pDevice)
00228   #define GUIDRV_FlexColor_SetFunc66719(pDevice)
00229   #define GUIDRV_FlexColor_SetFunc66720(pDevice)
00230   #define GUIDRV_FlexColor_SetFunc66721(pDevice)
00231   #define GUIDRV_FlexColor_SetFunc66722(pDevice)
00232   #define GUIDRV_FlexColor_SetFunc66723(pDevice)
00233   #define GUIDRV_FlexColor_SetFunc66772(pDevice)
00234 
00235   //
00236   // Operation mode configuration (16bpp)
00237   //
00238   #define GUIDRV_FlexColor_SetMode16bppC0B8(pDevice)
00239   #define GUIDRV_FlexColor_SetMode16bppC1B8(pDevice)
00240   #define GUIDRV_FlexColor_SetMode16bppC0B16(pDevice)
00241   #define GUIDRV_FlexColor_SetMode16bppC1B16(pDevice)
00242 
00243   //
00244   // Drawing mode configuration (18bpp)
00245   //
00246   #define GUIDRV_FlexColor_SetMode18bppC0B9(pDevice)
00247   #define GUIDRV_FlexColor_SetMode18bppC1B9(pDevice)
00248   #define GUIDRV_FlexColor_SetMode18bppC0B18(pDevice)
00249   #define GUIDRV_FlexColor_SetMode18bppC1B18(pDevice)
00250 
00251   //
00252   // User interface
00253   //
00254   #define GUIDRV_FlexColor_SetFunc(pDevice, pHW_API, pfFunc, pfMode)
00255   #define GUIDRV_FlexColor_Config(pDevice, pConfig)
00256 
00257   //
00258   // Setting up hardware interface to be used
00259   //
00260   #define GUIDRV_FlexColor_SetInterface66712_B9(pDevice, Type)
00261   #define GUIDRV_FlexColor_SetInterface66712_B18(pDevice, Type)
00262   #define GUIDRV_FlexColor_SetInterface66720_B18(pDevice, Type)
00263   #define GUIDRV_FlexColor_SetInterface66715_B9(pDevice, Type)
00264   #define GUIDRV_FlexColor_SetInterface66715_B18(pDevice, Type)
00265 
00266   //
00267   // Setting up interface for reading back data
00268   //
00269   #define GUIDRV_FlexColor_SetReadFunc66709_B16(pDevice, Func)
00270   #define GUIDRV_FlexColor_SetReadFunc66712_B9(pDevice, Func)
00271   #define GUIDRV_FlexColor_SetReadFunc66712_B16(pDevice, Func)
00272   #define GUIDRV_FlexColor_SetReadFunc66715_B9(pDevice, Func)
00273   #define GUIDRV_FlexColor_SetReadFunc66715_B16(pDevice, Func)
00274   #define GUIDRV_FlexColor_SetReadFunc66720_B16(pDevice, Func)
00275   #define GUIDRV_FlexColor_SetReadFunc66772_B8(pDevice, Func)
00276   #define GUIDRV_FlexColor_SetReadFunc66772_B16(pDevice, Func)
00277 
00278 #endif
00279 
00280 #if defined(__cplusplus)
00281 }
00282 #endif
00283 
00284 #endif /* GUIDRV_FLEXCOLOR_H */
00285 
00286 /*************************** End of file ****************************/