1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-27 15:42:22 +01:00

Support for ESP32-C2 & ESP32-C6 (#4377)

Co-authored-by: Stijn Tintel <stijn@linux-ipv6.be>
This commit is contained in:
Austin
2023-08-20 17:42:03 -04:00
committed by GitHub
parent d19bf5d6ee
commit fe7893d1b3
12 changed files with 146 additions and 11 deletions

View File

@@ -76,7 +76,8 @@ void SPIComponent::setup() {
if (spi_bus_num == 0) {
this->hw_spi_ = &SPI;
} else {
#if defined(USE_ESP32_VARIANT_ESP32C3) || defined(USE_ESP32_VARIANT_ESP32S2) || defined(USE_ESP32_VARIANT_ESP32S3)
#if defined(USE_ESP32_VARIANT_ESP32C3) || defined(USE_ESP32_VARIANT_ESP32S2) || defined(USE_ESP32_VARIANT_ESP32S3) || \
defined(USE_ESP32_VARIANT_ESP32C2) || defined(USE_ESP32_VARIANT_ESP32C6)
this->hw_spi_ = new SPIClass(FSPI); // NOLINT(cppcoreguidelines-owning-memory)
#else
this->hw_spi_ = new SPIClass(HSPI); // NOLINT(cppcoreguidelines-owning-memory)