Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
rzeldent committed Nov 1, 2024
1 parent e8c25bd commit 672bb8e
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions src/esp_panel_st7701.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,18 +212,18 @@ esp_err_t st7701_mirror(esp_lcd_panel_t *panel, bool mirror_x, bool mirror_y)

st7701_panel_t *ph = (st7701_panel_t *)panel;

// if (mirror_x)
// ph->madctl |= LCD_CMD_MX_BIT;
// else
// ph->madctl &= ~LCD_CMD_MX_BIT;

// if (mirror_y)
// ph->madctl |= LCD_CMD_MY_BIT;
// else
// ph->madctl &= ~LCD_CMD_MY_BIT;

// return st7701_update_madctl(ph);
return esp_lcd_panel_mirror(ph->lcd_panel, mirror_x, mirror_y);
if (mirror_x)
ph->madctl |= LCD_CMD_MX_BIT;
else
ph->madctl &= ~LCD_CMD_MX_BIT;

if (mirror_y)
ph->madctl |= LCD_CMD_MY_BIT;
else
ph->madctl &= ~LCD_CMD_MY_BIT;

return st7701_update_madctl(ph);
//return esp_lcd_panel_mirror(ph->lcd_panel, mirror_x, mirror_y);
}

esp_err_t st7701_swap_xy(esp_lcd_panel_t *panel, bool swap_xy)
Expand All @@ -233,13 +233,13 @@ esp_err_t st7701_swap_xy(esp_lcd_panel_t *panel, bool swap_xy)
return ESP_ERR_INVALID_ARG;

st7701_panel_t *ph = (st7701_panel_t *)panel;
// if (swap_xy)
// ph->madctl |= LCD_CMD_MV_BIT;
// else
// ph->madctl &= ~LCD_CMD_MV_BIT;
if (swap_xy)
ph->madctl |= LCD_CMD_MV_BIT;
else
ph->madctl &= ~LCD_CMD_MV_BIT;

// return st7701_update_madctl(ph);
return esp_lcd_panel_swap_xy(ph->lcd_panel, swap_xy);
return st7701_update_madctl(ph);
// return esp_lcd_panel_swap_xy(ph->lcd_panel, swap_xy);
}

esp_err_t st7701_set_gap(esp_lcd_panel_t *panel, int x_gap, int y_gap)
Expand Down

0 comments on commit 672bb8e

Please sign in to comment.