What's beneath the Arduino library?

SPDR and SPSR are registers (SPI Data and Status) in the Arduino processor. That processor is an AVR ATmegaXXX chip made by Atmel.

_BV is a macro to get a "bit value"

So that code loops until the SPIF (Interrupt Flag) bit in the SPSR (Status Register) is set indicating that the byte has been transmitted.

If you look at the ATmega328 or ATmega2560 data sheet you will find all these acronyms and register names.


Rob