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
|
|
@ -59,13 +59,13 @@ void setup()
|
|||
|
||||
display.init();
|
||||
|
||||
// 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, SPI_MOSI, SPI_MISO, SPI_SCK)) {
|
||||
// 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);
|
||||
|
|
|
|||
|
|
@ -47,13 +47,13 @@ void setup()
|
|||
|
||||
initBoard();
|
||||
|
||||
// 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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -46,13 +46,13 @@ void setup()
|
|||
|
||||
initBoard();
|
||||
|
||||
// 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);
|
||||
|
|
|
|||
|
|
@ -77,13 +77,13 @@ void setup()
|
|||
while (!Serial);
|
||||
|
||||
|
||||
// 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);
|
||||
|
|
|
|||
|
|
@ -49,13 +49,14 @@ void setup()
|
|||
while (!Serial);
|
||||
|
||||
initBoard();
|
||||
// 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);
|
||||
|
|
|
|||
|
|
@ -43,13 +43,13 @@ void setup()
|
|||
|
||||
initBoard();
|
||||
|
||||
// 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);
|
||||
|
|
|
|||
|
|
@ -47,13 +47,13 @@ void setup()
|
|||
initBoard();
|
||||
|
||||
|
||||
// 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);
|
||||
|
|
|
|||
|
|
@ -55,13 +55,13 @@ void setup()
|
|||
|
||||
initBoard();
|
||||
|
||||
// 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