From 5510476451a8f8be6ffec4e2010289555db58ea9 Mon Sep 17 00:00:00 2001 From: Douglas Reis Date: Mon, 5 May 2025 10:48:16 +0100 Subject: [PATCH] [st7735] Fix the offset workaround when the GM[0:1] is misconfigured. Signed-off-by: Douglas Reis --- src/st7735/lcd_st7735.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/st7735/lcd_st7735.c b/src/st7735/lcd_st7735.c index b20d686..5f56058 100644 --- a/src/st7735/lcd_st7735.c +++ b/src/st7735/lcd_st7735.c @@ -54,10 +54,10 @@ static void run_script(St7735Context *ctx, const uint8_t *addr) { } static void set_address(St7735Context *ctx, uint32_t x0, uint32_t y0, uint32_t x1, uint32_t y1) { - x0 += ctx->row_offset; - x1 += ctx->row_offset; - y0 += ctx->col_offset; - y1 += ctx->col_offset; + y0 += ctx->row_offset; + y1 += ctx->row_offset; + x0 += ctx->col_offset; + x1 += ctx->col_offset; { uint8_t coordinate[4] = {(uint8_t)(x0 >> 8), (uint8_t)x0, (uint8_t)(x1 >> 8), (uint8_t)x1};