View Single Post
Old 08-30-2013, 12:26 PM   #21 (permalink)
nickdigger
EcoModding Apprentice
 
Join Date: Aug 2009
Location: terra firma
Posts: 138
Thanks: 4
Thanked 24 Times in 22 Posts
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 01:13 PM..
  Reply With Quote