SPI support for the Teensy port

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
dboddie
Posts: 3
Joined: Fri Feb 06, 2015 10:43 pm

SPI support for the Teensy port

Post by dboddie » Fri Feb 06, 2015 10:56 pm

I've just started to dig around in the teensy directory, hoping to enable the the SPI class for the board. Actually, I'm hoping to be able to access the SD card and LCD on this Adafruit touchscreen board. Can someone give me an idea as to where I should begin to attempt this?

I've seen the mpconfigport.h and qstrdefsport.h header files, and the make-pins.py script, but I don't see what it would take to support the spi.c file if I dropped it into the directory and added it to the Makefile. Presumably, I would need to define lots of the constants that the implementation needs, but are those supposed to be generated by a script as well?

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: SPI support for the Teensy port

Post by dhylands » Sat Feb 07, 2015 7:39 am

I haven't gotten around to implementing the SPI stuff on the teensy port yet - patches welcome.

The Teensy doesn't have native SD support. There is support for SPI SD card in the stmhal port now, but my gut tells me that you'll run out of flash by adding the fatfs support.

dboddie
Posts: 3
Joined: Fri Feb 06, 2015 10:43 pm

Re: SPI support for the Teensy port

Post by dboddie » Sat Feb 07, 2015 11:27 am

I'll look into it a bit more. The fatfs support isn't really important for me, so maybe flash space won't be an issue.

dboddie
Posts: 3
Joined: Fri Feb 06, 2015 10:43 pm

Re: SPI support for the Teensy port

Post by dboddie » Sat Feb 07, 2015 2:21 pm

I'll see what I can do. I don't need fatfs support so maybe that will help things fit in the flash.

Post Reply