x

Dependents:   20180621_FT813

Fork of BurstSPI by Erik -

BurstSPI_LPC_1549.cpp

Committer:
JackB
Date:
2018-07-23
Revision:
14:35df38577abd
Parent:
12:c99022511536

File content as of revision 14:35df38577abd:

#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