mirror of
https://github.com/esphome/esphome.git
synced 2025-02-28 07:48:15 +00:00
Fix RP2040 SPISettings (#3960)
This commit is contained in:
parent
0e30c49e3f
commit
bf4d3df906
@ -225,7 +225,11 @@ class SPIComponent : public Component {
|
|||||||
} else if (CLOCK_POLARITY && CLOCK_PHASE) {
|
} else if (CLOCK_POLARITY && CLOCK_PHASE) {
|
||||||
data_mode = SPI_MODE3;
|
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);
|
SPISettings settings(DATA_RATE, BIT_ORDER, data_mode);
|
||||||
|
#endif
|
||||||
this->hw_spi_->beginTransaction(settings);
|
this->hw_spi_->beginTransaction(settings);
|
||||||
} else {
|
} else {
|
||||||
#endif // USE_SPI_ARDUINO_BACKEND
|
#endif // USE_SPI_ARDUINO_BACKEND
|
||||||
|
Loading…
x
Reference in New Issue
Block a user