Skip to content

Commit e80e222

Browse files
committed
fix farmduino 14 compile
1 parent 92f0e7d commit e80e222

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

src/farmbot_arduino_controller.cpp

+9-13
Original file line numberDiff line numberDiff line change
@@ -496,24 +496,20 @@ void setPinInputOutput()
496496
Serial.print(SPACE);
497497
Serial.print("Set input/output");
498498
Serial.print(CRLF);
499-
}
500-
#endif
501499

502500
#if defined(FARMDUINO_V14)
503-
void setPinInputOutput()
504-
{
505-
506-
reportingPeriod = 500;
507501

508-
pinMode(READ_ENA_PIN, INPUT_PULLUP);
509-
pinMode(NSS_PIN, OUTPUT);
510-
digitalWrite(NSS_PIN, HIGH);
502+
reportingPeriod = 500;
511503

512-
SPI.setBitOrder(MSBFIRST);
513-
SPI.setDataMode(SPI_MODE0);
514-
SPI.setClockDivider(SPI_CLOCK_DIV4);
515-
SPI.begin();
504+
pinMode(READ_ENA_PIN, INPUT_PULLUP);
505+
pinMode(NSS_PIN, OUTPUT);
506+
digitalWrite(NSS_PIN, HIGH);
516507

508+
SPI.setBitOrder(MSBFIRST);
509+
SPI.setDataMode(SPI_MODE0);
510+
SPI.setClockDivider(SPI_CLOCK_DIV4);
511+
SPI.begin();
512+
#endif
517513
}
518514
#endif
519515

0 commit comments

Comments
 (0)