Closed KurtE closed 6 years ago
I think it is better that wiring_digital.h include digitalWriteFast.h
Thanks, I will see where to add it in. I am running into a chicken and egg problem. That is the file also requires variant.h to have been included. in order to get the definitions for g_Pin2PortMapArray. And variant.h includes wiring_digital.h... and so there are some files that start off with first include file of variant.h which includes Arduino, ... which includes our file, but before the array is defined so compiler errors out. And since we have #if statements in place to only include once, my adding #include "wiring.h" does not help... that is we have wiring.h -> Arduino.h (which also includes wiring.h) -> wiring_digital.h -> digitalWriteFast.h And only after this unwinds the #includes will the define of g_Pin2... is defined.
Still trying a few iterations... One obvious thing to try is to update those files who start off with
Ah, there was a problem with the order. We prefer the way you are currently PR.
We will merge into this state and add an example about digitalWriteFast.
Again, thanks for your contributions :)
This version still requires the user to include:
include
In their sketch. I am sort of torn between this and either including this stuff directly into wiring_digital.h or have wiring_digital.h include this file.