Porting SPI module to FreeRTOS primitives.