BurstSPI fork
Fork of BurstSPI by
BurstSPI_LPC_1549.cpp@14:c99022511536, 2015-04-03 (annotated)
- Committer:
- Backstrom
- Date:
- Fri Apr 03 06:14:57 2015 +0000
- Revision:
- 14:c99022511536
- Parent:
- 13:36ac5fd058dd
As we set receive ignore flag we don't need any code in clearRX.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Backstrom | 13:36ac5fd058dd | 1 | #if defined(TARGET_LPC1549) |
Backstrom | 13:36ac5fd058dd | 2 | #include "BurstSPI.h" |
Backstrom | 13:36ac5fd058dd | 3 | |
Backstrom | 13:36ac5fd058dd | 4 | void BurstSPI::fastWrite(int data) { |
Backstrom | 13:36ac5fd058dd | 5 | while (!(_spi.spi->STAT & (1 << 1))); |
Backstrom | 13:36ac5fd058dd | 6 | |
Backstrom | 13:36ac5fd058dd | 7 | _spi.spi->TXDAT = (data & 0xffff); |
Backstrom | 14:c99022511536 | 8 | // end of transfer and receive ignore flag |
Backstrom | 13:36ac5fd058dd | 9 | _spi.spi->TXCTL |= ((1 << 20) | (1 << 22)); |
Backstrom | 13:36ac5fd058dd | 10 | } |
Backstrom | 13:36ac5fd058dd | 11 | |
Backstrom | 13:36ac5fd058dd | 12 | void BurstSPI::clearRX( void ) { |
Backstrom | 14:c99022511536 | 13 | //We already set receive ignore flag, so this function is never run. |
Backstrom | 13:36ac5fd058dd | 14 | } |
Backstrom | 13:36ac5fd058dd | 15 | |
Backstrom | 13:36ac5fd058dd | 16 | #endif |