mirror of
https://github.com/esphome/esphome.git
synced 2025-10-03 18:42:23 +01:00
This commit is contained in:
@@ -276,9 +276,6 @@ def get_spi_interface(index):
|
|||||||
return ["&SPI", "&SPI1"][index]
|
return ["&SPI", "&SPI1"][index]
|
||||||
if index == 0:
|
if index == 0:
|
||||||
return "&SPI"
|
return "&SPI"
|
||||||
# Following code can't apply to C2, H2 or 8266 since they have only one SPI
|
|
||||||
if get_target_variant() in (VARIANT_ESP32S3, VARIANT_ESP32S2):
|
|
||||||
return "new SPIClass(FSPI)"
|
|
||||||
return "new SPIClass(HSPI)"
|
return "new SPIClass(HSPI)"
|
||||||
|
|
||||||
|
|
||||||
|
13
tests/components/spi/test.esp32-s3-ard.yaml
Normal file
13
tests/components/spi/test.esp32-s3-ard.yaml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
spi:
|
||||||
|
- id: three_spi
|
||||||
|
interface: spi3
|
||||||
|
clk_pin:
|
||||||
|
number: 47
|
||||||
|
mosi_pin:
|
||||||
|
number: 40
|
||||||
|
- id: hw_spi
|
||||||
|
interface: hardware
|
||||||
|
clk_pin:
|
||||||
|
number: 0
|
||||||
|
miso_pin:
|
||||||
|
number: 41
|
Reference in New Issue
Block a user