spi: draft workings of the spi protocol and unit test