STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
otm8009a.h
Go to the documentation of this file.
1 
40 /* Define to prevent recursive inclusion -------------------------------------*/
41 #ifndef __OTM8009A_H
42 #define __OTM8009A_H
43 
44 #ifdef __cplusplus
45  extern "C" {
46 #endif
47 
48 /* Includes ------------------------------------------------------------------*/
49 #include <stdint.h>
66 #if defined ( __GNUC__ )
67 #ifndef __weak
68 #define __weak __attribute__((weak))
69 #endif /* __weak */
70 #endif /* __GNUC__ */
71 
76 #define OTM8009A_ORIENTATION_PORTRAIT ((uint32_t)0x00) /* Portrait orientation choice of LCD screen */
77 #define OTM8009A_ORIENTATION_LANDSCAPE ((uint32_t)0x01) /* Landscape orientation choice of LCD screen */
78 
83 #define OTM8009A_FORMAT_RGB888 ((uint32_t)0x00) /* Pixel format chosen is RGB888 : 24 bpp */
84 #define OTM8009A_FORMAT_RBG565 ((uint32_t)0x02) /* Pixel format chosen is RGB565 : 16 bpp */
85 
90 /* Width and Height in Portrait mode */
91 #define OTM8009A_480X800_WIDTH ((uint16_t)480) /* LCD PIXEL WIDTH */
92 #define OTM8009A_480X800_HEIGHT ((uint16_t)800) /* LCD PIXEL HEIGHT */
93 
94 /* Width and Height in Landscape mode */
95 #define OTM8009A_800X480_WIDTH ((uint16_t)800) /* LCD PIXEL WIDTH */
96 #define OTM8009A_800X480_HEIGHT ((uint16_t)480) /* LCD PIXEL HEIGHT */
97 
101 #define OTM8009A_480X800_HSYNC ((uint16_t)120) /* Horizontal synchronization */
102 #define OTM8009A_480X800_HBP ((uint16_t)120) /* Horizontal back porch */
103 #define OTM8009A_480X800_HFP ((uint16_t)120) /* Horizontal front porch */
104 #define OTM8009A_480X800_VSYNC ((uint16_t)12) /* Vertical synchronization */
105 #define OTM8009A_480X800_VBP ((uint16_t)12) /* Vertical back porch */
106 #define OTM8009A_480X800_VFP ((uint16_t)12) /* Vertical front porch */
107 
112 #define OTM8009A_800X480_HSYNC OTM8009A_480X800_HSYNC /* Horizontal synchronization */
113 #define OTM8009A_800X480_HBP OTM8009A_480X800_HBP /* Horizontal back porch */
114 #define OTM8009A_800X480_HFP OTM8009A_480X800_HFP /* Horizontal front porch */
115 #define OTM8009A_800X480_VSYNC OTM8009A_480X800_VSYNC /* Vertical synchronization */
116 #define OTM8009A_800X480_VBP OTM8009A_480X800_VBP /* Vertical back porch */
117 #define OTM8009A_800X480_VFP OTM8009A_480X800_VFP /* Vertical front porch */
118 
119 
120 /* List of OTM8009A used commands */
121 /* Detailed in OTM8009A Data Sheet 'DATA_SHEET_OTM8009A_V0 92.pdf' */
122 /* Version of 14 June 2012 */
123 #define OTM8009A_CMD_NOP 0x00 /* NOP command */
124 #define OTM8009A_CMD_SWRESET 0x01 /* Sw reset command */
125 #define OTM8009A_CMD_RDDMADCTL 0x0B /* Read Display MADCTR command : read memory display access ctrl */
126 #define OTM8009A_CMD_RDDCOLMOD 0x0C /* Read Display pixel format */
127 #define OTM8009A_CMD_SLPIN 0x10 /* Sleep In command */
128 #define OTM8009A_CMD_SLPOUT 0x11 /* Sleep Out command */
129 #define OTM8009A_CMD_PTLON 0x12 /* Partial mode On command */
130 
131 #define OTM8009A_CMD_DISPOFF 0x28 /* Display Off command */
132 #define OTM8009A_CMD_DISPON 0x29 /* Display On command */
133 
134 #define OTM8009A_CMD_CASET 0x2A /* Column address set command */
135 #define OTM8009A_CMD_PASET 0x2B /* Page address set command */
136 
137 #define OTM8009A_CMD_RAMWR 0x2C /* Memory (GRAM) write command */
138 #define OTM8009A_CMD_RAMRD 0x2E /* Memory (GRAM) read command */
139 
140 #define OTM8009A_CMD_PLTAR 0x30 /* Partial area command (4 parameters) */
141 
142 #define OTM8009A_CMD_TEOFF 0x34 /* Tearing Effect Line Off command : command with no parameter */
143 
144 #define OTM8009A_CMD_TEEON 0x35 /* Tearing Effect Line On command : command with 1 parameter 'TELOM' */
145 
146 /* Parameter TELOM : Tearing Effect Line Output Mode : possible values */
147 #define OTM8009A_TEEON_TELOM_VBLANKING_INFO_ONLY 0x00
148 #define OTM8009A_TEEON_TELOM_VBLANKING_AND_HBLANKING_INFO 0x01
149 
150 #define OTM8009A_CMD_MADCTR 0x36 /* Memory Access write control command */
151 
152 /* Possible used values of MADCTR */
153 #define OTM8009A_MADCTR_MODE_PORTRAIT 0x00
154 #define OTM8009A_MADCTR_MODE_LANDSCAPE 0x60 /* MY = 0, MX = 1, MV = 1, ML = 0, RGB = 0 */
155 
156 #define OTM8009A_CMD_IDMOFF 0x38 /* Idle mode Off command */
157 #define OTM8009A_CMD_IDMON 0x39 /* Idle mode On command */
158 
159 #define OTM8009A_CMD_COLMOD 0x3A /* Interface Pixel format command */
160 
161 /* Possible values of COLMOD parameter corresponding to used pixel formats */
162 #define OTM8009A_COLMOD_RGB565 0x55
163 #define OTM8009A_COLMOD_RGB888 0x77
164 
165 #define OTM8009A_CMD_RAMWRC 0x3C /* Memory write continue command */
166 #define OTM8009A_CMD_RAMRDC 0x3E /* Memory read continue command */
167 
168 #define OTM8009A_CMD_WRTESCN 0x44 /* Write Tearing Effect Scan line command */
169 #define OTM8009A_CMD_RDSCNL 0x45 /* Read Tearing Effect Scan line command */
170 
171 /* CABC Management : ie : Content Adaptive Back light Control in IC OTM8009a */
172 #define OTM8009A_CMD_WRDISBV 0x51 /* Write Display Brightness command */
173 #define OTM8009A_CMD_WRCTRLD 0x53 /* Write CTRL Display command */
174 #define OTM8009A_CMD_WRCABC 0x55 /* Write Content Adaptive Brightness command */
175 #define OTM8009A_CMD_WRCABCMB 0x5E /* Write CABC Minimum Brightness command */
176 
180 #define OTM8009A_480X800_FREQUENCY_DIVIDER 2 /* LCD Frequency divider */
181 
186 /* Exported macro ------------------------------------------------------------*/
187 
196 /* Exported functions --------------------------------------------------------*/
197 
201 void DSI_IO_WriteCmd(uint32_t NbrParams, uint8_t *pParams);
202 uint8_t OTM8009A_Init(uint32_t ColorCoding, uint32_t orientation);
203 void OTM8009A_IO_Delay(uint32_t Delay);
207 #ifdef __cplusplus
208 }
209 #endif
210 
211 #endif /* __OTM8009A_480X800_H */
212 
224 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
void DSI_IO_WriteCmd(uint32_t NbrParams, uint8_t *pParams)
DCS or Generic short/long write command.
Definition: LCDConf.c:176
void OTM8009A_IO_Delay(uint32_t Delay)
OTM8009A delay.
uint8_t OTM8009A_Init(uint32_t ColorCoding, uint32_t orientation)
Initializes the LCD KoD display part by communication in DSI mode in Video Mode with IC Display Drive...
Definition: otm8009a.c:194