Use names instead of magic values.
Was reading a value from x, shifting it, but then not writing it back. This caused an infinite loop as it would never move on from the MSB.
Implements the bit bang spi protocol