Fix bug with premature step end. Refactored _delay_ms() and square() for better portability.

- Fixed a premature step end bug dating back to Simen's 0.7b edge
version is fixed, from which this code is forked from. Caused by Timer2
constantly overflowing calling the Step Reset Interrupt every 128usec.
Now Timer2 is always disabled after a step end and should free up some
cycles for the main program. Could be more than one way to fix this
problem. I'm open to suggestions.

- _delay_ms() refactored to accept only constants to comply with
current compilers. square() removed since not available with some
compilers.
This commit is contained in:
Sonny Jeon
2012-01-15 18:25:12 -07:00
parent 89a3b37e02
commit d27dd13a54
8 changed files with 39 additions and 28 deletions

View File

@ -19,6 +19,7 @@ import re
import time
import sys
import argparse
# import threading
RX_BUFFER_SIZE = 128