Fix SPI handler error https://github.com/Xinyuan-LilyGO/LilyGo-LoRa-Series/issues/112
This commit is contained in:
parent
fb07bc0d3c
commit
491316ee88
9 changed files with 37 additions and 36 deletions
|
|
@ -62,13 +62,13 @@ void setup()
|
|||
display.flipScreenVertically();
|
||||
|
||||
|
||||
// Initialize SPI bus, SDCard shares SPI bus with QMI8658
|
||||
SPI.begin(SPI_SCK, SPI_MISO, SPI_MOSI);
|
||||
|
||||
pinMode(SPI_CS, OUTPUT); //sdcard pin set high
|
||||
digitalWrite(SPI_CS, HIGH);
|
||||
|
||||
if (!qmi.begin(IMU_CS)) {
|
||||
// SDCard shares SPI bus with QMI8658
|
||||
// SPI has been initialized in initBoard.
|
||||
// Only need to pass SPIhandler to the QMI class.
|
||||
if (!qmi.begin(IMU_CS, -1, -1, -1, SDSPI)) {
|
||||
Serial.println("Failed to find QMI8658 - check your wiring!");
|
||||
while (1) {
|
||||
delay(1000);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue