stateMachine/lib/ssiSpi/ssiSpi.h
inline static uint8_t transfer(uint8_t data) {
		SPI0_SR = SPI_SR_TCF;
		SPI0_PUSHR = data;
        elapsedMillis Spi0TimeoutTimer;
        long Spi0Timer_start = Spi0TimeoutTimer;
		while (!(SPI0_SR & SPI_SR_TCF)) {
            long Spi0Timer_end = Spi0TimeoutTimer;
            if (Spi0Timer_end - Spi0Timer_start > 10) {
                break;
            }
        }
		return SPI0_POPR;
	}
// Write to the SPI bus (MOSI pin) and also receive (MISO pin)
Write to the SPI bus (MOSI pin) and also receive (MISO pin)
Write to the SPI bus ( MOSI pin ) and also receive ( MISO pin )
inline static uint8_t transfer(uint8_t data) {
		SPI0_SR = SPI_SR_TCF;
		SPI0_PUSHR = data;
        elapsedMillis Spi0TimeoutTimer;
        long Spi0Timer_start = Spi0TimeoutTimer;
		while (!(SPI0_SR & SPI_SR_TCF)) {
            long Spi0Timer_end = Spi0TimeoutTimer;
            if (Spi0Timer_end - Spi0Timer_start > 10) {
                break;
            }
        }
		return SPI0_POPR;
	}
inline static uint8_t transfer ( uint8_t data ) { SPI0_SR = SPI_SR_TCF ; SPI0_PUSHR = data ; elapsedMillis Spi0TimeoutTimer ; long Spi0Timer_start = Spi0TimeoutTimer ; while ( ! ( SPI0_SR & SPI_SR_TCF ) ) { long Spi0Timer_end = Spi0TimeoutTimer ; if ( Spi0Timer_end - Spi0Timer_start > 10 ) { break ; } } return SPI0_POPR ; }
Write to the SPI bus (MOSI pin) and also receive (MISO pin)
Write to the SPI bus ( MOSI pin ) and also receive ( MISO pin )