Skip to content

Commit 32fce57

Browse files
committed
Fix SPI pin assignment and Settings not applied
Should we use a TXbuffer anyway to enqueue transfers?
1 parent 2b4eae8 commit 32fce57

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

libraries/SPI/SPI.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void arduino::MbedSPI::detachInterrupt() {
4848
}
4949

5050
void arduino::MbedSPI::begin() {
51-
dev = new mbed::SPI((PinName)_miso, (PinName)_mosi, (PinName)_sck);
51+
dev = new mbed::SPI((PinName)_mosi, (PinName)_miso, (PinName)_sck);
5252
}
5353

5454
void arduino::MbedSPI::end() {

libraries/SPI/SPI.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class MbedSPI : public SPIClass
2525
virtual void end();
2626

2727
private:
28-
SPISettings settings;
28+
SPISettings settings = SPISettings(0, MSBFIRST, SPI_MODE0);
2929
mbed::SPI* dev;
3030
int _miso;
3131
int _mosi;

0 commit comments

Comments
 (0)