Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
TFT_eSPI
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
TFT_eSPI
Commits
d4ff3c8d
Commit
d4ff3c8d
authored
Nov 07, 2018
by
Gavin Smalley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for red-tabbed 80x160 screen.
parent
cbc2e66d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
0 deletions
+28
-0
TFT_Drivers/ST7735_Defines.h
TFT_Drivers/ST7735_Defines.h
+5
-0
TFT_Drivers/ST7735_Init.h
TFT_Drivers/ST7735_Init.h
+6
-0
TFT_Drivers/ST7735_Rotation.h
TFT_Drivers/ST7735_Rotation.h
+16
-0
User_Setup.h
User_Setup.h
+1
-0
No files found.
TFT_Drivers/ST7735_Defines.h
View file @
d4ff3c8d
...
...
@@ -16,6 +16,7 @@
#define INITR_GREENTAB3 0x4 // Use if you get random pixels on edge(s) of 128x128 screen
#define INITR_GREENTAB128 0x5 // Use if you only get part of 128x128 screen in rotation 0 & 1
#define INITR_GREENTAB160x80 0x6 // Use if you only get part of 128x128 screen in rotation 0 & 1
#define INITR_REDTAB160x80 0x7 // Added for https://www.aliexpress.com/item/ShengYang-1pcs-IPS-0-96-inch-7P-SPI-HD-65K-Full-Color-OLED-Module-ST7735-Drive/32918394604.html
#define INITB 0xB
...
...
@@ -42,6 +43,10 @@
#elif defined (ST7735_GREENTAB160x80)
#define TAB_COLOUR INITR_GREENTAB160x80
#define CGRAM_OFFSET
#elif defined (ST7735_REDTAB160x80)
#define TAB_COLOUR INITR_REDTAB160x80
#define CGRAM_OFFSET
#elif defined (ST7735_REDTAB)
#define TAB_COLOUR INITR_REDTAB
...
...
TFT_Drivers/ST7735_Init.h
View file @
d4ff3c8d
...
...
@@ -180,6 +180,12 @@
colstart
=
26
;
rowstart
=
1
;
}
else
if
(
tabcolor
==
INITR_REDTAB160x80
)
{
commandList
(
Rcmd2green
);
colstart
=
24
;
rowstart
=
0
;
}
else
if
(
tabcolor
==
INITR_REDTAB
)
{
commandList
(
Rcmd2red
);
...
...
TFT_Drivers/ST7735_Rotation.h
View file @
d4ff3c8d
...
...
@@ -24,6 +24,10 @@
writedata
(
TFT_MAD_MX
|
TFT_MAD_MY
|
TFT_MAD_MH
|
TFT_MAD_BGR
);
colstart
=
26
;
rowstart
=
1
;
}
else
if
(
tabcolor
==
INITR_REDTAB160x80
)
{
writedata
(
TFT_MAD_MX
|
TFT_MAD_MY
|
TFT_MAD_MH
|
TFT_MAD_BGR
);
colstart
=
24
;
rowstart
=
0
;
}
else
if
(
tabcolor
==
INITB
)
{
writedata
(
TFT_MAD_MX
|
TFT_MAD_RGB
);
}
else
{
...
...
@@ -51,6 +55,10 @@
writedata
(
TFT_MAD_MV
|
TFT_MAD_MY
|
TFT_MAD_BGR
);
colstart
=
1
;
rowstart
=
26
;
}
else
if
(
tabcolor
==
INITR_REDTAB160x80
)
{
writedata
(
TFT_MAD_MV
|
TFT_MAD_MY
|
TFT_MAD_BGR
);
colstart
=
0
;
rowstart
=
24
;
}
else
if
(
tabcolor
==
INITB
)
{
writedata
(
TFT_MAD_MV
|
TFT_MAD_MX
|
TFT_MAD_MY
|
TFT_MAD_RGB
);
}
else
{
...
...
@@ -78,6 +86,10 @@
writedata
(
TFT_MAD_BGR
);
colstart
=
0
;
rowstart
=
0
;
}
else
if
(
tabcolor
==
INITR_REDTAB160x80
)
{
writedata
(
TFT_MAD_BGR
);
colstart
=
0
;
rowstart
=
0
;
}
else
if
(
tabcolor
==
INITB
)
{
writedata
(
TFT_MAD_MY
|
TFT_MAD_RGB
);
}
else
{
...
...
@@ -105,6 +117,10 @@
writedata
(
TFT_MAD_MX
|
TFT_MAD_MV
|
TFT_MAD_BGR
);
colstart
=
1
;
rowstart
=
26
;
}
else
if
(
tabcolor
==
INITR_REDTAB160x80
)
{
writedata
(
TFT_MAD_MX
|
TFT_MAD_MV
|
TFT_MAD_BGR
);
colstart
=
0
;
rowstart
=
24
;
}
else
if
(
tabcolor
==
INITB
)
{
writedata
(
TFT_MAD_MV
|
TFT_MAD_RGB
);
}
else
{
...
...
User_Setup.h
View file @
d4ff3c8d
...
...
@@ -53,6 +53,7 @@
// #define ST7735_GREENTAB160x80 // For 160 x 80 display (BGR, inverted, 26 offset)
// #define ST7735_REDTAB
// #define ST7735_BLACKTAB
// #define ST7735_REDTAB160x80 // For 160 x 80 display (24 offset) (https://www.aliexpress.com/item/ShengYang-1pcs-IPS-0-96-inch-7P-SPI-HD-65K-Full-Color-OLED-Module-ST7735-Drive/32918394604.html)
// ##################################################################################
//
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment