Skip to content

Commit e07390d

Browse files
authored
Merge pull request #8 from engdoreis/fix_offset
[st7735] Fix the offset workaround when the GM[0:1] is misconfigured.
2 parents 205fc8c + 5510476 commit e07390d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/st7735/lcd_st7735.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ static void run_script(St7735Context *ctx, const uint8_t *addr) {
5454
}
5555

5656
static void set_address(St7735Context *ctx, uint32_t x0, uint32_t y0, uint32_t x1, uint32_t y1) {
57-
x0 += ctx->row_offset;
58-
x1 += ctx->row_offset;
59-
y0 += ctx->col_offset;
60-
y1 += ctx->col_offset;
57+
y0 += ctx->row_offset;
58+
y1 += ctx->row_offset;
59+
x0 += ctx->col_offset;
60+
x1 += ctx->col_offset;
6161

6262
{
6363
uint8_t coordinate[4] = {(uint8_t)(x0 >> 8), (uint8_t)x0, (uint8_t)(x1 >> 8), (uint8_t)x1};

0 commit comments

Comments
 (0)