Fix display mirroring and update SDMMC card pins
This commit is contained in:
@@ -45,9 +45,9 @@
|
|||||||
|
|
||||||
sdmmc0 {
|
sdmmc0 {
|
||||||
compatible = "espressif,esp32-sdmmc";
|
compatible = "espressif,esp32-sdmmc";
|
||||||
pin-clk = <&gpio0 38 GPIO_FLAG_NONE>;
|
pin-clk = <&gpio0 2 GPIO_FLAG_NONE>;
|
||||||
pin-cmd = <&gpio0 21 GPIO_FLAG_NONE>;
|
pin-cmd = <&gpio0 1 GPIO_FLAG_NONE>;
|
||||||
pin-d0 = <&gpio0 39 GPIO_FLAG_NONE>;
|
pin-d0 = <&gpio0 3 GPIO_FLAG_NONE>;
|
||||||
slot = <SDMMC_HOST_SLOT_1>;
|
slot = <SDMMC_HOST_SLOT_1>;
|
||||||
bus-width = <1>;
|
bus-width = <1>;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ lvgl_port_display_cfg_t St7305Display::getLvglPortDisplayConfig(esp_lcd_panel_io
|
|||||||
.monochrome = true, // Enables esp_lvgl_port monochrome converter
|
.monochrome = true, // Enables esp_lvgl_port monochrome converter
|
||||||
.rotation = {
|
.rotation = {
|
||||||
.swap_xy = false,
|
.swap_xy = false,
|
||||||
.mirror_x = false,
|
.mirror_x = true,
|
||||||
.mirror_y = false,
|
.mirror_y = false,
|
||||||
},
|
},
|
||||||
.color_format = LV_COLOR_FORMAT_RGB565, // Must be RGB565 for monochrome mode to trigger converter
|
.color_format = LV_COLOR_FORMAT_RGB565, // Must be RGB565 for monochrome mode to trigger converter
|
||||||
|
|||||||
@@ -247,16 +247,16 @@ static esp_err_t panel_st7305_mirror(esp_lcd_panel_t *panel, bool mirror_x, bool
|
|||||||
st7305_panel_t *st7305 = __containerof(panel, st7305_panel_t, base);
|
st7305_panel_t *st7305 = __containerof(panel, st7305_panel_t, base);
|
||||||
esp_lcd_panel_io_handle_t io = st7305->io;
|
esp_lcd_panel_io_handle_t io = st7305->io;
|
||||||
if (mirror_x) {
|
if (mirror_x) {
|
||||||
st7305->madctl_val |= ST7305_MADCTL_MY;
|
|
||||||
} else {
|
|
||||||
st7305->madctl_val &= ~ST7305_MADCTL_MY;
|
|
||||||
}
|
|
||||||
if (mirror_y) {
|
|
||||||
st7305->madctl_val |= ST7305_MADCTL_MX;
|
st7305->madctl_val |= ST7305_MADCTL_MX;
|
||||||
} else {
|
} else {
|
||||||
st7305->madctl_val &= ~ST7305_MADCTL_MX;
|
st7305->madctl_val &= ~ST7305_MADCTL_MX;
|
||||||
}
|
}
|
||||||
return esp_lcd_panel_io_tx_param(io, ST7305_CMD_MADCTL, (uint8_t[]) { st7305->madctl_val }, 1);
|
if (mirror_y) {
|
||||||
|
st7305->madctl_val |= ST7305_MADCTL_MY;
|
||||||
|
} else {
|
||||||
|
st7305->madctl_val &= ~ST7305_MADCTL_MY;
|
||||||
|
}
|
||||||
|
return esp_lcd_panel_io_tx_param(io, ST7305_CMD_MADCTL, &st7305->madctl_val, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static esp_err_t panel_st7305_swap_xy(esp_lcd_panel_t *panel, bool swap_axes)
|
static esp_err_t panel_st7305_swap_xy(esp_lcd_panel_t *panel, bool swap_axes)
|
||||||
|
|||||||
Reference in New Issue
Block a user