btmcmahan / Teensy-3.0-SPI-Master---Slave

Teensy 3.0 SPI Master & Slave
36 stars 18 forks source link

Library fixes for teensy 3.1 and latest Teensyduino #5

Open soerup opened 9 years ago

soerup commented 9 years ago

I needed to make these changes to work with the Teensyduino 1.22 and Teensy 3.1

btmcmahan commented 9 years ago

You're right, I've seen that myself. Other than that, did this work okay for you?

soerup commented 9 years ago

It did, but I have only tested Slave mode so far, as that was what I needed for my application.

I did an 8bit slave, mode 0, 1 mhz clock (controlled by master) and it looked stable. I used your demo code as the basis.

soerup commented 9 years ago

Followup - I have some issues with rxtx8 which messes up completely for my application. I'm looking into understanding the underlying issues. [deleted wrong question]

trentdye commented 9 years ago

@soerup It wouldn't hurt to update the example code with these changes. Examples reference CTAR0 and should instead reference CTAR_0; but it's a quick fix to replace.

Could you explain why you changed CTAR0 and CTAR1 to CTAR_0 and CTAR_1?

soerup commented 9 years ago

Changes are made to avoid name clashes in TeensyDuino 1.22 with Teensy 3.1.

And you are right it wouldn't hurt to update the examples. I did not use thus, I did not notice they were broken. Feel free to submit patch. Should be simple compile fixing.

trentdye commented 9 years ago

@soerup Thanks for the info!

gunderson commented 7 years ago

+1

Had to use @soerup 's repo with this PR to get it to compile