Arduino 1.0.6/Teensyduino 1.24 compatibility with btmcmhan's t3spi library

BrianC

Well-known member
Hi,

I've been using @btmcmahan Teensy SPI master/slave library for a while (with arduino 1.0.5 and teensyduino 1.20).
https://github.com/btmcmahan/Teensy-3.0-SPI-Master---Slave
However, since I've needed to use the ili9341 lcd, I've updated arduino to 1.0.6 with teensyduino 1.24 to use the optimised spi library. Now the programs can't compile (including all the sample programs). I get a heap of errors though a lot of them seem to repeat. Below are the first few lines of compile output.

Code:
In file included from SPI_Slave_RX_1_0.ino:2:0:
C:\Users\23047\Dropbox\Arduino\piDuino\hardware\teensy\cores\teensy3/avr_emulation.h: In member function 'SPCRemulation& SPCRemulation::operator=(int)':
C:\Users\23047\Dropbox\Arduino\piDuino\libraries\t3spi/t3spi.h:29:18: error: expected unqualified-id before numeric constant
 #define CTAR0    0
                  ^
C:\Users\23047\Dropbox\Arduino\piDuino\hardware\teensy\cores\teensy3/kinetis.h:2194:36: note: in expansion of macro 'CTAR0'
 #define SPI0_CTAR0  (KINETISK_SPI0.CTAR0) // DSPI Clock and Transfer Attributes Register, In Master Mode
                                    ^
C:\Users\23047\Dropbox\Arduino\piDuino\hardware\teensy\cores\teensy3/avr_emulation.h:822:4: note: in expansion of macro 'SPI0_CTAR0'
    SPI0_CTAR0 = SPI_CTAR_FMSZ(7) | SPI_CTAR_PBR(1) | SPI_CTAR_BR(1) | SPI_CTAR_CSSCK(1);
    ^
C:\Users\23047\Dropbox\Arduino\piDuino\libraries\t3spi/t3spi.h:29:18: error: expected ')' before numeric constant
 #define CTAR0    0
                  ^
C:\Users\23047\Dropbox\Arduino\piDuino\hardware\teensy\cores\teensy3/kinetis.h:2194:36: note: in expansion of macro 'CTAR0'
 #define SPI0_CTAR0  (KINETISK_SPI0.CTAR0) // DSPI Clock and Transfer Attributes Register, In Master Mode
                                    ^
C:\Users\23047\Dropbox\Arduino\piDuino\hardware\teensy\cores\teensy3/avr_emulation.h:822:4: note: in expansion of macro 'SPI0_CTAR0'
    SPI0_CTAR0 = SPI_CTAR_FMSZ(7) | SPI_CTAR_PBR(1) | SPI_CTAR_BR(1) | SPI_CTAR_CSSCK(1);
    ^
For full compile output see attached View attachment errors.txt

Could someone please explain what I need to do to update the library to make it work?

Thanks,
Brian
 
Please update to Arduino==1.6.3 or Arduino=>1.6.5 (basically, dodge 1.6.4, arduino muts are releasing too fast and if they have moved beyond 1.6.5 already than 1.6.5 is probably what I am trying to recommend over 1.6.4 but I am not really trying to recommend other than 1.6.3 and 1.6.5 (*unchecked*) at this point in time.)

After this update please update to Teensyduino latest full release (not asking you to go BETA here) and then try everything again - it will be preferable to fix your problems for the latest (reliable) releases as opposed older releases (even a minute older) for any intents or purposes.

For the absolute best chance of the best help always obey the generic forum rule...
 
Back
Top