Lines Matching +full:enable +full:- +full:output +full:- +full:invert
4 * SPDX-License-Identifier: Apache-2.0
45 uint8_t doca[8]; /* Display output ctrl */
49 uint8_t te_mode; /* Tearing enable mode */
50 uint32_t te_delay; /* Tearing enable delay */
57 const struct st7796s_config *config = dev->config; in st7796s_send_cmd()
59 return mipi_dbi_command_write(config->mipi_dbi, &config->dbi_config, in st7796s_send_cmd()
72 addr_data[1] = sys_cpu_to_be16(x + width - 1); in st7796s_set_cursor()
82 addr_data[1] = sys_cpu_to_be16(y + height - 1); in st7796s_set_cursor()
100 const struct st7796s_config *config = dev->config; in st7796s_get_pixelfmt()
103 * Invert the pixel format for 8-bit 8080 Parallel Interface. in st7796s_get_pixelfmt()
111 * This is not an issue when using a 16-bit interface. in st7796s_get_pixelfmt()
115 * However this is an issue when using a 8-bit interface. in st7796s_get_pixelfmt()
122 if (config->dbi_config.mode == MIPI_DBI_MODE_8080_BUS_8_BIT) { in st7796s_get_pixelfmt()
125 * invert the reported pixel format if "rgb_is_inverted" in st7796s_get_pixelfmt()
128 if (((bool)(config->madctl & ST7796S_MADCTL_BGR)) != in st7796s_get_pixelfmt()
129 config->rgb_is_inverted) { in st7796s_get_pixelfmt()
137 * Invert the pixel format if rgb_is_inverted is enabled. in st7796s_get_pixelfmt()
144 if (((bool)(config->madctl & ST7796S_MADCTL_BGR)) != in st7796s_get_pixelfmt()
145 config->rgb_is_inverted) { in st7796s_get_pixelfmt()
158 const struct st7796s_config *config = dev->config; in st7796s_write()
163 ret = st7796s_set_cursor(dev, x, y, desc->width, desc->height); in st7796s_write()
168 mipi_desc.buf_size = desc->width * desc->height * ST7796S_PIXEL_SIZE; in st7796s_write()
169 mipi_desc.frame_incomplete = desc->frame_incomplete; in st7796s_write()
171 ret = mipi_dbi_command_write(config->mipi_dbi, in st7796s_write()
172 &config->dbi_config, ST7796S_CMD_RAMWR, in st7796s_write()
180 return mipi_dbi_write_display(config->mipi_dbi, in st7796s_write()
181 &config->dbi_config, buf, in st7796s_write()
188 const struct st7796s_config *config = dev->config; in st7796s_get_capabilities()
192 capabilities->current_pixel_format = st7796s_get_pixelfmt(dev); in st7796s_get_capabilities()
194 capabilities->x_resolution = config->width; in st7796s_get_capabilities()
195 capabilities->y_resolution = config->height; in st7796s_get_capabilities()
196 capabilities->current_orientation = DISPLAY_ORIENTATION_NORMAL; in st7796s_get_capabilities()
201 const struct st7796s_config *config = dev->config; in st7796s_lcd_config()
218 ret = st7796s_send_cmd(dev, ST7796S_CMD_DIC, &config->dic, sizeof(config->dic)); in st7796s_lcd_config()
223 ret = st7796s_send_cmd(dev, ST7796S_CMD_FRMCTR1, config->frmctl1, in st7796s_lcd_config()
224 sizeof(config->frmctl1)); in st7796s_lcd_config()
229 ret = st7796s_send_cmd(dev, ST7796S_CMD_FRMCTR2, config->frmctl2, in st7796s_lcd_config()
230 sizeof(config->frmctl2)); in st7796s_lcd_config()
235 ret = st7796s_send_cmd(dev, ST7796S_CMD_FRMCTR3, config->frmctl3, in st7796s_lcd_config()
236 sizeof(config->frmctl3)); in st7796s_lcd_config()
241 ret = st7796s_send_cmd(dev, ST7796S_CMD_BPC, config->bpc, sizeof(config->bpc)); in st7796s_lcd_config()
246 ret = st7796s_send_cmd(dev, ST7796S_CMD_DFC, config->dfc, sizeof(config->dfc)); in st7796s_lcd_config()
251 ret = st7796s_send_cmd(dev, ST7796S_CMD_PWR1, config->pwr1, sizeof(config->pwr1)); in st7796s_lcd_config()
256 ret = st7796s_send_cmd(dev, ST7796S_CMD_PWR2, &config->pwr2, sizeof(config->pwr2)); in st7796s_lcd_config()
261 ret = st7796s_send_cmd(dev, ST7796S_CMD_PWR3, &config->pwr3, sizeof(config->pwr3)); in st7796s_lcd_config()
266 ret = st7796s_send_cmd(dev, ST7796S_CMD_VCMPCTL, &config->vcmpctl, in st7796s_lcd_config()
267 sizeof(config->vcmpctl)); in st7796s_lcd_config()
272 ret = st7796s_send_cmd(dev, ST7796S_CMD_DOCA, config->doca, in st7796s_lcd_config()
273 sizeof(config->doca)); in st7796s_lcd_config()
278 ret = st7796s_send_cmd(dev, ST7796S_CMD_PGC, config->pgc, sizeof(config->pgc)); in st7796s_lcd_config()
283 ret = st7796s_send_cmd(dev, ST7796S_CMD_NGC, config->ngc, sizeof(config->ngc)); in st7796s_lcd_config()
288 /* Attempt to enable TE signal */ in st7796s_lcd_config()
289 ret = mipi_dbi_configure_te(config->mipi_dbi, config->te_mode, in st7796s_lcd_config()
290 config->te_delay); in st7796s_lcd_config()
292 /* TE was enabled- send TEON, and enable vblank only */ in st7796s_lcd_config()
313 const struct st7796s_config *config = dev->config; in st7796s_init()
320 ret = mipi_dbi_reset(config->mipi_dbi, 100); in st7796s_init()
334 if (config->inverted) { in st7796s_init()
349 param = config->madctl; in st7796s_init()