wip: added SPI I/O functions