Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of BurstSPI by
Revision 14:c99022511536, committed 2015-04-03
- Comitter:
- Backstrom
- Date:
- Fri Apr 03 06:14:57 2015 +0000
- Parent:
- 13:36ac5fd058dd
- Commit message:
- As we set receive ignore flag we don't need any code in clearRX.
Changed in this revision
| BurstSPI_LPC_1549.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/BurstSPI_LPC_1549.cpp Fri Apr 03 06:02:58 2015 +0000
+++ b/BurstSPI_LPC_1549.cpp Fri Apr 03 06:14:57 2015 +0000
@@ -5,17 +5,12 @@
while (!(_spi.spi->STAT & (1 << 1)));
_spi.spi->TXDAT = (data & 0xffff);
- // end of transfer
+ // end of transfer and receive ignore flag
_spi.spi->TXCTL |= ((1 << 20) | (1 << 22));
}
void BurstSPI::clearRX( void ) {
- //Do it while either data in RX buffer, or while it is busy
- while((_spi.spi->STAT & ((1 << 2) + (1 << 0))) != 0) {
- //Wait until data in RX buffer
- while((_spi.spi->STAT & (1 << 2)) == 0);
- int dummy = _spi.spi->RXDAT & 0xffff;
- }
+ //We already set receive ignore flag, so this function is never run.
}
#endif
\ No newline at end of file
