x

Fork of BurstSPI by Erik Olieman

Committer:
JackB
Date:
Mon Jul 23 12:23:44 2018 +0000
Revision:
14:35df38577abd
Parent:
12:c99022511536
BSPI

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Backstrom 11:36ac5fd058dd 1 #if defined(TARGET_LPC1549)
Backstrom 11:36ac5fd058dd 2 #include "BurstSPI.h"
Backstrom 11:36ac5fd058dd 3
Backstrom 11:36ac5fd058dd 4 void BurstSPI::fastWrite(int data) {
Backstrom 11:36ac5fd058dd 5 while (!(_spi.spi->STAT & (1 << 1)));
Backstrom 11:36ac5fd058dd 6
Backstrom 11:36ac5fd058dd 7 _spi.spi->TXDAT = (data & 0xffff);
Backstrom 12:c99022511536 8 // end of transfer and receive ignore flag
Backstrom 11:36ac5fd058dd 9 _spi.spi->TXCTL |= ((1 << 20) | (1 << 22));
Backstrom 11:36ac5fd058dd 10 }
Backstrom 11:36ac5fd058dd 11
Backstrom 11:36ac5fd058dd 12 void BurstSPI::clearRX( void ) {
Backstrom 12:c99022511536 13 //We already set receive ignore flag, so this function is never run.
Backstrom 11:36ac5fd058dd 14 }
Backstrom 11:36ac5fd058dd 15
Backstrom 11:36ac5fd058dd 16 #endif