Skip to content

Commit

Permalink
Bugfix: Ensure that the initial values of member variable 'settings' …
Browse files Browse the repository at this point in the history
…is different from the ones provided via global constant 'DEFAULT_SPI_SETTINGS' because otherwise SPI won't be configured within the 'config' method called within 'begin'
  • Loading branch information
aentinger authored and giulcioffi committed Nov 25, 2020
1 parent 458c192 commit 0fa5cae
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libraries/SPI/SPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ static inline SercomSpiClockMode getDataMode(SPISettings& settings) {
}

SPIClass::SPIClass(SERCOM *p_sercom, uint8_t uc_pinMISO, uint8_t uc_pinSCK, uint8_t uc_pinMOSI, SercomSpiTXPad PadTx, SercomRXPad PadRx)
: settings(0, MSBFIRST, SPI_MODE0)
{
initialized = false;
assert(p_sercom != NULL);
Expand Down

0 comments on commit 0fa5cae

Please sign in to comment.