Rework spi lib totally