Initial Stm32f4 spi driver

we have gnu99, put the declaration in the loop everywhere