PaulStoffregen / DmxSimple

99 stars 21 forks source link

Use 32-bit port for Teensy 4.0/4.1 #20

Closed ademuri closed 4 years ago

ademuri commented 4 years ago

This fixes using FastLED with Teensy 4.0/4.1 in PlatformIO.

Without this, I get the following error when trying to build a Teensy 4.0 project that has #include <FastLED.h>:

/home/adam/.platformio/packages/framework-arduinoteensy/libraries/DmxSimple/DmxSimple.cpp: In function 'void dmxBegin()':
/home/adam/.platformio/packages/framework-arduinoteensy/libraries/DmxSimple/DmxSimple.cpp:82:11: error: cannot convert 'volatile uint32_t* {aka volatile long unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment
   dmxPort = portOutputRegister(digitalPinToPort(dmxPin));
           ^

I don't have the hardware to test this, but it does fix compiling.