1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-03 11:52:20 +01:00

Fix RP2040 SPISettings (#3960)

This commit is contained in:
Jesse Hills
2022-10-28 12:33:15 +13:00
committed by GitHub
parent 0e30c49e3f
commit bf4d3df906

View File

@@ -225,7 +225,11 @@ class SPIComponent : public Component {
} else if (CLOCK_POLARITY && CLOCK_PHASE) {
data_mode = SPI_MODE3;
}
#ifdef USE_RP2040
SPISettings settings(DATA_RATE, static_cast<BitOrder>(BIT_ORDER), data_mode);
#else
SPISettings settings(DATA_RATE, BIT_ORDER, data_mode);
#endif
this->hw_spi_->beginTransaction(settings);
} else {
#endif // USE_SPI_ARDUINO_BACKEND