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
df23e146
Commit
df23e146
authored
Nov 19, 2020
by
Bodmer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make DMA wait handling consistent for ESP32 and STM32
parent
bf5bf185
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
Processors/TFT_eSPI_ESP32.c
Processors/TFT_eSPI_ESP32.c
+6
-2
Processors/TFT_eSPI_STM32.c
Processors/TFT_eSPI_STM32.c
+5
-4
No files found.
Processors/TFT_eSPI_ESP32.c
View file @
df23e146
...
...
@@ -538,13 +538,14 @@ void TFT_eSPI::dmaWait(void)
/***************************************************************************************
** Function name: push
Image
DMA
** Function name: push
Pixels
DMA
** Description: Push pixels to TFT (len must be less than 32767)
***************************************************************************************/
// This will byte swap the original image if setSwapBytes(true) was called by sketch.
void
TFT_eSPI
::
pushPixelsDMA
(
uint16_t
*
image
,
uint32_t
len
)
{
if
((
len
==
0
)
||
(
!
DMA_Enabled
))
return
;
dmaWait
();
if
(
_swapBytes
)
{
...
...
@@ -592,7 +593,10 @@ void TFT_eSPI::pushImageDMA(int32_t x, int32_t y, int32_t w, int32_t h, uint16_t
uint32_t
len
=
dw
*
dh
;
if
(
buffer
==
nullptr
)
{
buffer
=
image
;
dmaWait
();
}
if
(
buffer
==
nullptr
)
{
buffer
=
image
;
dmaWait
();
}
// If image is clipped, copy pixels into a contiguous block
if
(
(
dw
!=
w
)
||
(
dh
!=
h
)
)
{
...
...
Processors/TFT_eSPI_STM32.c
View file @
df23e146
...
...
@@ -421,7 +421,7 @@ void TFT_eSPI::dmaWait(void)
/***************************************************************************************
** Function name: push
Image
DMA
** Function name: push
Pixels
DMA
** Description: Push pixels to TFT (len must be less than 32767)
***************************************************************************************/
// This will byte swap the original image if setSwapBytes(true) was called by sketch.
...
...
@@ -462,11 +462,12 @@ void TFT_eSPI::pushImageDMA(int32_t x, int32_t y, int32_t w, int32_t h, uint16_t
if
(
dw
<
1
||
dh
<
1
)
return
;
if
(
buffer
==
nullptr
)
buffer
=
image
;
uint32_t
len
=
dw
*
dh
;
while
(
spiHal
.
State
==
HAL_SPI_STATE_BUSY_TX
);
// Check if SPI Tx is busy
if
(
buffer
==
nullptr
)
{
buffer
=
image
;
while
(
spiHal
.
State
==
HAL_SPI_STATE_BUSY_TX
);
// Check if SPI Tx is busy
}
// If image is clipped, copy pixels into a contiguous block
if
(
(
dw
!=
w
)
||
(
dh
!=
h
)
)
{
...
...
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