![](/media/cache/profiles/20200518_163046.jpg.50x50_q85.jpg)
Initial
emwin_config/LCDConf.cpp@0:e9613d017b5e, 2020-01-14 (annotated)
- Committer:
- reedas
- Date:
- Tue Jan 14 11:29:18 2020 +0000
- Revision:
- 0:e9613d017b5e
Initial Commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
reedas | 0:e9613d017b5e | 1 | /********************************************************************* |
reedas | 0:e9613d017b5e | 2 | * SEGGER Microcontroller GmbH & Co. KG * |
reedas | 0:e9613d017b5e | 3 | * Solutions for real time microcontroller applications * |
reedas | 0:e9613d017b5e | 4 | ********************************************************************** |
reedas | 0:e9613d017b5e | 5 | * * |
reedas | 0:e9613d017b5e | 6 | * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * |
reedas | 0:e9613d017b5e | 7 | * * |
reedas | 0:e9613d017b5e | 8 | * Internet: www.segger.com Support: support@segger.com * |
reedas | 0:e9613d017b5e | 9 | * * |
reedas | 0:e9613d017b5e | 10 | ********************************************************************** |
reedas | 0:e9613d017b5e | 11 | |
reedas | 0:e9613d017b5e | 12 | ** emWin V5.46 - Graphical user interface for embedded applications ** |
reedas | 0:e9613d017b5e | 13 | All Intellectual Property rights in the Software belongs to SEGGER. |
reedas | 0:e9613d017b5e | 14 | emWin is protected by international copyright laws. Knowledge of the |
reedas | 0:e9613d017b5e | 15 | source code may not be used to write a similar product. This file may |
reedas | 0:e9613d017b5e | 16 | only be used in accordance with the following terms: |
reedas | 0:e9613d017b5e | 17 | |
reedas | 0:e9613d017b5e | 18 | The software has been licensed to Cypress Semiconductor Corporation, |
reedas | 0:e9613d017b5e | 19 | whose registered office is situated at 198 Champion Ct. San Jose, CA |
reedas | 0:e9613d017b5e | 20 | 95134 USA solely for the purposes of creating libraries for Cypress |
reedas | 0:e9613d017b5e | 21 | PSoC3 and PSoC5 processor-based devices, sublicensed and distributed |
reedas | 0:e9613d017b5e | 22 | under the terms and conditions of the Cypress End User License |
reedas | 0:e9613d017b5e | 23 | Agreement. |
reedas | 0:e9613d017b5e | 24 | Full source code is available at: www.segger.com |
reedas | 0:e9613d017b5e | 25 | |
reedas | 0:e9613d017b5e | 26 | We appreciate your understanding and fairness. |
reedas | 0:e9613d017b5e | 27 | ---------------------------------------------------------------------- |
reedas | 0:e9613d017b5e | 28 | Licensing information |
reedas | 0:e9613d017b5e | 29 | Licensor: SEGGER Microcontroller Systems LLC |
reedas | 0:e9613d017b5e | 30 | Licensed to: Cypress Semiconductor Corp, 198 Champion Ct., San Jose, CA 95134, USA |
reedas | 0:e9613d017b5e | 31 | Licensed SEGGER software: emWin |
reedas | 0:e9613d017b5e | 32 | License number: GUI-00319 |
reedas | 0:e9613d017b5e | 33 | License model: Services and License Agreement, signed June 10th, 2009 |
reedas | 0:e9613d017b5e | 34 | Licensed platform: Any Cypress platform (Initial targets are: PSoC3, PSoC5) |
reedas | 0:e9613d017b5e | 35 | ---------------------------------------------------------------------- |
reedas | 0:e9613d017b5e | 36 | Support and Update Agreement (SUA) |
reedas | 0:e9613d017b5e | 37 | SUA period: 2009-06-12 - 2022-07-27 |
reedas | 0:e9613d017b5e | 38 | Contact to extend SUA: sales@segger.com |
reedas | 0:e9613d017b5e | 39 | ---------------------------------------------------------------------- |
reedas | 0:e9613d017b5e | 40 | File : LCDConf.c |
reedas | 0:e9613d017b5e | 41 | Purpose : Display controller configuration (single layer) |
reedas | 0:e9613d017b5e | 42 | ---------------------------END-OF-HEADER------------------------------ |
reedas | 0:e9613d017b5e | 43 | */ |
reedas | 0:e9613d017b5e | 44 | |
reedas | 0:e9613d017b5e | 45 | #include "GUI.h" |
reedas | 0:e9613d017b5e | 46 | #include "GUIDRV_FlexColor.h" |
reedas | 0:e9613d017b5e | 47 | |
reedas | 0:e9613d017b5e | 48 | #include "cy8ckit_028_tft.h" |
reedas | 0:e9613d017b5e | 49 | |
reedas | 0:e9613d017b5e | 50 | |
reedas | 0:e9613d017b5e | 51 | /********************************************************************* |
reedas | 0:e9613d017b5e | 52 | * |
reedas | 0:e9613d017b5e | 53 | * Layer configuration (to be modified) |
reedas | 0:e9613d017b5e | 54 | * |
reedas | 0:e9613d017b5e | 55 | ********************************************************************** |
reedas | 0:e9613d017b5e | 56 | */ |
reedas | 0:e9613d017b5e | 57 | // |
reedas | 0:e9613d017b5e | 58 | // Physical display size |
reedas | 0:e9613d017b5e | 59 | // The display size should be adapted in order to match the size of |
reedas | 0:e9613d017b5e | 60 | // the target display. |
reedas | 0:e9613d017b5e | 61 | // |
reedas | 0:e9613d017b5e | 62 | #define XSIZE_PHYS 240 |
reedas | 0:e9613d017b5e | 63 | #define YSIZE_PHYS 320 |
reedas | 0:e9613d017b5e | 64 | |
reedas | 0:e9613d017b5e | 65 | // |
reedas | 0:e9613d017b5e | 66 | // Color conversion |
reedas | 0:e9613d017b5e | 67 | // The color conversion functions should be selected according to |
reedas | 0:e9613d017b5e | 68 | // the color mode of the target display. Details can be found in |
reedas | 0:e9613d017b5e | 69 | // the chapter "Colors" in the emWin user manual. |
reedas | 0:e9613d017b5e | 70 | // |
reedas | 0:e9613d017b5e | 71 | #define COLOR_CONVERSION GUICC_M565 |
reedas | 0:e9613d017b5e | 72 | |
reedas | 0:e9613d017b5e | 73 | // |
reedas | 0:e9613d017b5e | 74 | // Display driver |
reedas | 0:e9613d017b5e | 75 | // |
reedas | 0:e9613d017b5e | 76 | #define DISPLAY_DRIVER GUIDRV_FLEXCOLOR |
reedas | 0:e9613d017b5e | 77 | |
reedas | 0:e9613d017b5e | 78 | /********************************************************************* |
reedas | 0:e9613d017b5e | 79 | * |
reedas | 0:e9613d017b5e | 80 | * Configuration checking |
reedas | 0:e9613d017b5e | 81 | * |
reedas | 0:e9613d017b5e | 82 | ********************************************************************** |
reedas | 0:e9613d017b5e | 83 | */ |
reedas | 0:e9613d017b5e | 84 | #ifndef VXSIZE_PHYS |
reedas | 0:e9613d017b5e | 85 | #define VXSIZE_PHYS XSIZE_PHYS |
reedas | 0:e9613d017b5e | 86 | #endif |
reedas | 0:e9613d017b5e | 87 | #ifndef VYSIZE_PHYS |
reedas | 0:e9613d017b5e | 88 | #define VYSIZE_PHYS YSIZE_PHYS |
reedas | 0:e9613d017b5e | 89 | #endif |
reedas | 0:e9613d017b5e | 90 | #ifndef XSIZE_PHYS |
reedas | 0:e9613d017b5e | 91 | #error Physical X size of display is not defined! |
reedas | 0:e9613d017b5e | 92 | #endif |
reedas | 0:e9613d017b5e | 93 | #ifndef YSIZE_PHYS |
reedas | 0:e9613d017b5e | 94 | #error Physical Y size of display is not defined! |
reedas | 0:e9613d017b5e | 95 | #endif |
reedas | 0:e9613d017b5e | 96 | #ifndef COLOR_CONVERSION |
reedas | 0:e9613d017b5e | 97 | #error Color conversion not defined! |
reedas | 0:e9613d017b5e | 98 | #endif |
reedas | 0:e9613d017b5e | 99 | #ifndef DISPLAY_DRIVER |
reedas | 0:e9613d017b5e | 100 | #error No display driver defined! |
reedas | 0:e9613d017b5e | 101 | #endif |
reedas | 0:e9613d017b5e | 102 | |
reedas | 0:e9613d017b5e | 103 | /******************************************************************** |
reedas | 0:e9613d017b5e | 104 | * |
reedas | 0:e9613d017b5e | 105 | * CY8CKIT_028_TFT_InitController |
reedas | 0:e9613d017b5e | 106 | * |
reedas | 0:e9613d017b5e | 107 | * Purpose: |
reedas | 0:e9613d017b5e | 108 | * Initializes the LCD controller |
reedas | 0:e9613d017b5e | 109 | * |
reedas | 0:e9613d017b5e | 110 | */ |
reedas | 0:e9613d017b5e | 111 | static void CY8CKIT_028_TFT_InitController(void) { |
reedas | 0:e9613d017b5e | 112 | /* Set up the display controller and put it into operation. If the |
reedas | 0:e9613d017b5e | 113 | * display controller is not initialized by any external routine |
reedas | 0:e9613d017b5e | 114 | * this needs to be adapted by the customer. |
reedas | 0:e9613d017b5e | 115 | */ |
reedas | 0:e9613d017b5e | 116 | DisplayIntf_Init(); |
reedas | 0:e9613d017b5e | 117 | |
reedas | 0:e9613d017b5e | 118 | /* |
reedas | 0:e9613d017b5e | 119 | Cy_GPIO_Set(LCD_RESET_PORT, LCD_RESET_NUM); |
reedas | 0:e9613d017b5e | 120 | GUI_Delay(20); |
reedas | 0:e9613d017b5e | 121 | Cy_GPIO_Clr(LCD_RESET_PORT, LCD_RESET_NUM); |
reedas | 0:e9613d017b5e | 122 | GUI_Delay(100); |
reedas | 0:e9613d017b5e | 123 | Cy_GPIO_Set(LCD_RESET_PORT, LCD_RESET_NUM); |
reedas | 0:e9613d017b5e | 124 | GUI_Delay(100); |
reedas | 0:e9613d017b5e | 125 | */ |
reedas | 0:e9613d017b5e | 126 | LCD_RESET = 1u; |
reedas | 0:e9613d017b5e | 127 | GUI_Delay(20); |
reedas | 0:e9613d017b5e | 128 | LCD_RESET = 0u; |
reedas | 0:e9613d017b5e | 129 | GUI_Delay(100); |
reedas | 0:e9613d017b5e | 130 | |
reedas | 0:e9613d017b5e | 131 | LCD_RESET = 1u; |
reedas | 0:e9613d017b5e | 132 | GUI_Delay(100); |
reedas | 0:e9613d017b5e | 133 | |
reedas | 0:e9613d017b5e | 134 | DisplayIntf_Write8_A0(0x28); |
reedas | 0:e9613d017b5e | 135 | DisplayIntf_Write8_A0(0x11); /* Exit Sleep mode */ |
reedas | 0:e9613d017b5e | 136 | GUI_Delay(100); |
reedas | 0:e9613d017b5e | 137 | DisplayIntf_Write8_A0(0x36); |
reedas | 0:e9613d017b5e | 138 | DisplayIntf_Write8_A1(0xA0); /* MADCTL: memory data access control */ |
reedas | 0:e9613d017b5e | 139 | DisplayIntf_Write8_A0(0x3A); |
reedas | 0:e9613d017b5e | 140 | DisplayIntf_Write8_A1(0x65); /* COLMOD: Interface Pixel format */ |
reedas | 0:e9613d017b5e | 141 | DisplayIntf_Write8_A0(0xB2); |
reedas | 0:e9613d017b5e | 142 | DisplayIntf_Write8_A1(0x0C); |
reedas | 0:e9613d017b5e | 143 | DisplayIntf_Write8_A1(0x0C); |
reedas | 0:e9613d017b5e | 144 | DisplayIntf_Write8_A1(0x00); |
reedas | 0:e9613d017b5e | 145 | DisplayIntf_Write8_A1(0x33); |
reedas | 0:e9613d017b5e | 146 | DisplayIntf_Write8_A1(0x33); /* PORCTRK: Porch setting */ |
reedas | 0:e9613d017b5e | 147 | DisplayIntf_Write8_A0(0xB7); |
reedas | 0:e9613d017b5e | 148 | DisplayIntf_Write8_A1(0x35); /* GCTRL: Gate Control */ |
reedas | 0:e9613d017b5e | 149 | DisplayIntf_Write8_A0(0xBB); |
reedas | 0:e9613d017b5e | 150 | DisplayIntf_Write8_A1(0x2B); /* VCOMS: VCOM setting */ |
reedas | 0:e9613d017b5e | 151 | DisplayIntf_Write8_A0(0xC0); |
reedas | 0:e9613d017b5e | 152 | DisplayIntf_Write8_A1(0x2C); /* LCMCTRL: LCM Control */ |
reedas | 0:e9613d017b5e | 153 | DisplayIntf_Write8_A0(0xC2); |
reedas | 0:e9613d017b5e | 154 | DisplayIntf_Write8_A1(0x01); |
reedas | 0:e9613d017b5e | 155 | DisplayIntf_Write8_A1(0xFF); /* VDVVRHEN: VDV and VRH Command Enable */ |
reedas | 0:e9613d017b5e | 156 | DisplayIntf_Write8_A0(0xC3); |
reedas | 0:e9613d017b5e | 157 | DisplayIntf_Write8_A1(0x11); /* VRHS: VRH Set */ |
reedas | 0:e9613d017b5e | 158 | DisplayIntf_Write8_A0(0xC4); |
reedas | 0:e9613d017b5e | 159 | DisplayIntf_Write8_A1(0x20); /* VDVS: VDV Set */ |
reedas | 0:e9613d017b5e | 160 | DisplayIntf_Write8_A0(0xC6); |
reedas | 0:e9613d017b5e | 161 | DisplayIntf_Write8_A1(0x0F); /* FRCTRL2: Frame Rate control in normal mode */ |
reedas | 0:e9613d017b5e | 162 | DisplayIntf_Write8_A0(0xD0); |
reedas | 0:e9613d017b5e | 163 | DisplayIntf_Write8_A1(0xA4); |
reedas | 0:e9613d017b5e | 164 | DisplayIntf_Write8_A1(0xA1); /* PWCTRL1: Power Control 1 */ |
reedas | 0:e9613d017b5e | 165 | DisplayIntf_Write8_A0(0xE0); |
reedas | 0:e9613d017b5e | 166 | DisplayIntf_Write8_A1(0xD0); |
reedas | 0:e9613d017b5e | 167 | DisplayIntf_Write8_A1(0x00); |
reedas | 0:e9613d017b5e | 168 | DisplayIntf_Write8_A1(0x05); |
reedas | 0:e9613d017b5e | 169 | DisplayIntf_Write8_A1(0x0E); |
reedas | 0:e9613d017b5e | 170 | DisplayIntf_Write8_A1(0x15); |
reedas | 0:e9613d017b5e | 171 | DisplayIntf_Write8_A1(0x0D); |
reedas | 0:e9613d017b5e | 172 | DisplayIntf_Write8_A1(0x37); |
reedas | 0:e9613d017b5e | 173 | DisplayIntf_Write8_A1(0x43); |
reedas | 0:e9613d017b5e | 174 | DisplayIntf_Write8_A1(0x47); |
reedas | 0:e9613d017b5e | 175 | DisplayIntf_Write8_A1(0x09); |
reedas | 0:e9613d017b5e | 176 | DisplayIntf_Write8_A1(0x15); |
reedas | 0:e9613d017b5e | 177 | DisplayIntf_Write8_A1(0x12); |
reedas | 0:e9613d017b5e | 178 | DisplayIntf_Write8_A1(0x16); |
reedas | 0:e9613d017b5e | 179 | DisplayIntf_Write8_A1(0x19); /* PVGAMCTRL: Positive Voltage Gamma control */ |
reedas | 0:e9613d017b5e | 180 | DisplayIntf_Write8_A0(0xE1); |
reedas | 0:e9613d017b5e | 181 | DisplayIntf_Write8_A1(0xD0); |
reedas | 0:e9613d017b5e | 182 | DisplayIntf_Write8_A1(0x00); |
reedas | 0:e9613d017b5e | 183 | DisplayIntf_Write8_A1(0x05); |
reedas | 0:e9613d017b5e | 184 | DisplayIntf_Write8_A1(0x0D); |
reedas | 0:e9613d017b5e | 185 | DisplayIntf_Write8_A1(0x0C); |
reedas | 0:e9613d017b5e | 186 | DisplayIntf_Write8_A1(0x06); |
reedas | 0:e9613d017b5e | 187 | DisplayIntf_Write8_A1(0x2D); |
reedas | 0:e9613d017b5e | 188 | DisplayIntf_Write8_A1(0x44); |
reedas | 0:e9613d017b5e | 189 | DisplayIntf_Write8_A1(0x40); |
reedas | 0:e9613d017b5e | 190 | DisplayIntf_Write8_A1(0x0E); |
reedas | 0:e9613d017b5e | 191 | DisplayIntf_Write8_A1(0x1C); |
reedas | 0:e9613d017b5e | 192 | DisplayIntf_Write8_A1(0x18); |
reedas | 0:e9613d017b5e | 193 | DisplayIntf_Write8_A1(0x16); |
reedas | 0:e9613d017b5e | 194 | DisplayIntf_Write8_A1(0x19); /* NVGAMCTRL: Negative Voltage Gamma control */ |
reedas | 0:e9613d017b5e | 195 | DisplayIntf_Write8_A0(0x2B); |
reedas | 0:e9613d017b5e | 196 | DisplayIntf_Write8_A1(0x00); |
reedas | 0:e9613d017b5e | 197 | DisplayIntf_Write8_A1(0x00); |
reedas | 0:e9613d017b5e | 198 | DisplayIntf_Write8_A1(0x00); |
reedas | 0:e9613d017b5e | 199 | DisplayIntf_Write8_A1(0xEF); /* Y address set */ |
reedas | 0:e9613d017b5e | 200 | DisplayIntf_Write8_A0(0x2A); |
reedas | 0:e9613d017b5e | 201 | DisplayIntf_Write8_A1(0x00); |
reedas | 0:e9613d017b5e | 202 | DisplayIntf_Write8_A1(0x00); |
reedas | 0:e9613d017b5e | 203 | DisplayIntf_Write8_A1(0x01); |
reedas | 0:e9613d017b5e | 204 | DisplayIntf_Write8_A1(0x3F); /* X address set */ |
reedas | 0:e9613d017b5e | 205 | GUI_Delay(10); |
reedas | 0:e9613d017b5e | 206 | DisplayIntf_Write8_A0(0x29); |
reedas | 0:e9613d017b5e | 207 | } |
reedas | 0:e9613d017b5e | 208 | |
reedas | 0:e9613d017b5e | 209 | /********************************************************************* |
reedas | 0:e9613d017b5e | 210 | * |
reedas | 0:e9613d017b5e | 211 | * Public code |
reedas | 0:e9613d017b5e | 212 | * |
reedas | 0:e9613d017b5e | 213 | ********************************************************************** |
reedas | 0:e9613d017b5e | 214 | */ |
reedas | 0:e9613d017b5e | 215 | /********************************************************************* |
reedas | 0:e9613d017b5e | 216 | * |
reedas | 0:e9613d017b5e | 217 | * LCD_X_Config |
reedas | 0:e9613d017b5e | 218 | * |
reedas | 0:e9613d017b5e | 219 | * Function description |
reedas | 0:e9613d017b5e | 220 | * Called during the initialization process in order to set up the |
reedas | 0:e9613d017b5e | 221 | * display driver configuration. |
reedas | 0:e9613d017b5e | 222 | */ |
reedas | 0:e9613d017b5e | 223 | void LCD_X_Config(void) { |
reedas | 0:e9613d017b5e | 224 | GUI_DEVICE * pDevice; |
reedas | 0:e9613d017b5e | 225 | CONFIG_FLEXCOLOR Config = {0}; |
reedas | 0:e9613d017b5e | 226 | GUI_PORT_API PortAPI = {0}; |
reedas | 0:e9613d017b5e | 227 | // |
reedas | 0:e9613d017b5e | 228 | // Set the display driver and color conversion |
reedas | 0:e9613d017b5e | 229 | // |
reedas | 0:e9613d017b5e | 230 | pDevice = GUI_DEVICE_CreateAndLink(DISPLAY_DRIVER, COLOR_CONVERSION, 0, 0); |
reedas | 0:e9613d017b5e | 231 | // |
reedas | 0:e9613d017b5e | 232 | // Display driver configuration |
reedas | 0:e9613d017b5e | 233 | // |
reedas | 0:e9613d017b5e | 234 | LCD_SetSizeEx (0, XSIZE_PHYS, YSIZE_PHYS); |
reedas | 0:e9613d017b5e | 235 | LCD_SetVSizeEx (0, VXSIZE_PHYS, VYSIZE_PHYS); |
reedas | 0:e9613d017b5e | 236 | // |
reedas | 0:e9613d017b5e | 237 | // Orientation |
reedas | 0:e9613d017b5e | 238 | // |
reedas | 0:e9613d017b5e | 239 | Config.Orientation = GUI_MIRROR_Y | GUI_SWAP_XY; |
reedas | 0:e9613d017b5e | 240 | GUIDRV_FlexColor_Config(pDevice, &Config); |
reedas | 0:e9613d017b5e | 241 | // |
reedas | 0:e9613d017b5e | 242 | // Set controller and operation mode |
reedas | 0:e9613d017b5e | 243 | // |
reedas | 0:e9613d017b5e | 244 | PortAPI.pfWrite8_A0 = DisplayIntf_Write8_A0; |
reedas | 0:e9613d017b5e | 245 | PortAPI.pfWrite8_A1 = DisplayIntf_Write8_A1; |
reedas | 0:e9613d017b5e | 246 | PortAPI.pfWriteM8_A1 = DisplayIntf_WriteM8_A1; |
reedas | 0:e9613d017b5e | 247 | PortAPI.pfRead8_A1 = DisplayIntf_Read8_A1; |
reedas | 0:e9613d017b5e | 248 | PortAPI.pfReadM8_A1 = DisplayIntf_ReadM8_A1; |
reedas | 0:e9613d017b5e | 249 | |
reedas | 0:e9613d017b5e | 250 | GUIDRV_FlexColor_SetFunc(pDevice, &PortAPI, GUIDRV_FLEXCOLOR_F66709, GUIDRV_FLEXCOLOR_M16C0B8); |
reedas | 0:e9613d017b5e | 251 | } |
reedas | 0:e9613d017b5e | 252 | |
reedas | 0:e9613d017b5e | 253 | /********************************************************************* |
reedas | 0:e9613d017b5e | 254 | * |
reedas | 0:e9613d017b5e | 255 | * LCD_X_DisplayDriver |
reedas | 0:e9613d017b5e | 256 | * |
reedas | 0:e9613d017b5e | 257 | * Purpose: |
reedas | 0:e9613d017b5e | 258 | * This function is called by the display driver for several purposes. |
reedas | 0:e9613d017b5e | 259 | * To support the according task, the routine needs to be adapted to |
reedas | 0:e9613d017b5e | 260 | * the display controller. Note that the commands marked |
reedas | 0:e9613d017b5e | 261 | * "optional" are not cogently required and should only be adapted if |
reedas | 0:e9613d017b5e | 262 | * the display controller supports these features. |
reedas | 0:e9613d017b5e | 263 | * |
reedas | 0:e9613d017b5e | 264 | * Parameter: |
reedas | 0:e9613d017b5e | 265 | * LayerIndex - Zero based layer index |
reedas | 0:e9613d017b5e | 266 | * Cmd - Command to be executed |
reedas | 0:e9613d017b5e | 267 | * pData - Pointer to a data structure. |
reedas | 0:e9613d017b5e | 268 | * |
reedas | 0:e9613d017b5e | 269 | * Return Value: |
reedas | 0:e9613d017b5e | 270 | * < -1 - Error |
reedas | 0:e9613d017b5e | 271 | * -1 - The command is not handled. |
reedas | 0:e9613d017b5e | 272 | * 0 - OK. |
reedas | 0:e9613d017b5e | 273 | */ |
reedas | 0:e9613d017b5e | 274 | int LCD_X_DisplayDriver(unsigned LayerIndex, unsigned Cmd, void * pData) { |
reedas | 0:e9613d017b5e | 275 | int r; |
reedas | 0:e9613d017b5e | 276 | |
reedas | 0:e9613d017b5e | 277 | GUI_USE_PARA(LayerIndex); |
reedas | 0:e9613d017b5e | 278 | GUI_USE_PARA(pData); |
reedas | 0:e9613d017b5e | 279 | |
reedas | 0:e9613d017b5e | 280 | switch (Cmd) { |
reedas | 0:e9613d017b5e | 281 | case LCD_X_INITCONTROLLER: { |
reedas | 0:e9613d017b5e | 282 | // |
reedas | 0:e9613d017b5e | 283 | // Called during the initialization process in order to set up the |
reedas | 0:e9613d017b5e | 284 | // display controller and put it into operation. If the display |
reedas | 0:e9613d017b5e | 285 | // controller is not initialized by any external routine, this needs |
reedas | 0:e9613d017b5e | 286 | // to be adapted by the customer... |
reedas | 0:e9613d017b5e | 287 | // |
reedas | 0:e9613d017b5e | 288 | // ... |
reedas | 0:e9613d017b5e | 289 | CY8CKIT_028_TFT_InitController(); |
reedas | 0:e9613d017b5e | 290 | return 0; |
reedas | 0:e9613d017b5e | 291 | } |
reedas | 0:e9613d017b5e | 292 | default: |
reedas | 0:e9613d017b5e | 293 | r = -1; |
reedas | 0:e9613d017b5e | 294 | } |
reedas | 0:e9613d017b5e | 295 | return r; |
reedas | 0:e9613d017b5e | 296 | } |
reedas | 0:e9613d017b5e | 297 | |
reedas | 0:e9613d017b5e | 298 | /*************************** End of file ****************************/ |
reedas | 0:e9613d017b5e | 299 |