otm8009a_reg.h
Go to the documentation of this file.
1 
21 /* Define to prevent recursive inclusion -------------------------------------*/
22 #ifndef OTM8009A_REG_H
23 #define OTM8009A_REG_H
24 
25 /* Includes ------------------------------------------------------------------*/
26 #include <cmsis_compiler.h>
27 
28 #ifdef __cplusplus
29  extern "C" {
30 #endif
31 
49 /* List of OTM8009A used commands */
50 /* Detailed in OTM8009A Data Sheet 'DATA_SHEET_OTM8009A_V0 92.pdf' */
51 /* Version of 14 June 2012 */
52 #define OTM8009A_CMD_NOP 0x00 /* NOP command */
53 #define OTM8009A_CMD_SWRESET 0x01 /* Sw reset command */
54 #define OTM8009A_CMD_RDDMADCTL 0x0B /* Read Display MADCTR command : read memory display access ctrl */
55 #define OTM8009A_CMD_RDDCOLMOD 0x0C /* Read Display pixel format */
56 #define OTM8009A_CMD_SLPIN 0x10 /* Sleep In command */
57 #define OTM8009A_CMD_SLPOUT 0x11 /* Sleep Out command */
58 #define OTM8009A_CMD_PTLON 0x12 /* Partial mode On command */
59 
60 #define OTM8009A_CMD_DISPOFF 0x28 /* Display Off command */
61 #define OTM8009A_CMD_DISPON 0x29 /* Display On command */
62 
63 #define OTM8009A_CMD_CASET 0x2A /* Column address set command */
64 #define OTM8009A_CMD_PASET 0x2B /* Page address set command */
65 
66 #define OTM8009A_CMD_RAMWR 0x2C /* Memory (GRAM) write command */
67 #define OTM8009A_CMD_RAMRD 0x2E /* Memory (GRAM) read command */
68 
69 #define OTM8009A_CMD_PLTAR 0x30 /* Partial area command (4 parameters) */
70 
71 #define OTM8009A_CMD_TEOFF 0x34 /* Tearing Effect Line Off command : command with no parameter */
72 
73 #define OTM8009A_CMD_TEEON 0x35 /* Tearing Effect Line On command : command with 1 parameter 'TELOM' */
74 
75 /* Parameter TELOM : Tearing Effect Line Output Mode : possible values */
76 #define OTM8009A_TEEON_TELOM_VBLANKING_INFO_ONLY 0x00
77 #define OTM8009A_TEEON_TELOM_VBLANKING_AND_HBLANKING_INFO 0x01
78 
79 #define OTM8009A_CMD_MADCTR 0x36 /* Memory Access write control command */
80 
81 /* Possible used values of MADCTR */
82 #define OTM8009A_MADCTR_MODE_PORTRAIT 0x00
83 #define OTM8009A_MADCTR_MODE_LANDSCAPE 0x60 /* MY = 0, MX = 1, MV = 1, ML = 0, RGB = 0 */
84 
85 #define OTM8009A_CMD_IDMOFF 0x38 /* Idle mode Off command */
86 #define OTM8009A_CMD_IDMON 0x39 /* Idle mode On command */
87 
88 #define OTM8009A_CMD_COLMOD 0x3A /* Interface Pixel format command */
89 
90 /* Possible values of COLMOD parameter corresponding to used pixel formats */
91 #define OTM8009A_COLMOD_RGB565 0x55
92 #define OTM8009A_COLMOD_RGB888 0x77
93 
94 #define OTM8009A_CMD_RAMWRC 0x3C /* Memory write continue command */
95 #define OTM8009A_CMD_RAMRDC 0x3E /* Memory read continue command */
96 
97 #define OTM8009A_CMD_WRTESCN 0x44 /* Write Tearing Effect Scan line command */
98 #define OTM8009A_CMD_RDSCNL 0x45 /* Read Tearing Effect Scan line command */
99 
100 /* CABC Management : ie : Content Adaptive Back light Control in IC OTM8009a */
101 #define OTM8009A_CMD_WRDISBV 0x51 /* Write Display Brightness command */
102 #define OTM8009A_CMD_WRCTRLD 0x53 /* Write CTRL Display command */
103 #define OTM8009A_CMD_WRCABC 0x55 /* Write Content Adaptive Brightness command */
104 #define OTM8009A_CMD_WRCABCMB 0x5E /* Write CABC Minimum Brightness command */
105 
106 #define OTM8009A_CMD_ID1 0xDA /* Read ID1 command */
107 #define OTM8009A_CMD_ID2 0xDB /* Read ID2 command */
108 #define OTM8009A_CMD_ID3 0xDC /* Read ID3 command */
109 
113 /* Exported macro ------------------------------------------------------------*/
114 
123 /* Exported functions --------------------------------------------------------*/
124 
128 /************** Generic Function *******************/
129 
130 typedef int32_t (*OTM8009A_Write_Func)(void *, uint16_t, uint8_t*, uint16_t);
131 typedef int32_t (*OTM8009A_Read_Func) (void *, uint16_t, uint8_t*, uint16_t);
132 
133 typedef struct
134 {
137  void *handle;
139 
140 /*******************************************************************************
141 * Register : Generic - All
142 * Address : Generic - All
143 * Bit Group Name: None
144 * Permission : W
145 *******************************************************************************/
146 int32_t otm8009a_read_reg(otm8009a_ctx_t *ctx, uint16_t reg, uint8_t *pdata, uint16_t length);
147 int32_t otm8009a_write_reg(otm8009a_ctx_t *ctx, uint16_t reg, const uint8_t *pdata, uint16_t length);
151 #ifdef __cplusplus
152 }
153 #endif
154 
155 #endif /* OTM8009A_REG_H */
156 
168 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
OTM8009A_Read_Func
int32_t(* OTM8009A_Read_Func)(void *, uint16_t, uint8_t *, uint16_t)
Definition: otm8009a_reg.h:131
otm8009a_ctx_t::handle
void * handle
Definition: otm8009a_reg.h:137
otm8009a_ctx_t
Definition: otm8009a_reg.h:133
otm8009a_read_reg
int32_t otm8009a_read_reg(otm8009a_ctx_t *ctx, uint16_t reg, uint8_t *pdata, uint16_t length)
Definition: otm8009a_reg.c:58
otm8009a_write_reg
int32_t otm8009a_write_reg(otm8009a_ctx_t *ctx, uint16_t reg, const uint8_t *pdata, uint16_t length)
Definition: otm8009a_reg.c:70
otm8009a_ctx_t::WriteReg
OTM8009A_Write_Func WriteReg
Definition: otm8009a_reg.h:135
otm8009a_ctx_t::ReadReg
OTM8009A_Read_Func ReadReg
Definition: otm8009a_reg.h:136
OTM8009A_Write_Func
int32_t(* OTM8009A_Write_Func)(void *, uint16_t, uint8_t *, uint16_t)
Definition: otm8009a_reg.h:130


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:50