Skip to content

Commit 5057bc7

Browse files
upgrade lates esp-idf
1 parent a55f128 commit 5057bc7

File tree

3 files changed

+549
-52
lines changed

3 files changed

+549
-52
lines changed

components/arduino-esp32/esp32-hal-spi.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -428,14 +428,14 @@ spi_t * spiStartBus(uint8_t spi_num, uint32_t clockDiv, uint8_t dataMode, uint8_
428428
#endif
429429

430430
if(spi_num == HSPI) {
431-
DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_SPI_CLK_EN);
432-
DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_SPI_RST);
431+
DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_SPI2_CLK_EN);
432+
DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_SPI2_RST);
433433
} else if(spi_num == VSPI) {
434-
DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_SPI_CLK_EN_2);
435-
DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_SPI_RST_2);
434+
DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_SPI3_CLK_EN);
435+
DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_SPI3_RST);
436436
} else {
437-
DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_SPI_CLK_EN_1);
438-
DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_SPI_RST_1);
437+
DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_SPI01_CLK_EN);
438+
DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_SPI01_RST);
439439
}
440440

441441
SPI_MUTEX_LOCK();

components/arduino-esp32/include/Arduino.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ typedef unsigned int word;
118118
void setup(void);
119119
void loop(void);
120120

121-
long random(long, long);
121+
long random(void);
122122
void randomSeed(unsigned long);
123123
long map(long, long, long, long, long);
124124

@@ -176,7 +176,7 @@ extern "C" void configTzTime(const char* tz,
176176
const char* server1, const char* server2 = nullptr, const char* server3 = nullptr);
177177

178178
// WMath prototypes
179-
long random(long);
179+
long random(void);
180180
#endif /* __cplusplus */
181181

182182
#define _min(a,b) ((a)<(b)?(a):(b))

0 commit comments

Comments
 (0)