uint8_t injDir = (PIND ^ injDirection) & (1 << PIND2);
Hmm. I used ( (PIND & (1<<PIND2)) ^ injEdge ), where injEdge is 0x00 or 0x04 (to match the bitmask 1<<2). Should have been functionally the same. I may try it again. Or maybe it's because i was pulling injEdge straight from the parameters section, and not making it volatile. I'll recompile & see what code i get.
Last edited by nickdigger; 08-30-2013 at 02:13 PM..
|