[AVR] SPI atomicity fix avr (part 1/2 of #2376), second try

Follow up #2381.

/cc @PaulStoffregen @matthijskooijman @xxxajk