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
7b5f98a6
Commit
7b5f98a6
authored
Apr 29, 2022
by
Bodmer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add RM68120 driver (UNTESTED!)
parent
6b1b2006
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
505 additions
and
0 deletions
+505
-0
TFT_Drivers/RM68120_Defines.h
TFT_Drivers/RM68120_Defines.h
+47
-0
TFT_Drivers/RM68120_Init.h
TFT_Drivers/RM68120_Init.h
+429
-0
TFT_Drivers/RM68120_Rotation.h
TFT_Drivers/RM68120_Rotation.h
+29
-0
No files found.
TFT_Drivers/RM68120_Defines.h
0 → 100644
View file @
7b5f98a6
// Change the width and height if required (defined in portrait mode)
// or use the constructor to over-ride defaults
// RM68120_DRIVER
#define TFT_WIDTH 480
#define TFT_HEIGHT 800
//Set driver type common to all TBD initialisation options
#ifndef RM68120_DRIVER
#define RM68120_DRIVER
#endif
// Delay between some initialisation commands
#define TFT_INIT_DELAY 0x80 // Not used unless commandlist invoked
// Generic commands used by TFT_eSPI.cpp
#define TFT_NOP 0x0000
#define TFT_SWRST 0x0100
#define TFT_CASET 0x2A00
#define TFT_PASET 0x2B00
#define TFT_RAMWR 0x2C00
#define TFT_RAMRD 0x2E00
#define TFT_IDXRD 0xDD00 // ILI9341 only, indexed control register read
#define TFT_MADCTL 0x3600
#define TFT_MAD_MY 0x80
#define TFT_MAD_MX 0x40
#define TFT_MAD_MV 0x20
#define TFT_MAD_ML 0x10
#define TFT_MAD_BGR 0x08
#define TFT_MAD_MH 0x04
#define TFT_MAD_RGB 0x00
#ifdef TFT_RGB_ORDER
#if (TFT_RGB_ORDER == 1)
#define TFT_MAD_COLOR_ORDER TFT_MAD_RGB
#else
#define TFT_MAD_COLOR_ORDER TFT_MAD_BGR
#endif
#else
#define TFT_MAD_COLOR_ORDER TFT_MAD_RGB
#endif
#define TFT_INVOFF 0x2000
#define TFT_INVON 0x2100
TFT_Drivers/RM68120_Init.h
0 → 100644
View file @
7b5f98a6
This diff is collapsed.
Click to expand it.
TFT_Drivers/RM68120_Rotation.h
0 → 100644
View file @
7b5f98a6
// This is the command sequence that rotates the RM68120 driver coordinate frame
rotation
=
m
%
4
;
// Limit the range of values to 0-3
writecommand
(
TFT_MADCTL
);
switch
(
rotation
)
{
case
0
:
writedata
(
TFT_MAD_COLOR_ORDER
);
_width
=
_init_width
;
_height
=
_init_height
;
break
;
case
1
:
writedata
(
TFT_MAD_MV
|
TFT_MAD_MX
|
TFT_MAD_COLOR_ORDER
);
_width
=
_init_height
;
_height
=
_init_width
;
break
;
case
2
:
writedata
(
TFT_MAD_MX
|
TFT_MAD_MY
|
TFT_MAD_COLOR_ORDER
);
_width
=
_init_width
;
_height
=
_init_height
;
break
;
case
3
:
writedata
(
TFT_MAD_MV
|
TFT_MAD_MY
|
TFT_MAD_COLOR_ORDER
);
_width
=
_init_height
;
_height
=
_init_width
;
break
;
}
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