uint8_t stepCounter(char dir) { if(dir == CW) { stepPosition++; counter++; } else { stepPosition--; counter--; } //keeps the counter within the range of the array counter &= 0x03; outputStep(counter); return counter; }
void Output::outputFailedStep() { if (_output_failed) outputStep(); }