Skip to content

Commit 8d95899

Browse files
Peter Van HoyweghenPeter Van Hoyweghen
authored andcommitted
Call SPI.beginTransaction() after SPI.begin()
1 parent 89184a3 commit 8d95899

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ static BitBangedSPI SPI;
176176
void setup() {
177177
SERIAL.begin(19200);
178178

179-
SPI.beginTransaction(SPISettings(SPI_CLOCK, MSBFIRST, SPI_MODE0));
180179

181180
pinMode(LED_PMODE, OUTPUT);
182181
pulse(LED_PMODE, 2);
@@ -360,6 +359,7 @@ void set_parameters() {
360359

361360
void start_pmode() {
362361
SPI.begin();
362+
SPI.beginTransaction(SPISettings(SPI_CLOCK, MSBFIRST, SPI_MODE0));
363363
// SPI.begin() has configured SS as output,
364364
// so SPI master mode is selected.
365365
// We have defined RESET as pin 10,

0 commit comments

Comments
 (0)