STM32Cube BSP FW for STM32F769I-Discovery

Dependents:   mbed-os-example-blinky-5 DISCO-F769NI_TOUCHSCREEN_demo_custom_1 Datarecorder2 DISCO-F769NI_TOUCHSCREEN_demo ... more

Committer:
Jerome Coutant
Date:
Fri Nov 15 11:20:11 2019 +0100
Revision:
4:72a949940ad6
Parent:
0:c0f3bbab73d2
STM32Cube_FW_F7_V1.15.0 Update

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Jerome Coutant 0:c0f3bbab73d2 1 /**
Jerome Coutant 0:c0f3bbab73d2 2 ******************************************************************************
Jerome Coutant 0:c0f3bbab73d2 3 * @file otm8009a.h
Jerome Coutant 0:c0f3bbab73d2 4 * @author MCD Application Team
Jerome Coutant 0:c0f3bbab73d2 5 * @brief This file contains all the constants parameters for the OTM8009A
Jerome Coutant 0:c0f3bbab73d2 6 * which is the LCD Driver for KoD KM-040TMP-02-0621 (WVGA)
Jerome Coutant 0:c0f3bbab73d2 7 * DSI LCD Display.
Jerome Coutant 0:c0f3bbab73d2 8 ******************************************************************************
Jerome Coutant 0:c0f3bbab73d2 9 * @attention
Jerome Coutant 0:c0f3bbab73d2 10 *
Jerome Coutant 4:72a949940ad6 11 * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
Jerome Coutant 0:c0f3bbab73d2 12 *
Jerome Coutant 0:c0f3bbab73d2 13 * Redistribution and use in source and binary forms, with or without modification,
Jerome Coutant 0:c0f3bbab73d2 14 * are permitted provided that the following conditions are met:
Jerome Coutant 0:c0f3bbab73d2 15 * 1. Redistributions of source code must retain the above copyright notice,
Jerome Coutant 0:c0f3bbab73d2 16 * this list of conditions and the following disclaimer.
Jerome Coutant 0:c0f3bbab73d2 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
Jerome Coutant 0:c0f3bbab73d2 18 * this list of conditions and the following disclaimer in the documentation
Jerome Coutant 0:c0f3bbab73d2 19 * and/or other materials provided with the distribution.
Jerome Coutant 0:c0f3bbab73d2 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Jerome Coutant 0:c0f3bbab73d2 21 * may be used to endorse or promote products derived from this software
Jerome Coutant 0:c0f3bbab73d2 22 * without specific prior written permission.
Jerome Coutant 0:c0f3bbab73d2 23 *
Jerome Coutant 0:c0f3bbab73d2 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Jerome Coutant 0:c0f3bbab73d2 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Jerome Coutant 0:c0f3bbab73d2 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Jerome Coutant 0:c0f3bbab73d2 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Jerome Coutant 0:c0f3bbab73d2 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Jerome Coutant 0:c0f3bbab73d2 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Jerome Coutant 0:c0f3bbab73d2 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Jerome Coutant 0:c0f3bbab73d2 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Jerome Coutant 0:c0f3bbab73d2 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Jerome Coutant 0:c0f3bbab73d2 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Jerome Coutant 0:c0f3bbab73d2 34 *
Jerome Coutant 0:c0f3bbab73d2 35 ******************************************************************************
Jerome Coutant 0:c0f3bbab73d2 36 */
Jerome Coutant 0:c0f3bbab73d2 37
Jerome Coutant 0:c0f3bbab73d2 38 /* Define to prevent recursive inclusion -------------------------------------*/
Jerome Coutant 0:c0f3bbab73d2 39 #ifndef __OTM8009A_H
Jerome Coutant 0:c0f3bbab73d2 40 #define __OTM8009A_H
Jerome Coutant 0:c0f3bbab73d2 41
Jerome Coutant 0:c0f3bbab73d2 42 #ifdef __cplusplus
Jerome Coutant 0:c0f3bbab73d2 43 extern "C" {
Jerome Coutant 0:c0f3bbab73d2 44 #endif
Jerome Coutant 0:c0f3bbab73d2 45
Jerome Coutant 0:c0f3bbab73d2 46 /* Includes ------------------------------------------------------------------*/
Jerome Coutant 0:c0f3bbab73d2 47 #include <stdint.h>
Jerome Coutant 0:c0f3bbab73d2 48 /** @addtogroup BSP
Jerome Coutant 0:c0f3bbab73d2 49 * @{
Jerome Coutant 0:c0f3bbab73d2 50 */
Jerome Coutant 0:c0f3bbab73d2 51
Jerome Coutant 0:c0f3bbab73d2 52 /** @addtogroup Components
Jerome Coutant 0:c0f3bbab73d2 53 * @{
Jerome Coutant 0:c0f3bbab73d2 54 */
Jerome Coutant 0:c0f3bbab73d2 55
Jerome Coutant 0:c0f3bbab73d2 56 /** @addtogroup otm8009a
Jerome Coutant 0:c0f3bbab73d2 57 * @{
Jerome Coutant 0:c0f3bbab73d2 58 */
Jerome Coutant 0:c0f3bbab73d2 59
Jerome Coutant 0:c0f3bbab73d2 60 /** @addtogroup OTM8009A_Exported_Variables
Jerome Coutant 0:c0f3bbab73d2 61 * @{
Jerome Coutant 0:c0f3bbab73d2 62 */
Jerome Coutant 0:c0f3bbab73d2 63
Jerome Coutant 0:c0f3bbab73d2 64 #if defined ( __GNUC__ )
Jerome Coutant 0:c0f3bbab73d2 65 #ifndef __weak
Jerome Coutant 0:c0f3bbab73d2 66 #define __weak __attribute__((weak))
Jerome Coutant 0:c0f3bbab73d2 67 #endif /* __weak */
Jerome Coutant 0:c0f3bbab73d2 68 #endif /* __GNUC__ */
Jerome Coutant 0:c0f3bbab73d2 69
Jerome Coutant 0:c0f3bbab73d2 70 /**
Jerome Coutant 0:c0f3bbab73d2 71 * @brief LCD_OrientationTypeDef
Jerome Coutant 0:c0f3bbab73d2 72 * Possible values of Display Orientation
Jerome Coutant 0:c0f3bbab73d2 73 */
Jerome Coutant 0:c0f3bbab73d2 74 #define OTM8009A_ORIENTATION_PORTRAIT ((uint32_t)0x00) /* Portrait orientation choice of LCD screen */
Jerome Coutant 0:c0f3bbab73d2 75 #define OTM8009A_ORIENTATION_LANDSCAPE ((uint32_t)0x01) /* Landscape orientation choice of LCD screen */
Jerome Coutant 0:c0f3bbab73d2 76
Jerome Coutant 0:c0f3bbab73d2 77 /**
Jerome Coutant 0:c0f3bbab73d2 78 * @brief Possible values of
Jerome Coutant 0:c0f3bbab73d2 79 * pixel data format (ie color coding) transmitted on DSI Data lane in DSI packets
Jerome Coutant 0:c0f3bbab73d2 80 */
Jerome Coutant 0:c0f3bbab73d2 81 #define OTM8009A_FORMAT_RGB888 ((uint32_t)0x00) /* Pixel format chosen is RGB888 : 24 bpp */
Jerome Coutant 0:c0f3bbab73d2 82 #define OTM8009A_FORMAT_RBG565 ((uint32_t)0x02) /* Pixel format chosen is RGB565 : 16 bpp */
Jerome Coutant 0:c0f3bbab73d2 83
Jerome Coutant 0:c0f3bbab73d2 84 /**
Jerome Coutant 0:c0f3bbab73d2 85 * @brief otm8009a_480x800 Size
Jerome Coutant 0:c0f3bbab73d2 86 */
Jerome Coutant 0:c0f3bbab73d2 87
Jerome Coutant 0:c0f3bbab73d2 88 /* Width and Height in Portrait mode */
Jerome Coutant 0:c0f3bbab73d2 89 #define OTM8009A_480X800_WIDTH ((uint16_t)480) /* LCD PIXEL WIDTH */
Jerome Coutant 0:c0f3bbab73d2 90 #define OTM8009A_480X800_HEIGHT ((uint16_t)800) /* LCD PIXEL HEIGHT */
Jerome Coutant 0:c0f3bbab73d2 91
Jerome Coutant 0:c0f3bbab73d2 92 /* Width and Height in Landscape mode */
Jerome Coutant 0:c0f3bbab73d2 93 #define OTM8009A_800X480_WIDTH ((uint16_t)800) /* LCD PIXEL WIDTH */
Jerome Coutant 0:c0f3bbab73d2 94 #define OTM8009A_800X480_HEIGHT ((uint16_t)480) /* LCD PIXEL HEIGHT */
Jerome Coutant 0:c0f3bbab73d2 95
Jerome Coutant 0:c0f3bbab73d2 96 /**
Jerome Coutant 0:c0f3bbab73d2 97 * @brief OTM8009A_480X800 Timing parameters for Portrait orientation mode
Jerome Coutant 0:c0f3bbab73d2 98 */
Jerome Coutant 4:72a949940ad6 99 #define OTM8009A_480X800_HSYNC ((uint16_t)2) /* Horizontal synchronization */
Jerome Coutant 4:72a949940ad6 100 #define OTM8009A_480X800_HBP ((uint16_t)34) /* Horizontal back porch */
Jerome Coutant 4:72a949940ad6 101 #define OTM8009A_480X800_HFP ((uint16_t)34) /* Horizontal front porch */
Jerome Coutant 4:72a949940ad6 102 #define OTM8009A_480X800_VSYNC ((uint16_t)1) /* Vertical synchronization */
Jerome Coutant 4:72a949940ad6 103 #define OTM8009A_480X800_VBP ((uint16_t)15) /* Vertical back porch */
Jerome Coutant 4:72a949940ad6 104 #define OTM8009A_480X800_VFP ((uint16_t)16) /* Vertical front porch */
Jerome Coutant 0:c0f3bbab73d2 105
Jerome Coutant 0:c0f3bbab73d2 106 /**
Jerome Coutant 0:c0f3bbab73d2 107 * @brief OTM8009A_800X480 Timing parameters for Landscape orientation mode
Jerome Coutant 0:c0f3bbab73d2 108 * Same values as for Portrait mode in fact.
Jerome Coutant 0:c0f3bbab73d2 109 */
Jerome Coutant 4:72a949940ad6 110 #define OTM8009A_800X480_HSYNC OTM8009A_480X800_VSYNC /* Horizontal synchronization */
Jerome Coutant 4:72a949940ad6 111 #define OTM8009A_800X480_HBP OTM8009A_480X800_VBP /* Horizontal back porch */
Jerome Coutant 4:72a949940ad6 112 #define OTM8009A_800X480_HFP OTM8009A_480X800_VFP /* Horizontal front porch */
Jerome Coutant 4:72a949940ad6 113 #define OTM8009A_800X480_VSYNC OTM8009A_480X800_HSYNC /* Vertical synchronization */
Jerome Coutant 4:72a949940ad6 114 #define OTM8009A_800X480_VBP OTM8009A_480X800_HBP /* Vertical back porch */
Jerome Coutant 4:72a949940ad6 115 #define OTM8009A_800X480_VFP OTM8009A_480X800_HFP /* Vertical front porch */
Jerome Coutant 0:c0f3bbab73d2 116
Jerome Coutant 0:c0f3bbab73d2 117
Jerome Coutant 0:c0f3bbab73d2 118 /* List of OTM8009A used commands */
Jerome Coutant 0:c0f3bbab73d2 119 /* Detailed in OTM8009A Data Sheet 'DATA_SHEET_OTM8009A_V0 92.pdf' */
Jerome Coutant 0:c0f3bbab73d2 120 /* Version of 14 June 2012 */
Jerome Coutant 0:c0f3bbab73d2 121 #define OTM8009A_CMD_NOP 0x00 /* NOP command */
Jerome Coutant 0:c0f3bbab73d2 122 #define OTM8009A_CMD_SWRESET 0x01 /* Sw reset command */
Jerome Coutant 0:c0f3bbab73d2 123 #define OTM8009A_CMD_RDDMADCTL 0x0B /* Read Display MADCTR command : read memory display access ctrl */
Jerome Coutant 0:c0f3bbab73d2 124 #define OTM8009A_CMD_RDDCOLMOD 0x0C /* Read Display pixel format */
Jerome Coutant 0:c0f3bbab73d2 125 #define OTM8009A_CMD_SLPIN 0x10 /* Sleep In command */
Jerome Coutant 0:c0f3bbab73d2 126 #define OTM8009A_CMD_SLPOUT 0x11 /* Sleep Out command */
Jerome Coutant 0:c0f3bbab73d2 127 #define OTM8009A_CMD_PTLON 0x12 /* Partial mode On command */
Jerome Coutant 0:c0f3bbab73d2 128
Jerome Coutant 0:c0f3bbab73d2 129 #define OTM8009A_CMD_DISPOFF 0x28 /* Display Off command */
Jerome Coutant 0:c0f3bbab73d2 130 #define OTM8009A_CMD_DISPON 0x29 /* Display On command */
Jerome Coutant 0:c0f3bbab73d2 131
Jerome Coutant 0:c0f3bbab73d2 132 #define OTM8009A_CMD_CASET 0x2A /* Column address set command */
Jerome Coutant 0:c0f3bbab73d2 133 #define OTM8009A_CMD_PASET 0x2B /* Page address set command */
Jerome Coutant 0:c0f3bbab73d2 134
Jerome Coutant 0:c0f3bbab73d2 135 #define OTM8009A_CMD_RAMWR 0x2C /* Memory (GRAM) write command */
Jerome Coutant 0:c0f3bbab73d2 136 #define OTM8009A_CMD_RAMRD 0x2E /* Memory (GRAM) read command */
Jerome Coutant 0:c0f3bbab73d2 137
Jerome Coutant 0:c0f3bbab73d2 138 #define OTM8009A_CMD_PLTAR 0x30 /* Partial area command (4 parameters) */
Jerome Coutant 0:c0f3bbab73d2 139
Jerome Coutant 0:c0f3bbab73d2 140 #define OTM8009A_CMD_TEOFF 0x34 /* Tearing Effect Line Off command : command with no parameter */
Jerome Coutant 0:c0f3bbab73d2 141
Jerome Coutant 0:c0f3bbab73d2 142 #define OTM8009A_CMD_TEEON 0x35 /* Tearing Effect Line On command : command with 1 parameter 'TELOM' */
Jerome Coutant 0:c0f3bbab73d2 143
Jerome Coutant 0:c0f3bbab73d2 144 /* Parameter TELOM : Tearing Effect Line Output Mode : possible values */
Jerome Coutant 0:c0f3bbab73d2 145 #define OTM8009A_TEEON_TELOM_VBLANKING_INFO_ONLY 0x00
Jerome Coutant 0:c0f3bbab73d2 146 #define OTM8009A_TEEON_TELOM_VBLANKING_AND_HBLANKING_INFO 0x01
Jerome Coutant 0:c0f3bbab73d2 147
Jerome Coutant 0:c0f3bbab73d2 148 #define OTM8009A_CMD_MADCTR 0x36 /* Memory Access write control command */
Jerome Coutant 0:c0f3bbab73d2 149
Jerome Coutant 0:c0f3bbab73d2 150 /* Possible used values of MADCTR */
Jerome Coutant 0:c0f3bbab73d2 151 #define OTM8009A_MADCTR_MODE_PORTRAIT 0x00
Jerome Coutant 0:c0f3bbab73d2 152 #define OTM8009A_MADCTR_MODE_LANDSCAPE 0x60 /* MY = 0, MX = 1, MV = 1, ML = 0, RGB = 0 */
Jerome Coutant 0:c0f3bbab73d2 153
Jerome Coutant 0:c0f3bbab73d2 154 #define OTM8009A_CMD_IDMOFF 0x38 /* Idle mode Off command */
Jerome Coutant 0:c0f3bbab73d2 155 #define OTM8009A_CMD_IDMON 0x39 /* Idle mode On command */
Jerome Coutant 0:c0f3bbab73d2 156
Jerome Coutant 0:c0f3bbab73d2 157 #define OTM8009A_CMD_COLMOD 0x3A /* Interface Pixel format command */
Jerome Coutant 0:c0f3bbab73d2 158
Jerome Coutant 0:c0f3bbab73d2 159 /* Possible values of COLMOD parameter corresponding to used pixel formats */
Jerome Coutant 0:c0f3bbab73d2 160 #define OTM8009A_COLMOD_RGB565 0x55
Jerome Coutant 0:c0f3bbab73d2 161 #define OTM8009A_COLMOD_RGB888 0x77
Jerome Coutant 0:c0f3bbab73d2 162
Jerome Coutant 0:c0f3bbab73d2 163 #define OTM8009A_CMD_RAMWRC 0x3C /* Memory write continue command */
Jerome Coutant 0:c0f3bbab73d2 164 #define OTM8009A_CMD_RAMRDC 0x3E /* Memory read continue command */
Jerome Coutant 0:c0f3bbab73d2 165
Jerome Coutant 0:c0f3bbab73d2 166 #define OTM8009A_CMD_WRTESCN 0x44 /* Write Tearing Effect Scan line command */
Jerome Coutant 0:c0f3bbab73d2 167 #define OTM8009A_CMD_RDSCNL 0x45 /* Read Tearing Effect Scan line command */
Jerome Coutant 0:c0f3bbab73d2 168
Jerome Coutant 0:c0f3bbab73d2 169 /* CABC Management : ie : Content Adaptive Back light Control in IC OTM8009a */
Jerome Coutant 0:c0f3bbab73d2 170 #define OTM8009A_CMD_WRDISBV 0x51 /* Write Display Brightness command */
Jerome Coutant 0:c0f3bbab73d2 171 #define OTM8009A_CMD_WRCTRLD 0x53 /* Write CTRL Display command */
Jerome Coutant 0:c0f3bbab73d2 172 #define OTM8009A_CMD_WRCABC 0x55 /* Write Content Adaptive Brightness command */
Jerome Coutant 0:c0f3bbab73d2 173 #define OTM8009A_CMD_WRCABCMB 0x5E /* Write CABC Minimum Brightness command */
Jerome Coutant 0:c0f3bbab73d2 174
Jerome Coutant 0:c0f3bbab73d2 175 /**
Jerome Coutant 0:c0f3bbab73d2 176 * @brief OTM8009A_480X800 frequency divider
Jerome Coutant 0:c0f3bbab73d2 177 */
Jerome Coutant 0:c0f3bbab73d2 178 #define OTM8009A_480X800_FREQUENCY_DIVIDER 2 /* LCD Frequency divider */
Jerome Coutant 0:c0f3bbab73d2 179
Jerome Coutant 0:c0f3bbab73d2 180 /**
Jerome Coutant 0:c0f3bbab73d2 181 * @}
Jerome Coutant 0:c0f3bbab73d2 182 */
Jerome Coutant 0:c0f3bbab73d2 183
Jerome Coutant 0:c0f3bbab73d2 184 /* Exported macro ------------------------------------------------------------*/
Jerome Coutant 0:c0f3bbab73d2 185
Jerome Coutant 0:c0f3bbab73d2 186 /** @defgroup OTM8009A_Exported_Macros OTM8009A Exported Macros
Jerome Coutant 0:c0f3bbab73d2 187 * @{
Jerome Coutant 0:c0f3bbab73d2 188 */
Jerome Coutant 0:c0f3bbab73d2 189
Jerome Coutant 0:c0f3bbab73d2 190 /**
Jerome Coutant 0:c0f3bbab73d2 191 * @}
Jerome Coutant 0:c0f3bbab73d2 192 */
Jerome Coutant 0:c0f3bbab73d2 193
Jerome Coutant 0:c0f3bbab73d2 194 /* Exported functions --------------------------------------------------------*/
Jerome Coutant 0:c0f3bbab73d2 195
Jerome Coutant 0:c0f3bbab73d2 196 /** @addtogroup OTM8009A_Exported_Functions
Jerome Coutant 0:c0f3bbab73d2 197 * @{
Jerome Coutant 0:c0f3bbab73d2 198 */
Jerome Coutant 0:c0f3bbab73d2 199 void DSI_IO_WriteCmd(uint32_t NbrParams, uint8_t *pParams);
Jerome Coutant 0:c0f3bbab73d2 200 uint8_t OTM8009A_Init(uint32_t ColorCoding, uint32_t orientation);
Jerome Coutant 0:c0f3bbab73d2 201 void OTM8009A_IO_Delay(uint32_t Delay);
Jerome Coutant 0:c0f3bbab73d2 202 /**
Jerome Coutant 0:c0f3bbab73d2 203 * @}
Jerome Coutant 0:c0f3bbab73d2 204 */
Jerome Coutant 0:c0f3bbab73d2 205 #ifdef __cplusplus
Jerome Coutant 0:c0f3bbab73d2 206 }
Jerome Coutant 0:c0f3bbab73d2 207 #endif
Jerome Coutant 0:c0f3bbab73d2 208
Jerome Coutant 0:c0f3bbab73d2 209 #endif /* __OTM8009A_480X800_H */
Jerome Coutant 0:c0f3bbab73d2 210 /**
Jerome Coutant 0:c0f3bbab73d2 211 * @}
Jerome Coutant 0:c0f3bbab73d2 212 */
Jerome Coutant 0:c0f3bbab73d2 213
Jerome Coutant 0:c0f3bbab73d2 214 /**
Jerome Coutant 0:c0f3bbab73d2 215 * @}
Jerome Coutant 0:c0f3bbab73d2 216 */
Jerome Coutant 0:c0f3bbab73d2 217
Jerome Coutant 0:c0f3bbab73d2 218 /**
Jerome Coutant 0:c0f3bbab73d2 219 * @}
Jerome Coutant 0:c0f3bbab73d2 220 */
Jerome Coutant 0:c0f3bbab73d2 221
Jerome Coutant 0:c0f3bbab73d2 222 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/