Skip to content

Commit

Permalink
fix(spi): ensure spi_t structure properly init
Browse files Browse the repository at this point in the history
Fixes #2543

Signed-off-by: Frederic Pillon <[email protected]>
  • Loading branch information
fpistm committed Nov 4, 2024
1 parent e4c8e24 commit 7be17bb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libraries/SPI/src/SPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ SPIClass SPI;
*/
SPIClass::SPIClass(uint32_t mosi, uint32_t miso, uint32_t sclk, uint32_t ssel)
{
memset((void *)&_spi, 0, sizeof(_spi));
_spi.pin_miso = digitalPinToPinName(miso);
_spi.pin_mosi = digitalPinToPinName(mosi);
_spi.pin_sclk = digitalPinToPinName(sclk);
Expand Down

0 comments on commit 7be17bb

Please sign in to comment.