Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-esp32
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
arduino-esp32
Commits
a0ef17a9
Unverified
Commit
a0ef17a9
authored
Jan 11, 2021
by
kabir-plod
Committed by
GitHub
Jan 11, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use non-deprecated DPORT values in SPI HAL (#4682)
parent
be77bd4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
cores/esp32/esp32-hal-spi.c
cores/esp32/esp32-hal-spi.c
+8
-8
No files found.
cores/esp32/esp32-hal-spi.c
View file @
a0ef17a9
...
...
@@ -402,9 +402,9 @@ void spiStopBus(spi_t * spi)
if
(
!
spi
)
{
return
;
}
removeApbChangeCallback
(
spi
,
_on_apb_change
);
SPI_MUTEX_LOCK
();
spiInitBus
(
spi
);
SPI_MUTEX_UNLOCK
();
...
...
@@ -428,14 +428,14 @@ spi_t * spiStartBus(uint8_t spi_num, uint32_t clockDiv, uint8_t dataMode, uint8_
#endif
if
(
spi_num
==
HSPI
)
{
DPORT_SET_PERI_REG_MASK
(
DPORT_PERIP_CLK_EN_REG
,
DPORT_SPI_CLK_EN
);
DPORT_CLEAR_PERI_REG_MASK
(
DPORT_PERIP_RST_EN_REG
,
DPORT_SPI_RST
);
DPORT_SET_PERI_REG_MASK
(
DPORT_PERIP_CLK_EN_REG
,
DPORT_SPI
2
_CLK_EN
);
DPORT_CLEAR_PERI_REG_MASK
(
DPORT_PERIP_RST_EN_REG
,
DPORT_SPI
2
_RST
);
}
else
if
(
spi_num
==
VSPI
)
{
DPORT_SET_PERI_REG_MASK
(
DPORT_PERIP_CLK_EN_REG
,
DPORT_SPI
_CLK_EN_2
);
DPORT_CLEAR_PERI_REG_MASK
(
DPORT_PERIP_RST_EN_REG
,
DPORT_SPI
_RST_2
);
DPORT_SET_PERI_REG_MASK
(
DPORT_PERIP_CLK_EN_REG
,
DPORT_SPI
3_CLK_EN
);
DPORT_CLEAR_PERI_REG_MASK
(
DPORT_PERIP_RST_EN_REG
,
DPORT_SPI
3_RST
);
}
else
{
DPORT_SET_PERI_REG_MASK
(
DPORT_PERIP_CLK_EN_REG
,
DPORT_SPI
_CLK_EN_1
);
DPORT_CLEAR_PERI_REG_MASK
(
DPORT_PERIP_RST_EN_REG
,
DPORT_SPI
_RST_1
);
DPORT_SET_PERI_REG_MASK
(
DPORT_PERIP_CLK_EN_REG
,
DPORT_SPI
01_CLK_EN
);
DPORT_CLEAR_PERI_REG_MASK
(
DPORT_PERIP_RST_EN_REG
,
DPORT_SPI
01_RST
);
}
SPI_MUTEX_LOCK
();
...
...
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