Skip to content

Add support for 2.25" ST7789 76x284 TFT. #3769

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions TFT_Drivers/ST7789_Defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@
#endif
#endif

// 2.25" 76x284 Small Screen Color IPS TFT Display
#if (TFT_HEIGHT == 284) && (TFT_WIDTH == 76)
#ifndef CGRAM_OFFSET
#define CGRAM_OFFSET
#endif
#endif

// 1.47" 172x320 Round Rectangle Color IPS TFT Display
#if (TFT_HEIGHT == 320) && (TFT_WIDTH == 172)
#ifndef CGRAM_OFFSET
Expand Down
22 changes: 20 additions & 2 deletions TFT_Drivers/ST7789_Rotation.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
colstart = 35;
rowstart = 0;
}
else if(_init_width == 76)
{
colstart = 82;
rowstart = 18;
}
else
{
colstart = 0;
Expand Down Expand Up @@ -59,6 +64,11 @@
colstart = 0;
rowstart = 35;
}
else if(_init_width == 76)
{
colstart = 18;
rowstart = 82;
}
else
{
colstart = 0;
Expand Down Expand Up @@ -93,7 +103,11 @@
colstart = 35;
rowstart = 0;
}
else
else if(_init_width == 76)
{
colstart = 82;
rowstart = 18;
} else
{
colstart = 0;
rowstart = 80;
Expand Down Expand Up @@ -126,7 +140,11 @@
colstart = 0;
rowstart = 35;
}
else
else if(_init_width == 76)
{
colstart = 18;
rowstart = 82;
} else
{
colstart = 80;
rowstart = 0;
Expand Down