Teensy 3.0 as SPI Slave

Status
Not open for further replies.
I have. It works. I have updated the library some, and I've learned some new tricks with it. Let me know if you need any assistance.

I have been looking for something that allows a slave's data to be read by the master, but I'm doing this on a Teensy 3.6. Are you still working with your library? Does it still work?
 
I've downloaded the library, but the examples won't compile. I'm compiling for Teensy 3.6, but I changed to Teensy 3.0, then 3.1/3.2; the compile errors are line-for-line identical:

Code:
In file included from D:\Users\rmartin\Documents\Arduino\libraries\Teensy-3.0-SPI-Master---Slave\examples\SPI_Slave_RXTX_1_0\SPI_Slave_RXTX_1_0.ino:2:0:

D:\Users\rmartin\Documents\Arduino\libraries\Teensy-3.0-SPI-Master---Slave/t3spi.h:63:2: error: expected unqualified-id before 'do'

  do {

  ^

D:\Users\rmartin\Documents\Arduino\libraries\Teensy-3.0-SPI-Master---Slave/t3spi.h:66:4: error: expected unqualified-id before 'while'

  } while(0)

    ^

D:\Users\rmartin\Documents\Arduino\libraries\Teensy-3.0-SPI-Master---Slave/t3spi.h:73:4: error: expected unqualified-id before 'while'

  } while(0)

    ^

D:\Users\rmartin\Documents\Arduino\libraries\Teensy-3.0-SPI-Master---Slave/t3spi.h:78:2: error: expected unqualified-id before 'while'

  while (!(SPI0_SR & SPI_SR_TCF));

  ^

In file included from D:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/core_pins.h:34:0,

                 from D:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/wiring.h:38,

                 from D:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/WProgram.h:45,

                 from C:\Users\furys\AppData\Local\Temp\arduino_build_360417\pch\Arduino.h:6:

D:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/kinetis.h:4369:42: error: expected ')' before '*' token

 #define KINETISK_SPI0  (*(KINETISK_SPI_t *)0x4002C000)

                                          ^

D:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/kinetis.h:4403:20: note: in expansion of macro 'KINETISK_SPI0'

 #define SPI0_SR   (KINETISK_SPI0.SR) // DSPI Status Register

                    ^

D:\Users\rmartin\Documents\Arduino\libraries\Teensy-3.0-SPI-Master---Slave/t3spi.h:79:2: note: in expansion of macro 'SPI0_SR'

  SPI0_SR |= SPI_SR_TCF;

  ^

D:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/kinetis.h:4369:42: error: expected ')' before '*' token

 #define KINETISK_SPI0  (*(KINETISK_SPI_t *)0x4002C000)

                                          ^

D:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/kinetis.h:4403:20: note: in expansion of macro 'KINETISK_SPI0'

 #define SPI0_SR   (KINETISK_SPI0.SR) // DSPI Status Register

                    ^

D:\Users\rmartin\Documents\Arduino\libraries\Teensy-3.0-SPI-Master---Slave/t3spi.h:79:2: note: in expansion of macro 'SPI0_SR'

  SPI0_SR |= SPI_SR_TCF;

  ^

D:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/kinetis.h:4369:42: error: expected ')' before '*' token

 #define KINETISK_SPI0  (*(KINETISK_SPI_t *)0x4002C000)

                                          ^

D:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/kinetis.h:4403:20: note: in expansion of macro 'KINETISK_SPI0'

 #define SPI0_SR   (KINETISK_SPI0.SR) // DSPI Status Register

                    ^

D:\Users\rmartin\Documents\Arduino\libraries\Teensy-3.0-SPI-Master---Slave/t3spi.h:79:2: note: in expansion of macro 'SPI0_SR'

  SPI0_SR |= SPI_SR_TCF;

  ^

Using library Teensy-3.0-SPI-Master---Slave in folder: D:\Users\rmartin\Documents\Arduino\libraries\Teensy-3.0-SPI-Master---Slave (legacy)
Error compiling for board Teensy 3.6.
 
Status
Not open for further replies.
Back
Top