Diff of /init.c [4c10c0] .. [46adf7]  Maximize  Restore

Switch to side-by-side view

--- a/init.c
+++ b/init.c
@@ -31,6 +31,8 @@
 
 void InitSPI(SPI_BaudRatePrescaler_TypeDef prescaler)
 {
+  
+        while(SPI->SR & SPI_FLAG_BSY);
 	SPI->CR1 = SPI_FIRSTBIT_MSB|(u8)prescaler|SPI_MODE_MASTER|SPI_CLOCKPOLARITY_LOW|SPI_CLOCKPHASE_1EDGE;
 	SPI->CR2 = 0x03; //SSM and SSI
 	SPI->CR1 |= 0x40; //Enable SPI;

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks