Skip to content

Commit 9fad83c

Browse files
committed
RPI: expect SPI, I2C begin in sketch
1 parent 63f927d commit 9fad83c

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

ArduinoCore-Linux/cores/rasperry_pi/HardwareSetupRPI.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ class HardwareSetupRPI : public I2CSource, public SPISource, public GPIOSource {
3131
Logger.info("Using Raspberry Pi hardware interfaces");
3232
is_default_objects_active = asDefault;
3333
gpio.begin();
34-
i2c.begin();
35-
spi.begin();
3634

3735
// define the global hardware interfaces
3836
if (asDefault) {

examples/spi/spi.ino

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
#include "Arduino.h"
33
#include "SPI.h"
44

5-
SPISettings settings(1000000, MSBFIRST, SPI_MODE0); // 1 MHz, MSB first, Mode 0
6-
const int csPin = 8;
5+
SPISettings settings(10000, MSBFIRST, SPI_MODE0); // 1 MHz, MSB first, Mode 0
6+
const int csPin = 13;
77

88
void setup() {
99
Serial.begin(115200); // Start serial communication at 115200 baud
1010

11+
SPI.begin();
1112
pinMode(csPin, OUTPUT);
1213
digitalWrite(csPin, HIGH);
1314
}

0 commit comments

Comments
 (0)