The difference is the drive strength.
The difference is in SPI.begin(), the old code says:
Code:
SPCR.enable_pins(); // pins managed by SPCRemulation in avr_emulation.h
The new code says:
Code:
reg = portConfigRegister(hardware().mosi_pin[mosi_pin_index]);
*reg = PORT_PCR_MUX(hardware().mosi_mux[mosi_pin_index]);
reg = portConfigRegister(hardware().miso_pin[miso_pin_index]);
*reg= PORT_PCR_MUX(hardware().miso_mux[miso_pin_index]);
reg = portConfigRegister(hardware().sck_pin[sck_pin_index]);
*reg = PORT_PCR_MUX(hardware().sck_mux[sck_pin_index]);
If I look in SPCR.enable_pin, it also sets PORT_PCR_DSE on the relevant pins, while it seems that the new code doesn't.
I tried using the new code, but calling SPCR.enable_pins() instead of doing the portConfigRegister stuff, and then everything works again.