ivory-bsp-stm32f4: refactor spi a bit