And now the FastLED3.1 branch allows for handling of interrupts on the due,

I just want to say here that I think the whole HoodLoader concept and execution is absolutely fantastic. You should be super proud, @Nevada_Smith ! It’s kind of amazing. “Free second CPU for all Arduino Unos…”???

Everyone starts somewhere - I think you’re off to a pretty damn good start (and in the case of the inlining - you had the right idea with inline marking functions - it’s just that gcc is sometimes stupid about following through with that :slight_smile:

Wil IRLremote run on an ARM like the Teensy 3.x ?
I get C:\Program Files\arduino-1.0.6\libraries\IRLremote/IRLremote.h:28:30: fatal error: util/delay_basic.h: No such file or directory when I try to compile. The ARM does not use the delay_basic library. I did see some mention in on of the Freescale forums about using the UART in IRDa mode to decode IR Remotes.
There also was this bit of code for using a GPIO and Timer, but I think that’s what you code is doing now : https://community.freescale.com/message/339000#339000

I use something that roughly boils down to this:

#if defined(MK20DX128) || defined(MK20DX256)
#define FASTLED_ARM
#define FASTLED_TEENSY3
#elif defined(SAM3X8E)
#define FASTLED_ARM
#define FASTLED_DUE
#else
// default to assuming everything else is avr for now
#define FASTLED_AVR
#endif

Yeah - everything now flattens out into the __vector_3 handler for the arduino uno (with arduino 1.0.5 I go into ~/Documents/Arduino/applet and then run avr-objdump -D Receive_PinChangeInterrupt_Basic.cpp.elf to take a look at the disassembly).

There’s still going to be ~80 cycles of saving/restoring registers, probably because of the call to micros and IREvent. But the bit in the middle looks to be a fair bit more compact. You might be close to the best you can do without resorting to asm code.

It’s been a while since I looked into it, but I believe when you’re using hardware SPI you can’t use the related pins for other things, because the SPI hardware takes over the pins. (I mostly was using 1.0.5 as an example for doing the avr-objdump because 1.5.8 uses temp directory paths that you have to copy/paste out of the build log, which makes it annoying - FTR - the teardown I did yesterday of what the asm was doing was from a 1.5.8 build, however).

I tried it, get a lot of warning about the typedef L143 in IRLremote.h but it does compile and load. But I don’t get any output on the serial console. I commented out IRLbegin<IR_ALL>(pin13) to see if just the serial IO worked, but no output, set IRProtocol =1 in Receive_NoBlocking.ino to force it to loop. I can see the LED on the Teensy PCB flicker when I press buttons on the remote.