Closed mmarchetti closed 5 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.
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.
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.