Fix the bug, hopefully

master
LEdoianX 9 years ago
parent 5603d53239
commit a908edaf0d

@ -51,7 +51,9 @@ int main (void) {
}
state = (direction == FORWARD ? (state + 1)%4 : (/*state+4-1*/ state+3)%4 );
gpio_set(GPIOC, states[state]); //FIXME: This doesn't work, as it does not write 0s to unmentioned pins!!
gpio_set(GPIOC, states[state]); //FIXME: This doesn't work, as it does not write 0s to unmentioned pins!!
gpio_unset(GPIOC, (GPIO8 | GPIO9) ^ states[state]); // Does this fix that?
wait(DELAY);
}
return 0;

Loading…
Cancel
Save