File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed
Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ ARDUINO 1.5.3 BETA
2020
2121[libraries]
2222* sam: Added CAN library (still in early stage of development) (Palliser)
23+ * sam: Bugfix SPI library: begin() after end() now works (stimmer)
24+ * sam: Bugfix SPI library: incorrent pin configuration in non-extended mode.
2325
2426[firmwares]
2527* Arduino Due: fixed USB2Serial garbage at startup (https://github.com/arduino/Arduino/pull/1267)
Original file line number Diff line number Diff line change 1313SPIClass::SPIClass (Spi *_spi, uint32_t _id, void (*_initCb)(void )) :
1414 spi(_spi), id(_id), initCb(_initCb)
1515{
16- initCb ();
16+ // Empty
17+ }
1718
19+ void SPIClass::begin () {
20+ initCb ();
1821 SPI_Configure (spi, id, SPI_MR_MSTR | SPI_MR_PS | SPI_MR_MODFDIS);
1922 SPI_Enable (spi);
20- }
2123
22- void SPIClass::begin () {
2324 // NPCS control is left to the user
2425
2526 // Default speed set to 4Mhz
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ extern "C"{
8484#define BOARD_SPI_SS1 (4u)
8585#define BOARD_SPI_SS2 (52u)
8686#define BOARD_SPI_SS3 PIN_SPI_SS3
87- #define BOARD_SPI_DEFAULT_SS BOARD_SPI_SS2
87+ #define BOARD_SPI_DEFAULT_SS BOARD_SPI_SS3
8888
8989#define BOARD_PIN_TO_SPI_PIN (x ) \
9090 (x==BOARD_SPI_SS0 ? PIN_SPI_SS0 : \
You can’t perform that action at this time.
0 commit comments