Library Conversion From UNO to Teensy

Status
Not open for further replies.

carrot124

New member
Hi guys,

I have been working on this library right here:
https://github.com/TMRh20/AnalogFrequency/blob/master/src/AnalogFrequency.h
Obviously it works fine on the Uno. However, when I tried to compile it on the Teensy, it couldn't compile.
From several Google Search, I found out that the Teensy has different architecture in comparison to the Uno: registers' names and such. So my question is can I manually learn about the Teensy architecture and just change the names of the registers ? If so, where do I get these information? If not, am I better off just learn what the library does and rewrite everything ?

Thank you all for your time !
 
I think that the solution is a combination of both. First understand what the library does - in an abstract way. Then learn from the reference manual linked on the PJRC website how to do the same thing with a Teensy and it’s different architecture (a 1:1 renaming of a few registers is normally neither enough nor efficient, the architecture is too different). Then, rewrite just the lines of the library which are dealing directly with the hardware. Finally, optimize the rest for more efficient 32bit access where needed and you are done.
 
Status
Not open for further replies.
Back
Top