pinsDebug with more features, uses less RAM
I've just uploaded a major change to pinsDebug.
The big change was creating an array in FLASH that contained every
active pin definition. That reduced the RAM memory usage considerably
but increased the FLASH usage.
Creating the array requires going through the pin list twice. Rather
than having two copies of it in the code I moved the list out to another
file (pinsDebug_list.h) and then just did two #includes.
From the user’s view they’ll see the following changes:
- Now reports all the names assigned to a pin
- The port is now reported in addition to the pin number.
- When PWM0A & PWM1C share a pin, both PWMs are reported
- More PWM/Timer info is reported
One new item that may cause some concern is the usage of the LINE
predefined preprocessor macro. It may not be available if the Arduino
IDE goes to a different compiler.
Includes support for 1284 & 1286 families.
Memory usage changes when enabling PINS_DEBUGGING:
. without 52576
. with new 64592
. with old 62826
. new-out 12016
. old-out 10250
. new-old 1766
. without 2807
. with new 2875
. with old 3545
. new-out 68
. old-out 738
. new-old -670
minor changes - mostly formatting
- added newline to end of teensyduino file
- changed flag name from TEENSYDUINO to TEENSYDUINO_IDE. Got warnings
about redefining TEENSYDUINO
- removed some trailing spaces
reduce PROGMEM size & update pin list
Reduced PROGMEM usage by
- converting often used macro to a function
- moved as much as possible into the function
This required creating two arrays of address pointers for the PWM
report I/O status for unused/unknown pins