Hm, I figured out that I could test for it by checking the flag to see if it ends up being cleared or not, but I can't seem to get it to clear at all:
do {
SPDR = *--thisLED; WAIT;
} while (thisLED != lastLED); // thisLED is decremented one last time before we hit the end of the loop, so after byte 0 transfers, the loop exits.
WAIT NOP NOP NOP NOP // Wait for last byte to finish transfer.
SPSR = SPSR & ~_BV(SPIF); // Clear transfer flag.
// Move data from shift register into latch register:
LATPORT &= ~(1 << LATPIN); // Set LATCH pin low. It is important to do this first, just before transitioning high! I don't know why, but the LED modules won't work right otherwise!
LATPORT |= (1 << LATPIN); // Set LATCH pin high. Transitioning from low to high moves all data from the shift register into the latch registers.
ENAPORT |= (1 << ENAPIN); // Set BLANK pin high. Turn all outputs off, and reset grayscale timer. Blanking reduces flicker, but it does not seem to matter if it is before, after, or in the middle of latching.
ENAPORT &= ~(1 << ENAPIN); // Set BLANK pin low. Turn all outputs on.
n = SPSR & _BV(SPIF);
sei(); // Reenable interrupts.
//time = micros() - time;
//Serial1.println(time,DEC);
Serial1.println(n,DEC);
Returns 128 every time.