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
5ff03cd2
Commit
5ff03cd2
authored
Mar 29, 2020
by
Bodmer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support STM32F1xx
STM32F1xx processors do not have MODER direction configuration.
parent
1bd0b96c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
Processors/TFT_eSPI_STM32.c
Processors/TFT_eSPI_STM32.c
+14
-6
No files found.
Processors/TFT_eSPI_STM32.c
View file @
5ff03cd2
...
...
@@ -129,13 +129,21 @@ void TFT_eSPI::pushPixels(const void* data_in, uint32_t len){
void
TFT_eSPI
::
busDir
(
uint32_t
mask
,
uint8_t
mode
)
{
#ifdef STM_PORTA_DATA_BUS
if
(
mode
==
OUTPUT
)
GPIOA
->
MODER
=
(
GPIOA
->
MODER
&
0xFFFF0000
)
|
0x00005555
;
else
GPIOA
->
MODER
&=
0xFFFF0000
;
#if defined (STM32F1xx)
if
(
mode
==
OUTPUT
)
GPIOA
->
CRL
=
0x33333333
;
else
GPIOA
->
CRL
=
0x88888888
;
#else
if
(
mode
==
OUTPUT
)
GPIOA
->
MODER
=
(
GPIOA
->
MODER
&
0xFFFF0000
)
|
0x00005555
;
else
GPIOA
->
MODER
&=
0xFFFF0000
;
#endif
#elif STM_PORTB_DATA_BUS
if
(
mode
==
OUTPUT
)
GPIOB
->
MODER
=
(
GPIOB
->
MODER
&
0xFFFF0000
)
|
0x00005555
;
else
GPIOB
->
MODER
&=
0xFFFF0000
;
#if defined (STM32F1xx)
if
(
mode
==
OUTPUT
)
GPIOB
->
CRL
=
0x33333333
;
else
GPIOB
->
CRL
=
0x88888888
;
#else
if
(
mode
==
OUTPUT
)
GPIOB
->
MODER
=
(
GPIOB
->
MODER
&
0xFFFF0000
)
|
0x00005555
;
else
GPIOB
->
MODER
&=
0xFFFF0000
;
#endif
#else
if
(
mode
==
OUTPUT
)
{
LL_GPIO_SetPinMode
(
D0_PIN_PORT
,
D0_PIN_MASK
,
LL_GPIO_MODE_OUTPUT
);
...
...
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