sonyhome / FAB_LED

Fast Arduino Bitbang LED library supports programmable LEDs (WS2812B, APA102...), color palettes for Arduino AVR
GNU General Public License v2.0
125 stars 17 forks source link

Teensy 3.2 support? #30

Open v-ivanyshyn opened 5 years ago

v-ivanyshyn commented 5 years ago

Currently Teensy 3.2 board looks like not supported. I've tried to compile the library with PlatformIO (platform = teensy, framework = arduino, board = teensy31) with these errors in result:

lib/FAB_LED/src/FAB_LED.h:684:1: error: prototype for 'void avrBitbangLedStrip<high1, low1, high0, low0, minMsRefresh, dataPortId, dataPortPin, clockPortId, clockPortPin, colors, protocol>::debug()' does not match any in class 'avrBitbangLedStrip<high1, low1, high0, low0, minMsRefresh, dataPortId, dataPortPin, clockPortId, clockPortPin, colors, protocol>'
avrBitbangLedStrip<FAB_TVAR>::debug(void)
^
lib/FAB_LED/src/FAB_LED.h:406:21: error: candidate is: template<short int high1, short int low1, short int high0, short int low0, long unsigned int minMsRefresh, avrLedStripPort dataPortId, unsigned char dataPortPin, avrLedStripPort clockPortId, unsigned char clockPortPin, pixelFormat colors, ledProtocol protocol> template<void (* printChar)(const char*), void (* printInt)(uint32_t)> static void avrBitbangLedStrip<high1, low1, high0, low0, minMsRefresh, dataPortId, dataPortPin, clockPortId, clockPortPin, colors, protocol>::debug()
static inline void debug(void);
^

Is there any plan to add support for Teensy 3.2? Or do you have any ideas to quick-fix these errors (sorry, I'm not familiar with low-level programming so much)?

sonyhome commented 4 years ago

I do not have immediate plans to support non AVR controllers, in part because GCC doesn't provide a nop loop primitive for ARM I think, so I'd have to write a small ASM loop for it. Not hard but would require some free time for me to do so.