Skip to content

Commit

Permalink
solve #894
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 committed Feb 11, 2023
1 parent b5a905b commit 0731e1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utility/pigpio/spi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ void SPI::begin(int busNo, uint32_t spi_speed)
}
spiIsInitialized = true;
gpioInitialise();
spiHandle = spiOpen(busNo, spi_speed, 0);
spiHandle = spiOpen((unsigned int)(busNo & 2), spi_speed, (unsigned int)((busNo / 10) << 7));
}

void SPI::init(uint32_t speed)
Expand Down

0 comments on commit 0731e1b

Please sign in to comment.