STM32Cube BSP FW for STM32F769I-Discovery
Dependents: mbed-os-example-blinky-5 DISCO-F769NI_TOUCHSCREEN_demo_custom_1 Datarecorder2 DISCO-F769NI_TOUCHSCREEN_demo ... more
otm8009a.h
00001 /** 00002 ****************************************************************************** 00003 * @file otm8009a.h 00004 * @author MCD Application Team 00005 * @brief This file contains all the constants parameters for the OTM8009A 00006 * which is the LCD Driver for KoD KM-040TMP-02-0621 (WVGA) 00007 * DSI LCD Display. 00008 ****************************************************************************** 00009 * @attention 00010 * 00011 * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2> 00012 * 00013 * Redistribution and use in source and binary forms, with or without modification, 00014 * are permitted provided that the following conditions are met: 00015 * 1. Redistributions of source code must retain the above copyright notice, 00016 * this list of conditions and the following disclaimer. 00017 * 2. Redistributions in binary form must reproduce the above copyright notice, 00018 * this list of conditions and the following disclaimer in the documentation 00019 * and/or other materials provided with the distribution. 00020 * 3. Neither the name of STMicroelectronics nor the names of its contributors 00021 * may be used to endorse or promote products derived from this software 00022 * without specific prior written permission. 00023 * 00024 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00025 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00026 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00027 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 00028 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00029 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00030 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00031 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00032 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00033 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00034 * 00035 ****************************************************************************** 00036 */ 00037 00038 /* Define to prevent recursive inclusion -------------------------------------*/ 00039 #ifndef __OTM8009A_H 00040 #define __OTM8009A_H 00041 00042 #ifdef __cplusplus 00043 extern "C" { 00044 #endif 00045 00046 /* Includes ------------------------------------------------------------------*/ 00047 #include <stdint.h> 00048 /** @addtogroup BSP 00049 * @{ 00050 */ 00051 00052 /** @addtogroup Components 00053 * @{ 00054 */ 00055 00056 /** @addtogroup otm8009a 00057 * @{ 00058 */ 00059 00060 /** @addtogroup OTM8009A_Exported_Variables 00061 * @{ 00062 */ 00063 00064 #if defined ( __GNUC__ ) 00065 #ifndef __weak 00066 #define __weak __attribute__((weak)) 00067 #endif /* __weak */ 00068 #endif /* __GNUC__ */ 00069 00070 /** 00071 * @brief LCD_OrientationTypeDef 00072 * Possible values of Display Orientation 00073 */ 00074 #define OTM8009A_ORIENTATION_PORTRAIT ((uint32_t)0x00) /* Portrait orientation choice of LCD screen */ 00075 #define OTM8009A_ORIENTATION_LANDSCAPE ((uint32_t)0x01) /* Landscape orientation choice of LCD screen */ 00076 00077 /** 00078 * @brief Possible values of 00079 * pixel data format (ie color coding) transmitted on DSI Data lane in DSI packets 00080 */ 00081 #define OTM8009A_FORMAT_RGB888 ((uint32_t)0x00) /* Pixel format chosen is RGB888 : 24 bpp */ 00082 #define OTM8009A_FORMAT_RBG565 ((uint32_t)0x02) /* Pixel format chosen is RGB565 : 16 bpp */ 00083 00084 /** 00085 * @brief otm8009a_480x800 Size 00086 */ 00087 00088 /* Width and Height in Portrait mode */ 00089 #define OTM8009A_480X800_WIDTH ((uint16_t)480) /* LCD PIXEL WIDTH */ 00090 #define OTM8009A_480X800_HEIGHT ((uint16_t)800) /* LCD PIXEL HEIGHT */ 00091 00092 /* Width and Height in Landscape mode */ 00093 #define OTM8009A_800X480_WIDTH ((uint16_t)800) /* LCD PIXEL WIDTH */ 00094 #define OTM8009A_800X480_HEIGHT ((uint16_t)480) /* LCD PIXEL HEIGHT */ 00095 00096 /** 00097 * @brief OTM8009A_480X800 Timing parameters for Portrait orientation mode 00098 */ 00099 #define OTM8009A_480X800_HSYNC ((uint16_t)2) /* Horizontal synchronization */ 00100 #define OTM8009A_480X800_HBP ((uint16_t)34) /* Horizontal back porch */ 00101 #define OTM8009A_480X800_HFP ((uint16_t)34) /* Horizontal front porch */ 00102 #define OTM8009A_480X800_VSYNC ((uint16_t)1) /* Vertical synchronization */ 00103 #define OTM8009A_480X800_VBP ((uint16_t)15) /* Vertical back porch */ 00104 #define OTM8009A_480X800_VFP ((uint16_t)16) /* Vertical front porch */ 00105 00106 /** 00107 * @brief OTM8009A_800X480 Timing parameters for Landscape orientation mode 00108 * Same values as for Portrait mode in fact. 00109 */ 00110 #define OTM8009A_800X480_HSYNC OTM8009A_480X800_VSYNC /* Horizontal synchronization */ 00111 #define OTM8009A_800X480_HBP OTM8009A_480X800_VBP /* Horizontal back porch */ 00112 #define OTM8009A_800X480_HFP OTM8009A_480X800_VFP /* Horizontal front porch */ 00113 #define OTM8009A_800X480_VSYNC OTM8009A_480X800_HSYNC /* Vertical synchronization */ 00114 #define OTM8009A_800X480_VBP OTM8009A_480X800_HBP /* Vertical back porch */ 00115 #define OTM8009A_800X480_VFP OTM8009A_480X800_HFP /* Vertical front porch */ 00116 00117 00118 /* List of OTM8009A used commands */ 00119 /* Detailed in OTM8009A Data Sheet 'DATA_SHEET_OTM8009A_V0 92.pdf' */ 00120 /* Version of 14 June 2012 */ 00121 #define OTM8009A_CMD_NOP 0x00 /* NOP command */ 00122 #define OTM8009A_CMD_SWRESET 0x01 /* Sw reset command */ 00123 #define OTM8009A_CMD_RDDMADCTL 0x0B /* Read Display MADCTR command : read memory display access ctrl */ 00124 #define OTM8009A_CMD_RDDCOLMOD 0x0C /* Read Display pixel format */ 00125 #define OTM8009A_CMD_SLPIN 0x10 /* Sleep In command */ 00126 #define OTM8009A_CMD_SLPOUT 0x11 /* Sleep Out command */ 00127 #define OTM8009A_CMD_PTLON 0x12 /* Partial mode On command */ 00128 00129 #define OTM8009A_CMD_DISPOFF 0x28 /* Display Off command */ 00130 #define OTM8009A_CMD_DISPON 0x29 /* Display On command */ 00131 00132 #define OTM8009A_CMD_CASET 0x2A /* Column address set command */ 00133 #define OTM8009A_CMD_PASET 0x2B /* Page address set command */ 00134 00135 #define OTM8009A_CMD_RAMWR 0x2C /* Memory (GRAM) write command */ 00136 #define OTM8009A_CMD_RAMRD 0x2E /* Memory (GRAM) read command */ 00137 00138 #define OTM8009A_CMD_PLTAR 0x30 /* Partial area command (4 parameters) */ 00139 00140 #define OTM8009A_CMD_TEOFF 0x34 /* Tearing Effect Line Off command : command with no parameter */ 00141 00142 #define OTM8009A_CMD_TEEON 0x35 /* Tearing Effect Line On command : command with 1 parameter 'TELOM' */ 00143 00144 /* Parameter TELOM : Tearing Effect Line Output Mode : possible values */ 00145 #define OTM8009A_TEEON_TELOM_VBLANKING_INFO_ONLY 0x00 00146 #define OTM8009A_TEEON_TELOM_VBLANKING_AND_HBLANKING_INFO 0x01 00147 00148 #define OTM8009A_CMD_MADCTR 0x36 /* Memory Access write control command */ 00149 00150 /* Possible used values of MADCTR */ 00151 #define OTM8009A_MADCTR_MODE_PORTRAIT 0x00 00152 #define OTM8009A_MADCTR_MODE_LANDSCAPE 0x60 /* MY = 0, MX = 1, MV = 1, ML = 0, RGB = 0 */ 00153 00154 #define OTM8009A_CMD_IDMOFF 0x38 /* Idle mode Off command */ 00155 #define OTM8009A_CMD_IDMON 0x39 /* Idle mode On command */ 00156 00157 #define OTM8009A_CMD_COLMOD 0x3A /* Interface Pixel format command */ 00158 00159 /* Possible values of COLMOD parameter corresponding to used pixel formats */ 00160 #define OTM8009A_COLMOD_RGB565 0x55 00161 #define OTM8009A_COLMOD_RGB888 0x77 00162 00163 #define OTM8009A_CMD_RAMWRC 0x3C /* Memory write continue command */ 00164 #define OTM8009A_CMD_RAMRDC 0x3E /* Memory read continue command */ 00165 00166 #define OTM8009A_CMD_WRTESCN 0x44 /* Write Tearing Effect Scan line command */ 00167 #define OTM8009A_CMD_RDSCNL 0x45 /* Read Tearing Effect Scan line command */ 00168 00169 /* CABC Management : ie : Content Adaptive Back light Control in IC OTM8009a */ 00170 #define OTM8009A_CMD_WRDISBV 0x51 /* Write Display Brightness command */ 00171 #define OTM8009A_CMD_WRCTRLD 0x53 /* Write CTRL Display command */ 00172 #define OTM8009A_CMD_WRCABC 0x55 /* Write Content Adaptive Brightness command */ 00173 #define OTM8009A_CMD_WRCABCMB 0x5E /* Write CABC Minimum Brightness command */ 00174 00175 /** 00176 * @brief OTM8009A_480X800 frequency divider 00177 */ 00178 #define OTM8009A_480X800_FREQUENCY_DIVIDER 2 /* LCD Frequency divider */ 00179 00180 /** 00181 * @} 00182 */ 00183 00184 /* Exported macro ------------------------------------------------------------*/ 00185 00186 /** @defgroup OTM8009A_Exported_Macros OTM8009A Exported Macros 00187 * @{ 00188 */ 00189 00190 /** 00191 * @} 00192 */ 00193 00194 /* Exported functions --------------------------------------------------------*/ 00195 00196 /** @addtogroup OTM8009A_Exported_Functions 00197 * @{ 00198 */ 00199 void DSI_IO_WriteCmd(uint32_t NbrParams, uint8_t *pParams); 00200 uint8_t OTM8009A_Init(uint32_t ColorCoding, uint32_t orientation); 00201 void OTM8009A_IO_Delay(uint32_t Delay); 00202 /** 00203 * @} 00204 */ 00205 #ifdef __cplusplus 00206 } 00207 #endif 00208 00209 #endif /* __OTM8009A_480X800_H */ 00210 /** 00211 * @} 00212 */ 00213 00214 /** 00215 * @} 00216 */ 00217 00218 /** 00219 * @} 00220 */ 00221 00222 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Tue Jul 12 2022 17:55:04 by 1.7.2