change the location of the spi functions. still have some more porting.