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
84a69457
Commit
84a69457
authored
Dec 01, 2021
by
Bodmer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates for ESP32C3
parent
9bf9c094
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
6 deletions
+26
-6
Processors/TFT_eSPI_ESP32.c
Processors/TFT_eSPI_ESP32.c
+6
-3
Processors/TFT_eSPI_ESP32.h
Processors/TFT_eSPI_ESP32.h
+17
-0
TFT_eSPI.h
TFT_eSPI.h
+1
-1
library.json
library.json
+1
-1
library.properties
library.properties
+1
-1
No files found.
Processors/TFT_eSPI_ESP32.c
View file @
84a69457
...
...
@@ -29,6 +29,7 @@
// DMA SPA handle
spi_device_handle_t
dmaHAL
;
#ifdef CONFIG_IDF_TARGET_ESP32
#define DMA_CHANNEL 1
#ifdef USE_HSPI_PORT
spi_host_device_t
spi_host
=
HSPI_HOST
;
#else // use VSPI port
...
...
@@ -36,9 +37,11 @@
#endif
#else
#ifdef USE_HSPI_PORT
spi_host_device_t
spi_host
=
(
spi_host_device_t
)
1
;
// 1 scrambles display area!
#define DMA_CHANNEL 2
spi_host_device_t
spi_host
=
(
spi_host_device_t
)
DMA_CHANNEL
;
// Draws once then freezes
#else // use FSPI port
spi_host_device_t
spi_host
=
(
spi_host_device_t
)
1
;
// 1 draws once then freezes
#define DMA_CHANNEL 1
spi_host_device_t
spi_host
=
(
spi_host_device_t
)
DMA_CHANNEL
;
// Draws once then freezes
#endif
#endif
#endif
...
...
@@ -774,7 +777,7 @@ bool TFT_eSPI::initDMA(bool ctrl_cs)
.
pre_cb
=
0
,
//dc_callback, //Callback to handle D/C line
.
post_cb
=
0
};
ret
=
spi_bus_initialize
(
spi_host
,
&
buscfg
,
1
);
ret
=
spi_bus_initialize
(
spi_host
,
&
buscfg
,
DMA_CHANNEL
);
ESP_ERROR_CHECK
(
ret
);
ret
=
spi_bus_add_device
(
spi_host
,
&
devcfg
,
&
dmaHAL
);
ESP_ERROR_CHECK
(
ret
);
...
...
Processors/TFT_eSPI_ESP32.h
View file @
84a69457
...
...
@@ -12,6 +12,23 @@
#include "soc/spi_reg.h"
#include "driver/spi_master.h"
// Fix IDF problems with ESP32C3
#if CONFIG_IDF_TARGET_ESP32C3
// Fix ESP32C3 IDF bug for missing definition
#ifndef REG_SPI_BASE
#define REG_SPI_BASE(i) (DR_REG_SPI1_BASE + (((i)>1) ? (((i)* 0x1000) + 0x20000) : (((~(i)) & 1)* 0x1000 )))
#endif
// Fix ESP32C3 IDF bug for name change
#ifndef SPI_MOSI_DLEN_REG
#define SPI_MOSI_DLEN_REG(x) SPI_MS_DLEN_REG(x)
#endif
// Fix ESP32C3 specific register reference
#define out_w1tc out_w1tc.val
#define out_w1ts out_w1ts.val
#endif
// SUPPORT_TRANSACTIONS is mandatory for ESP32 so the hal mutex is toggled
#if !defined (SUPPORT_TRANSACTIONS)
#define SUPPORT_TRANSACTIONS
...
...
TFT_eSPI.h
View file @
84a69457
...
...
@@ -16,7 +16,7 @@
#ifndef _TFT_eSPIH_
#define _TFT_eSPIH_
#define TFT_ESPI_VERSION "2.3.8
3
"
#define TFT_ESPI_VERSION "2.3.8
4
"
// Bit level feature flags
// Bit 0 set: viewport capability
...
...
library.json
View file @
84a69457
{
"name"
:
"TFT_eSPI"
,
"version"
:
"2.3.8
3
"
,
"version"
:
"2.3.8
4
"
,
"keywords"
:
"Arduino, tft, ePaper, display, Pico, RP2040, STM32, ESP8266, NodeMCU, ESP32, M5Stack, ILI9341, ST7735, ILI9163, S6D02A1, ILI9481, ILI9486, ILI9488, ST7789, RM68140, SSD1351, SSD1963, ILI9225, HX8357D"
,
"description"
:
"A TFT and ePaper SPI graphics library with optimisation for Raspberry Pi Pico, ESP8266, ESP32 and STM32"
,
"repository"
:
...
...
library.properties
View file @
84a69457
name
=
TFT_eSPI
version
=
2.3.8
3
version
=
2.3.8
4
author
=
Bodmer
maintainer
=
Bodmer
sentence
=
TFT graphics library for Arduino processors with performance optimisation for RP2040, STM32, ESP8266 and ESP32
...
...
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