修正偏移量。

Signed-off-by: rick.chan <cy@haoan119.com>
This commit is contained in:
rick.chan 2024-08-23 17:55:40 +08:00
parent 1d5af9d784
commit 324bc1aedf
1 changed files with 3 additions and 3 deletions

View File

@ -239,7 +239,7 @@ static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe,
{ {
switch (par->info->var.rotate) { switch (par->info->var.rotate) {
case 0: case 0:
xs += 0x23; xs += 0x23; // 如果显示有偏移,将 xs 和 xe 偏移改成 0x24 试试
xe += 0x23; xe += 0x23;
ys += 0x00; ys += 0x00;
ye += 0x00; ye += 0x00;
@ -247,8 +247,8 @@ static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe,
default: default:
xs += 0x00; xs += 0x00;
xe += 0x00; xe += 0x00;
ys += 0x23; ys += 0x24;
ye += 0x23; ye += 0x24;
break; break;
} }
write_reg(par, MIPI_DCS_SET_COLUMN_ADDRESS, write_reg(par, MIPI_DCS_SET_COLUMN_ADDRESS,