Move pinStructs array into PROGMEM to save global variables space#7
Move pinStructs array into PROGMEM to save global variables space#7brewmanz wants to merge 1 commit intopololu:masterfrom
Conversation
|
What kind of environment are you using and how are you building your project? I would expect pinStructs to be garbage collected at link time because it is not needed by the code emitted by the compiler. |
|
I'm using the Arduino IDE 1.8.20 under Ubuntu 20.04 LTS. On compiling for Arduino Nano with my changes, my last 2 lines of compiler output states I then roll back my changes, recompile, and it states One reason for using pinStructs is to dynamically use a variable pin number to enable code like |
This reduces the global variable space used.
Please check everything, as I'm using only a tiny fraction of FastGPIO in my code.
The generated code seems to be the same.
My test code was