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
3faaa321
Unverified
Commit
3faaa321
authored
Oct 29, 2018
by
Bodmer
Committed by
GitHub
Oct 29, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #179 from tablatronix/160x80_BGR
160x80 bgr
parents
3d5ff736
d8684840
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
8 deletions
+40
-8
TFT_Drivers/ST7735_Defines.h
TFT_Drivers/ST7735_Defines.h
+5
-0
TFT_Drivers/ST7735_Init.h
TFT_Drivers/ST7735_Init.h
+7
-0
TFT_Drivers/ST7735_Rotation.h
TFT_Drivers/ST7735_Rotation.h
+16
-0
User_Setup.h
User_Setup.h
+10
-8
User_Setups/SetupX_Template.h
User_Setups/SetupX_Template.h
+2
-0
No files found.
TFT_Drivers/ST7735_Defines.h
View file @
3faaa321
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
#define INITR_GREENTAB2 0x3 // Use if you get random pixels on two edges of green tab display
#define INITR_GREENTAB2 0x3 // Use if you get random pixels on two edges of green tab display
#define INITR_GREENTAB3 0x4 // Use if you get random pixels on edge(s) of 128x128 screen
#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_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 INITB 0xB
#define INITB 0xB
...
@@ -38,6 +39,10 @@
...
@@ -38,6 +39,10 @@
#define TAB_COLOUR INITR_GREENTAB128
#define TAB_COLOUR INITR_GREENTAB128
#define CGRAM_OFFSET
#define CGRAM_OFFSET
#elif defined (ST7735_GREENTAB160x80)
#define TAB_COLOUR INITR_GREENTAB160x80
#define CGRAM_OFFSET
#elif defined (ST7735_REDTAB)
#elif defined (ST7735_REDTAB)
#define TAB_COLOUR INITR_REDTAB
#define TAB_COLOUR INITR_REDTAB
...
...
TFT_Drivers/ST7735_Init.h
View file @
3faaa321
...
@@ -173,6 +173,13 @@
...
@@ -173,6 +173,13 @@
colstart
=
0
;
colstart
=
0
;
rowstart
=
32
;
rowstart
=
32
;
}
}
else
if
(
tabcolor
==
INITR_GREENTAB160x80
)
{
commandList
(
Rcmd2green
);
writecommand
(
TFT_INVON
);
colstart
=
26
;
rowstart
=
1
;
}
else
if
(
tabcolor
==
INITR_REDTAB
)
else
if
(
tabcolor
==
INITR_REDTAB
)
{
{
commandList
(
Rcmd2red
);
commandList
(
Rcmd2red
);
...
...
TFT_Drivers/ST7735_Rotation.h
View file @
3faaa321
...
@@ -20,6 +20,10 @@
...
@@ -20,6 +20,10 @@
writedata
(
TFT_MAD_MX
|
TFT_MAD_MY
|
TFT_MAD_MH
|
TFT_MAD_BGR
);
writedata
(
TFT_MAD_MX
|
TFT_MAD_MY
|
TFT_MAD_MH
|
TFT_MAD_BGR
);
colstart
=
0
;
colstart
=
0
;
rowstart
=
32
;
rowstart
=
32
;
}
else
if
(
tabcolor
==
INITR_GREENTAB160x80
)
{
writedata
(
TFT_MAD_MX
|
TFT_MAD_MY
|
TFT_MAD_MH
|
TFT_MAD_BGR
);
colstart
=
26
;
rowstart
=
1
;
}
else
if
(
tabcolor
==
INITB
)
{
}
else
if
(
tabcolor
==
INITB
)
{
writedata
(
TFT_MAD_MX
|
TFT_MAD_RGB
);
writedata
(
TFT_MAD_MX
|
TFT_MAD_RGB
);
}
else
{
}
else
{
...
@@ -43,6 +47,10 @@
...
@@ -43,6 +47,10 @@
writedata
(
TFT_MAD_MV
|
TFT_MAD_MY
|
TFT_MAD_BGR
);
writedata
(
TFT_MAD_MV
|
TFT_MAD_MY
|
TFT_MAD_BGR
);
colstart
=
32
;
colstart
=
32
;
rowstart
=
0
;
rowstart
=
0
;
}
else
if
(
tabcolor
==
INITR_GREENTAB160x80
)
{
writedata
(
TFT_MAD_MV
|
TFT_MAD_MY
|
TFT_MAD_BGR
);
colstart
=
1
;
rowstart
=
26
;
}
else
if
(
tabcolor
==
INITB
)
{
}
else
if
(
tabcolor
==
INITB
)
{
writedata
(
TFT_MAD_MV
|
TFT_MAD_MX
|
TFT_MAD_MY
|
TFT_MAD_RGB
);
writedata
(
TFT_MAD_MV
|
TFT_MAD_MX
|
TFT_MAD_MY
|
TFT_MAD_RGB
);
}
else
{
}
else
{
...
@@ -66,6 +74,10 @@
...
@@ -66,6 +74,10 @@
writedata
(
TFT_MAD_BGR
);
writedata
(
TFT_MAD_BGR
);
colstart
=
0
;
colstart
=
0
;
rowstart
=
0
;
rowstart
=
0
;
}
else
if
(
tabcolor
==
INITR_GREENTAB160x80
)
{
writedata
(
TFT_MAD_BGR
);
colstart
=
0
;
rowstart
=
0
;
}
else
if
(
tabcolor
==
INITB
)
{
}
else
if
(
tabcolor
==
INITB
)
{
writedata
(
TFT_MAD_MY
|
TFT_MAD_RGB
);
writedata
(
TFT_MAD_MY
|
TFT_MAD_RGB
);
}
else
{
}
else
{
...
@@ -89,6 +101,10 @@
...
@@ -89,6 +101,10 @@
writedata
(
TFT_MAD_MX
|
TFT_MAD_MV
|
TFT_MAD_BGR
);
writedata
(
TFT_MAD_MX
|
TFT_MAD_MV
|
TFT_MAD_BGR
);
colstart
=
0
;
colstart
=
0
;
rowstart
=
0
;
rowstart
=
0
;
}
else
if
(
tabcolor
==
INITR_GREENTAB160x80
)
{
writedata
(
TFT_MAD_MX
|
TFT_MAD_MV
|
TFT_MAD_BGR
);
colstart
=
1
;
rowstart
=
26
;
}
else
if
(
tabcolor
==
INITB
)
{
}
else
if
(
tabcolor
==
INITB
)
{
writedata
(
TFT_MAD_MV
|
TFT_MAD_RGB
);
writedata
(
TFT_MAD_MV
|
TFT_MAD_RGB
);
}
else
{
}
else
{
...
...
User_Setup.h
View file @
3faaa321
...
@@ -30,8 +30,9 @@
...
@@ -30,8 +30,9 @@
//#define M5STACK
//#define M5STACK
// For ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation
// For ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation
//#define TFT_WIDTH 128
// #define TFT_WIDTH 80
//#define TFT_HEIGHT 160
// #define TFT_WIDTH 128
// #define TFT_HEIGHT 160
//#define TFT_HEIGHT 128
//#define TFT_HEIGHT 128
// For ST7735 ONLY, define the type of display, originally this was based on the
// For ST7735 ONLY, define the type of display, originally this was based on the
...
@@ -41,12 +42,13 @@
...
@@ -41,12 +42,13 @@
// Comment out ALL BUT ONE of these options for a ST7735 display driver, save this
// Comment out ALL BUT ONE of these options for a ST7735 display driver, save this
// this User_Setup file, then rebuild and upload the sketch to the board again:
// this User_Setup file, then rebuild and upload the sketch to the board again:
//#define ST7735_INITB
// #define ST7735_INITB
//#define ST7735_GREENTAB
// #define ST7735_GREENTAB
//#define ST7735_GREENTAB2
// #define ST7735_GREENTAB2
//#define ST7735_GREENTAB3
// #define ST7735_GREENTAB3
//#define ST7735_GREENTAB128 // For 128 x 128 display
// #define ST7735_GREENTAB128 // For 128 x 128 display
//#define ST7735_REDTAB
// #define ST7735_GREENTAB160x80 // For 160 x 80 display (BGR, inverted, 26 offset)
// #define ST7735_REDTAB
//#define ST7735_BLACKTAB
//#define ST7735_BLACKTAB
// ##################################################################################
// ##################################################################################
...
...
User_Setups/SetupX_Template.h
View file @
3faaa321
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
//#define M5STACK
//#define M5STACK
// For ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation
// For ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation
//#define TFT_WIDTH 80
//#define TFT_WIDTH 128
//#define TFT_WIDTH 128
//#define TFT_HEIGHT 160
//#define TFT_HEIGHT 160
//#define TFT_HEIGHT 128
//#define TFT_HEIGHT 128
...
@@ -40,6 +41,7 @@
...
@@ -40,6 +41,7 @@
//#define ST7735_GREENTAB2
//#define ST7735_GREENTAB2
//#define ST7735_GREENTAB3
//#define ST7735_GREENTAB3
//#define ST7735_GREENTAB128 // For 128 x 128 display
//#define ST7735_GREENTAB128 // For 128 x 128 display
//#define ST7735_GREENTAB160x80 // For 160 x 80 display (BGR, inverted, 26 offset)
//#define ST7735_REDTAB
//#define ST7735_REDTAB
//#define ST7735_BLACKTAB
//#define ST7735_BLACKTAB
...
...
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