port for ece459

Fork of BurstSPI by Erik -

BurstSPI_LPC_1549.cpp

Committer:
bdk9
Date:
2016-12-08
Revision:
14:ea2354b66389
Parent:
12:c99022511536

File content as of revision 14:ea2354b66389:

#if defined(TARGET_LPC1549)
#include "BurstSPI.h"

void BurstSPI::fastWrite(int data) {
    while (!(_spi.spi->STAT & (1 << 1)));

    _spi.spi->TXDAT = (data & 0xffff);
    // end of transfer and receive ignore flag
    _spi.spi->TXCTL |= ((1 << 20) | (1 << 22));
}

void BurstSPI::clearRX( void ) {
    //We already set receive ignore flag, so this function is never run.
}

#endif