Added some function spi.