Skip to content

Commit 2ebd47a

Browse files
committed
[sam] fixed SPI initialization
Fixes #1561
1 parent ed41a67 commit 2ebd47a

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

build/shared/revisions.txt

+5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11

2+
ARDUINO 1.5.4 BETA
3+
4+
[libraries]
5+
* sam: fixed wrong SPI initialization (noblepepper)
6+
27
ARDUINO 1.5.3 BETA 2013.08.30
38

49
[ide]

libraries/SPI/arch/sam/SPI.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ void SPIClass::begin() {
3030
}
3131

3232
void SPIClass::begin(uint8_t _pin) {
33+
initCb();
34+
SPI_Configure(spi, id, SPI_MR_MSTR | SPI_MR_PS | SPI_MR_MODFDIS);
35+
SPI_Enable(spi);
36+
3337
uint32_t spiPin = BOARD_PIN_TO_SPI_PIN(_pin);
3438
PIO_Configure(
3539
g_APinDescription[spiPin].pPort,

0 commit comments

Comments
 (0)