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
6213de3a
Commit
6213de3a
authored
Apr 22, 2018
by
Bodmer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use direct write, fix bug for TFT_CS pin >31
parent
235f89e7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
14 deletions
+27
-14
TFT_eSPI.h
TFT_eSPI.h
+27
-14
No files found.
TFT_eSPI.h
View file @
6213de3a
...
@@ -101,15 +101,23 @@
...
@@ -101,15 +101,23 @@
#if defined (ESP32_PARALLEL)
#if defined (ESP32_PARALLEL)
#define DC_C GPIO.out_w1tc = (1 << TFT_DC)
#define DC_C GPIO.out_w1tc = (1 << TFT_DC)
#define DC_D GPIO.out_w1ts = (1 << TFT_DC)
#define DC_D GPIO.out_w1ts = (1 << TFT_DC)
//#define DC_C digitalWrite(TFT_DC, LOW)
//#define DC_D digitalWrite(TFT_DC, HIGH)
#else
#else
#if TFT_DC >= 32 || TFT_DC <= -1
#if TFT_DC >= 32
#define DC_C digitalWrite(TFT_DC, LOW)
#define DC_C GPIO.out1_w1ts.val = (1 << (TFT_DC - 32)); \
#define DC_D digitalWrite(TFT_DC, HIGH)
GPIO.out1_w1tc.val = (1 << (TFT_DC - 32))
#define DC_D GPIO.out1_w1tc.val = (1 << (TFT_DC - 32)); \
GPIO.out1_w1ts.val = (1 << (TFT_DC - 32))
#else
#if TFT_DC >= 0
#define DC_C GPIO.out_w1ts = (1 << TFT_DC); \
GPIO.out_w1tc = (1 << TFT_DC)
#define DC_D GPIO.out_w1tc = (1 << TFT_DC); \
GPIO.out_w1ts = (1 << TFT_DC)
#else
#else
#define DC_C GPIO.out_w1ts = (1 << TFT_DC); GPIO.out_w1tc = (1 << TFT_DC)
#define DC_C
#define DC_D GPIO.out_w1tc = (1 << TFT_DC); GPIO.out_w1ts = (1 << TFT_DC)
#define DC_D
#endif
#endif
#endif
#endif
#endif
#else
#else
...
@@ -134,12 +142,19 @@
...
@@ -134,12 +142,19 @@
#define CS_L // The TFT CS is set permanently low during init()
#define CS_L // The TFT CS is set permanently low during init()
#define CS_H
#define CS_H
#else
#else
#if TFT_CS >= 32 || TFT_CS <= -1
#if TFT_CS >= 32
#define CS_L digitalWrite(TFT_DC, LOW)
#define CS_L GPIO.out1_w1ts.val = (1 << (TFT_CS - 32)); \
#define CS_H digitalWrite(TFT_DC, HIGH)
GPIO.out1_w1tc.val = (1 << (TFT_CS - 32))
#define CS_H GPIO.out1_w1tc.val = (1 << (TFT_CS - 32)); \
GPIO.out1_w1ts.val = (1 << (TFT_CS - 32))
#else
#else
#if TFT_CS >= 0
#define CS_L GPIO.out_w1ts = (1 << TFT_CS);GPIO.out_w1tc = (1 << TFT_CS)
#define CS_L GPIO.out_w1ts = (1 << TFT_CS);GPIO.out_w1tc = (1 << TFT_CS)
#define CS_H GPIO.out_w1tc = (1 << TFT_CS);GPIO.out_w1ts = (1 << TFT_CS)
#define CS_H GPIO.out_w1tc = (1 << TFT_CS);GPIO.out_w1ts = (1 << TFT_CS)
#else
#define CS_L
#define CS_H
#endif
#endif
#endif
#endif
#endif
#else
#else
...
@@ -161,9 +176,7 @@
...
@@ -161,9 +176,7 @@
#ifdef TFT_WR
#ifdef TFT_WR
#if defined (ESP32)
#if defined (ESP32)
#define WR_L GPIO.out_w1tc = (1 << TFT_WR)
#define WR_L GPIO.out_w1tc = (1 << TFT_WR)
//#define WR_L digitalWrite(TFT_WR, LOW)
#define WR_H GPIO.out_w1ts = (1 << TFT_WR)
#define WR_H GPIO.out_w1ts = (1 << TFT_WR)
//#define WR_H digitalWrite(TFT_WR, HIGH)
#else
#else
#define WR_L GPOC=wrpinmask
#define WR_L GPOC=wrpinmask
#define WR_H GPOS=wrpinmask
#define WR_H GPOS=wrpinmask
...
...
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