Added SPI init function