spi: added api functionality