Skip to content

Commit

Permalink
[driver] max31865 spi mode 3 fixed in #994
Browse files Browse the repository at this point in the history
  • Loading branch information
hshose committed Apr 9, 2023
1 parent 8e0a8dd commit 48f8bde
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/modm/driver/temperature/max31865_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,7 @@ namespace modm
template<typename SpiMaster, typename Cs, Pt pt>
Max31865<SpiMaster, Cs, pt>::Max31865(max31865<pt>::Data &data) : data(data)
{
this->attachConfigurationHandler([]() {
static_assert(std::is_same_v<SpiMaster, modm::platform::SpiMaster2>);
SPI2->CR1 &= ~SPI_CR1_SPE;
__DSB();
SpiMaster::setDataMode(SpiMaster::DataMode::Mode3);
SPI2->CR1 |= SPI_CR1_SPE;
__DSB();
});
this->attachConfigurationHandler([]() { SpiMaster::setDataMode(SpiMaster::DataMode::Mode3); });
Cs::setOutput(modm::Gpio::High);
}

Expand Down

0 comments on commit 48f8bde

Please sign in to comment.