forked from espressif/esp-idf
fix(nt35510_st7789): correct the word spelling
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@@ -47,7 +47,7 @@ typedef struct {
|
|||||||
int y_gap;
|
int y_gap;
|
||||||
uint8_t fb_bits_per_pixel;
|
uint8_t fb_bits_per_pixel;
|
||||||
uint8_t madctl_val; // save current value of LCD_CMD_MADCTL register
|
uint8_t madctl_val; // save current value of LCD_CMD_MADCTL register
|
||||||
uint8_t colmod_cal; // save surrent value of LCD_CMD_COLMOD register
|
uint8_t colmod_val; // save current value of LCD_CMD_COLMOD register
|
||||||
} nt35510_panel_t;
|
} nt35510_panel_t;
|
||||||
|
|
||||||
esp_err_t
|
esp_err_t
|
||||||
@@ -86,16 +86,16 @@ esp_lcd_new_panel_nt35510(const esp_lcd_panel_io_handle_t io, const esp_lcd_pane
|
|||||||
uint8_t fb_bits_per_pixel = 0;
|
uint8_t fb_bits_per_pixel = 0;
|
||||||
switch (panel_dev_config->bits_per_pixel) {
|
switch (panel_dev_config->bits_per_pixel) {
|
||||||
case 16: // RGB565
|
case 16: // RGB565
|
||||||
nt35510->colmod_cal = 0x55;
|
nt35510->colmod_val = 0x55;
|
||||||
fb_bits_per_pixel = 16;
|
fb_bits_per_pixel = 16;
|
||||||
break;
|
break;
|
||||||
case 18: // RGB666
|
case 18: // RGB666
|
||||||
nt35510->colmod_cal = 0x66;
|
nt35510->colmod_val = 0x66;
|
||||||
// each color component (R/G/B) should occupy the 6 high bits of a byte, which means 3 full bytes are required for a pixel
|
// each color component (R/G/B) should occupy the 6 high bits of a byte, which means 3 full bytes are required for a pixel
|
||||||
fb_bits_per_pixel = 24;
|
fb_bits_per_pixel = 24;
|
||||||
break;
|
break;
|
||||||
case 24: // RGB888
|
case 24: // RGB888
|
||||||
nt35510->colmod_cal = 0x77;
|
nt35510->colmod_val = 0x77;
|
||||||
fb_bits_per_pixel = 24;
|
fb_bits_per_pixel = 24;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -176,7 +176,7 @@ static esp_err_t panel_nt35510_init(esp_lcd_panel_t *panel)
|
|||||||
nt35510->madctl_val,
|
nt35510->madctl_val,
|
||||||
}, 2), TAG, "io tx param LCD_CMD_MADCTL failed");
|
}, 2), TAG, "io tx param LCD_CMD_MADCTL failed");
|
||||||
ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, LCD_CMD_COLMOD << 8, (uint16_t[]) {
|
ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, LCD_CMD_COLMOD << 8, (uint16_t[]) {
|
||||||
nt35510->colmod_cal,
|
nt35510->colmod_val,
|
||||||
}, 2), TAG, "io tx param LCD_CMD_COLMOD failed");
|
}, 2), TAG, "io tx param LCD_CMD_COLMOD failed");
|
||||||
|
|
||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@@ -50,7 +50,7 @@ typedef struct {
|
|||||||
int y_gap;
|
int y_gap;
|
||||||
uint8_t fb_bits_per_pixel;
|
uint8_t fb_bits_per_pixel;
|
||||||
uint8_t madctl_val; // save current value of LCD_CMD_MADCTL register
|
uint8_t madctl_val; // save current value of LCD_CMD_MADCTL register
|
||||||
uint8_t colmod_cal; // save surrent value of LCD_CMD_COLMOD register
|
uint8_t colmod_val; // save current value of LCD_CMD_COLMOD register
|
||||||
uint8_t ramctl_val_1;
|
uint8_t ramctl_val_1;
|
||||||
uint8_t ramctl_val_2;
|
uint8_t ramctl_val_2;
|
||||||
} st7789_panel_t;
|
} st7789_panel_t;
|
||||||
@@ -91,11 +91,11 @@ esp_lcd_new_panel_st7789(const esp_lcd_panel_io_handle_t io, const esp_lcd_panel
|
|||||||
uint8_t fb_bits_per_pixel = 0;
|
uint8_t fb_bits_per_pixel = 0;
|
||||||
switch (panel_dev_config->bits_per_pixel) {
|
switch (panel_dev_config->bits_per_pixel) {
|
||||||
case 16: // RGB565
|
case 16: // RGB565
|
||||||
st7789->colmod_cal = 0x55;
|
st7789->colmod_val = 0x55;
|
||||||
fb_bits_per_pixel = 16;
|
fb_bits_per_pixel = 16;
|
||||||
break;
|
break;
|
||||||
case 18: // RGB666
|
case 18: // RGB666
|
||||||
st7789->colmod_cal = 0x66;
|
st7789->colmod_val = 0x66;
|
||||||
// each color component (R/G/B) should occupy the 6 high bits of a byte, which means 3 full bytes are required for a pixel
|
// each color component (R/G/B) should occupy the 6 high bits of a byte, which means 3 full bytes are required for a pixel
|
||||||
fb_bits_per_pixel = 24;
|
fb_bits_per_pixel = 24;
|
||||||
break;
|
break;
|
||||||
@@ -183,7 +183,7 @@ static esp_err_t panel_st7789_init(esp_lcd_panel_t *panel)
|
|||||||
st7789->madctl_val,
|
st7789->madctl_val,
|
||||||
}, 1), TAG, "io tx param LCD_CMD_MADCTL failed");
|
}, 1), TAG, "io tx param LCD_CMD_MADCTL failed");
|
||||||
ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, LCD_CMD_COLMOD, (uint8_t[]) {
|
ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, LCD_CMD_COLMOD, (uint8_t[]) {
|
||||||
st7789->colmod_cal,
|
st7789->colmod_val,
|
||||||
}, 1), TAG, "io tx param LCD_CMD_COLMOD failed");
|
}, 1), TAG, "io tx param LCD_CMD_COLMOD failed");
|
||||||
ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, ST7789_CMD_RAMCTRL, (uint8_t[]) {
|
ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, ST7789_CMD_RAMCTRL, (uint8_t[]) {
|
||||||
st7789->ramctl_val_1, st7789->ramctl_val_2
|
st7789->ramctl_val_1, st7789->ramctl_val_2
|
||||||
|
Reference in New Issue
Block a user