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
919febef
Commit
919febef
authored
Mar 27, 2020
by
Bodmer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #581
parent
f71df4ff
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
221 additions
and
145 deletions
+221
-145
Processors/TFT_eSPI_STM32.c
Processors/TFT_eSPI_STM32.c
+18
-0
Processors/TFT_eSPI_STM32.h
Processors/TFT_eSPI_STM32.h
+203
-145
No files found.
Processors/TFT_eSPI_STM32.c
View file @
919febef
...
...
@@ -130,6 +130,23 @@ void TFT_eSPI::busDir(uint32_t mask, uint8_t mode)
{
// Use pinMode() for each pin at least one first to enable clocks etc
#ifdef STM_PORTA_DATA_BUS
if
(
mode
==
OUTPUT
)
{
LL_GPIO_SetPinMode
(
GPIOA
,
0xFF
,
LL_GPIO_MODE_OUTPUT
);
}
else
{
LL_GPIO_SetPinMode
(
GPIOA
,
0xFF
,
LL_GPIO_MODE_INPUT
);
}
#elif STM_PORTB_DATA_BUS
if
(
mode
==
OUTPUT
)
{
LL_GPIO_SetPinMode
(
GPIOB
,
0xFF
,
LL_GPIO_MODE_OUTPUT
);
}
else
{
LL_GPIO_SetPinMode
(
GPIOB
,
0xFF
,
LL_GPIO_MODE_INPUT
);
}
#else
// Now we can use a minimal set of register changes
if
(
mode
==
OUTPUT
)
{
LL_GPIO_SetPinMode
(
D0_PIN_PORT
,
D0_PIN_MASK
,
LL_GPIO_MODE_OUTPUT
);
...
...
@@ -151,6 +168,7 @@ void TFT_eSPI::busDir(uint32_t mask, uint8_t mode)
LL_GPIO_SetPinMode
(
D6_PIN_PORT
,
D6_PIN_MASK
,
LL_GPIO_MODE_INPUT
);
LL_GPIO_SetPinMode
(
D7_PIN_PORT
,
D7_PIN_MASK
,
LL_GPIO_MODE_INPUT
);
}
#endif
}
...
...
Processors/TFT_eSPI_STM32.h
View file @
919febef
This diff is collapsed.
Click to expand it.
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