Yes I understand, but please write good commit messages in the future so people don't need to look at the diffs to see what the commit does when browsing the repo. I'll pull your commits anyway, they're good changes :)  

—
Bluebie


On Wednesday, 17 April 2013 at 12:27 PM, tsimon57 wrote:

> In Adafruit_NeoPixel.cpp:
> > @@ -114,8 +114,8 @@ void Adafruit_NeoPixel::show(void) { > // AVR ATtiny85 chips, like the MCU on the Digispark, do not support > // 'mul' instructions, so we use regular nops instead > #ifdef __AVR_ATtiny85__ > - #define NOP2 "nop\n\t"\ > - "nop\n\t" > + #define NOP2 "rjmp .+0\n\t" // used two clock cycles, but requires only one instruction > + // keeps relative branches from breaking > #else > #define NOP2 "mul r0, r0\n\t"  
> The original code used mul in assembly to delay 2 clock cycles. As per the comments in the original code, the code needs to be compact and this 2 cycle delay can only use one word of instruction space. But the mul assembly instruction is not available on the attiny 85. The rjmp (relative jump) instruction can be used to do a jump to the next instruction, making it a nop. It requires two clock cycles, thus maintaining the correct delay. It is an instruction provided on the attiny85. So it makes a perfect replacement for mul.
>  
> —
> Reply to this email directly or view it on GitHub (https://github.com/Bluebie/Adafruit_NeoPixel/pull/1/files#r3825423).
>  
>  
>