mmarchetti / DirectIO

Fast, simple I/O library for Arduino
GNU Lesser General Public License v3.0
115 stars 27 forks source link

ARM-based Arduinos (e.g. Arduino Due) are not supported #2

Closed mmarchetti closed 5 years ago

mmarchetti commented 9 years ago

The current port mapping scheme doesn't work on Arduino ARM variants (currently the Due board). The Arduino ARM libraries do a lot of work per I/O transaction, some of which can be moved into initialization as is done here. Also there are clearly opportunities for inlining, which not only eliminates function call overhead but can often eliminate one branch of an if/else entirely by evaluating the condition at compile time.

JohnLinford commented 8 years ago

I'm messing with an Arduino Due app that could certainly use this DirectIO library. Do you have any plans to add support in due(!) course? Thanks.

mmarchetti commented 8 years ago

Hi John, I haven't looked at the Due support in a while - it may be some time before I get back to it. It was a bit more complex than the AVR case, but I think there is an opportunity for some speed improvement by caching port addresses (like the dynamic pin number case) and calling PIOSet directly.

mmarchetti commented 5 years ago

17 should help with this - at least enabling a sketch that uses DirectIO to run on Due (without speedup at this time).

mmarchetti commented 5 years ago

18 provides accelerated IO for Due