Added proper SPI init function