Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "fix spi timing issues" #3838

Merged
merged 1 commit into from Sep 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions esphome/components/spi/spi.h
Expand Up @@ -195,11 +195,6 @@ class SPIComponent : public Component {

template<SPIBitOrder BIT_ORDER, SPIClockPolarity CLOCK_POLARITY, SPIClockPhase CLOCK_PHASE, uint32_t DATA_RATE>
void enable(GPIOPin *cs) {
if (cs != nullptr) {
this->active_cs_ = cs;
this->active_cs_->digital_write(false);
}

#ifdef USE_SPI_ARDUINO_BACKEND
if (this->hw_spi_ != nullptr) {
uint8_t data_mode = SPI_MODE0;
Expand All @@ -220,6 +215,11 @@ class SPIComponent : public Component {
#ifdef USE_SPI_ARDUINO_BACKEND
}
#endif // USE_SPI_ARDUINO_BACKEND

if (cs != nullptr) {
this->active_cs_ = cs;
this->active_cs_->digital_write(false);
}
}

void disable();
Expand Down