@@ -27,19 +27,13 @@ extern "C" {
27
27
#include <stdbool.h>
28
28
29
29
#define SPI_HAS_TRANSACTION
30
-
31
- #ifdef CONFIG_IDF_TARGET_ESP32S2
32
- #define FSPI 1 //SPI 1 bus. ESP32S2: for external memory only (can use the same data lines but different SS)
33
- #define HSPI 2 //SPI 2 bus. ESP32S2: external memory or device - it can be matrixed to any pins
34
- #define SPI2 2 // Another name for ESP32S2 SPI 2
35
- #define SPI3 3 //SPI 3 bus. ESP32S2: device only - it can be matrixed to any pins
36
- #elif CONFIG_IDF_TARGET_ESP32
30
+ #ifdef CONFIG_IDF_TARGET_ESP32
37
31
#define FSPI 1 //SPI 1 bus attached to the flash (can use the same data lines but different SS)
38
32
#define HSPI 2 //SPI 2 bus normally mapped to pins 12 - 15, but can be matrixed to any pins
39
33
#define VSPI 3 //SPI 3 bus normally attached to pins 5, 18, 19 and 23, but can be matrixed to any pins
40
34
#else
41
- #define FSPI 0
42
- #define HSPI 1
35
+ #define FSPI 0 // ESP32C2, C3, C6, H2, S2, S3, P4 - SPI 2 bus
36
+ #define HSPI 1 // ESP32S2, S3, P4 - SPI 3 bus
43
37
#endif
44
38
45
39
// This defines are not representing the real Divider of the ESP32
@@ -97,6 +91,8 @@ void spiSSSet(spi_t *spi);
97
91
void spiSSClear (spi_t * spi );
98
92
99
93
void spiWaitReady (spi_t * spi );
94
+ //invert hardware SS
95
+ void spiSSInvert (spi_t * spi , bool invert );
100
96
101
97
uint32_t spiGetClockDiv (spi_t * spi );
102
98
uint8_t spiGetDataMode (spi_t * spi );
0 commit comments