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
7c9e1cbb
Commit
7c9e1cbb
authored
Oct 12, 2022
by
Bodmer
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Bodmer/TFT_eSPI
parents
49f44e41
ca024b45
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
1 deletion
+23
-1
TFT_Drivers/ST7735_Defines.h
TFT_Drivers/ST7735_Defines.h
+6
-1
TFT_Drivers/ST7735_Init.h
TFT_Drivers/ST7735_Init.h
+16
-0
User_Setup.h
User_Setup.h
+1
-0
No files found.
TFT_Drivers/ST7735_Defines.h
View file @
7c9e1cbb
...
...
@@ -17,6 +17,7 @@
#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 INITR_ROBOTLCD 0x8
#define INITB 0xB
...
...
@@ -44,6 +45,10 @@
#define TAB_COLOUR INITR_GREENTAB160x80
#define CGRAM_OFFSET
#elif defined (ST7735_ROBOTLCD)
#define TAB_COLOUR INITR_ROBOTLCD
#define CGRAM_OFFSET
#elif defined (ST7735_REDTAB160x80)
#define TAB_COLOUR INITR_REDTAB160x80
#define CGRAM_OFFSET
...
...
@@ -107,7 +112,7 @@
#define TFT_MAD_RGB 0x00
#ifndef TFT_RGB_ORDER
#if defined(
INITR_BLACKTAB) || defined(INITR_GREENTAB2) || defined(
INITB)
#if defined(
ST7735_BLACKTAB) || defined(ST7735_GREENTAB2) || defined(ST7735_
INITB)
#define TFT_MAD_COLOR_ORDER TFT_MAD_RGB
#else
#define TFT_MAD_COLOR_ORDER TFT_MAD_BGR
...
...
TFT_Drivers/ST7735_Init.h
View file @
7c9e1cbb
...
...
@@ -123,6 +123,17 @@
0x00
,
0x00
,
// XSTART = 0
0x00
,
0x9F
},
// XEND = 159
// Frame control init for RobotLCD, taken from https://github.com/arduino-libraries/TFT, Adafruit_ST7735.cpp l. 263, commit 61b8a7e
Rcmd3RobotLCD
[]
=
{
3
,
ST7735_FRMCTR1
,
2
,
// 1: Frame rate ctrl - normal mode, 2 args
0x0B
,
0x14
,
ST7735_FRMCTR2
,
2
,
// 2: Frame rate ctrl - idle mode, 2 args
0x0B
,
0x14
,
ST7735_FRMCTR3
,
4
,
// 3: Frame rate ctrl - partial mode, 4 args
0x0B
,
0x14
,
0x0B
,
0x14
},
Rcmd3
[]
=
{
// Init for 7735R, part 3 (red or green tab)
4
,
// 4 commands in list:
ST7735_GMCTRP1
,
16
,
// 1: 16 args, no delay:
...
...
@@ -181,6 +192,11 @@
colstart
=
26
;
rowstart
=
1
;
}
else
if
(
tabcolor
==
INITR_ROBOTLCD
)
{
commandList
(
Rcmd2green
);
commandList
(
Rcmd3RobotLCD
);
}
else
if
(
tabcolor
==
INITR_REDTAB160x80
)
{
commandList
(
Rcmd2green
);
...
...
User_Setup.h
View file @
7c9e1cbb
...
...
@@ -104,6 +104,7 @@
// #define ST7735_GREENTAB3
// #define ST7735_GREENTAB128 // For 128 x 128 display
// #define ST7735_GREENTAB160x80 // For 160 x 80 display (BGR, inverted, 26 offset)
// #define ST7735_ROBOTLCD // For some RobotLCD arduino shields (128x160, BGR, https://docs.arduino.cc/retired/getting-started-guides/TFT)
// #define ST7735_REDTAB
// #define ST7735_BLACKTAB
// #define ST7735_REDTAB160x80 // For 160 x 80 display with 24 pixel offset
...
...
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