port for ece459
Fork of BurstSPI by
Revision 14:ea2354b66389, committed 2016-12-08
- Comitter:
- bdk9
- Date:
- Thu Dec 08 20:00:29 2016 +0000
- Parent:
- 13:bc069279eb37
- Commit message:
- port to f401re
Changed in this revision
BurstSPI_STM32F4.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r bc069279eb37 -r ea2354b66389 BurstSPI_STM32F4.cpp --- a/BurstSPI_STM32F4.cpp Sat May 16 11:09:59 2015 +0000 +++ b/BurstSPI_STM32F4.cpp Thu Dec 08 20:00:29 2016 +0000 @@ -3,7 +3,7 @@ void BurstSPI::fastWrite(int data) { - SPI_TypeDef *spi = (SPI_TypeDef *)(_spi.spi); + SPI_TypeDef *spi = (SPI_TypeDef *)(&_spi.spi); // Check if data is transmitted while ((spi->SR & SPI_SR_TXE) == 0); spi->DR = data; @@ -11,7 +11,7 @@ void BurstSPI::clearRX( void ) { //Check if the RX buffer is busy - SPI_TypeDef *spi = (SPI_TypeDef *)(_spi.spi); + SPI_TypeDef *spi = (SPI_TypeDef *)(&_spi.spi); //While busy, keep checking while (spi->SR & SPI_SR_BSY){ // Check RX buffer readable