mirror of https://github.com/arendst/Tasmota.git
Fix spi c2 c6 bus numbers and SPI Reg Base defines (#19988)
* C2 and C6 have same SPI bus as C3 * Update esp32x_fixes.h * Release Platforms
This commit is contained in:
parent
73f219e2bb
commit
0ee62e597b
|
@ -58,38 +58,15 @@
|
|||
#define FSPI_HOST SPI2_HOST
|
||||
#define HSPI_HOST SPI3_HOST
|
||||
#define VSPI_HOST SPI3_HOST
|
||||
#ifndef REG_SPI_BASE
|
||||
#define REG_SPI_BASE(i) (DR_REG_SPI1_BASE + (((i)>1) ? (((i)* 0x1000) + 0x20000) : (((~(i)) & 1)* 0x1000 )))
|
||||
// SPI_MOSI_DLEN_REG is not defined anymore in esp32s3, instead use SPI_MS_DLEN_REG
|
||||
// SPI_MOSI_DLEN_REG is not defined anymore in esp32s3
|
||||
#define SPI_MOSI_DLEN_REG(x) SPI_MS_DLEN_REG(x)
|
||||
#endif // REG_SPI_BASE
|
||||
|
||||
#elif CONFIG_IDF_TARGET_ESP32C3
|
||||
#elif CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C6
|
||||
#define SPI_HOST SPI1_HOST
|
||||
#define HSPI_HOST SPI2_HOST
|
||||
#define VSPI_HOST SPI2_HOST /* No SPI3_host on C3 */
|
||||
#if ESP_IDF_VERSION_MAJOR < 5
|
||||
// fix a bug in esp-idf 4.4 for esp32c3
|
||||
#ifndef REG_SPI_BASE
|
||||
#define REG_SPI_BASE(i) (DR_REG_SPI1_BASE + (((i)>1) ? (((i)* 0x1000) + 0x20000) : (((~(i)) & 1)* 0x1000 )))
|
||||
// SPI_MOSI_DLEN_REG is not defined anymore in esp32c3, instead use SPI_MS_DLEN_REG
|
||||
#define SPI_MOSI_DLEN_REG(x) SPI_MS_DLEN_REG(x)
|
||||
#endif // REG_SPI_BASE
|
||||
#endif //ESP_IDF_VERSION_MAJOR < 5
|
||||
|
||||
#elif CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C6
|
||||
#define SPI_HOST SPI1_HOST
|
||||
#define HSPI_HOST SPI1_HOST /* No SPI2_host on C2/C6 */
|
||||
#define VSPI_HOST SPI1_HOST /* No SPI3_host on C2/C6 */
|
||||
#define VSPI_HOST SPI2_HOST /* No SPI3_host on C2/C6 */
|
||||
#define VSPI SPI
|
||||
// #if ESP_IDF_VERSION_MAJOR < 5
|
||||
// // fix a bug in esp-idf 4.4 for esp32c3
|
||||
// #ifndef REG_SPI_BASE
|
||||
// #define REG_SPI_BASE(i) (DR_REG_SPI1_BASE + (((i)>1) ? (((i)* 0x1000) + 0x20000) : (((~(i)) & 1)* 0x1000 )))
|
||||
// // SPI_MOSI_DLEN_REG is not defined anymore in esp32c3, instead use SPI_MS_DLEN_REG
|
||||
// SPI_MOSI_DLEN_REG is not defined anymore
|
||||
#define SPI_MOSI_DLEN_REG(x) SPI_MS_DLEN_REG(x)
|
||||
// #endif // REG_SPI_BASE
|
||||
// #endif //ESP_IDF_VERSION_MAJOR < 5
|
||||
|
||||
|
||||
#endif // TARGET
|
||||
|
|
|
@ -94,13 +94,13 @@ lib_ignore =
|
|||
|
||||
|
||||
[core32]
|
||||
platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.10.06/platform-espressif32.zip
|
||||
platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.11.00/platform-espressif32.zip
|
||||
platform_packages =
|
||||
build_unflags = ${esp32_defaults.build_unflags}
|
||||
build_flags = ${esp32_defaults.build_flags}
|
||||
|
||||
[core32_30]
|
||||
platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.10.12/platform-espressif32.zip
|
||||
platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.11.10/platform-espressif32.zip
|
||||
platform_packages =
|
||||
build_unflags = ${core32.build_unflags}
|
||||
build_flags = ${core32.build_flags}
|
||||
|
|
Loading…
Reference in New Issue