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:
parent
89a3b37e02
commit
d27dd13a54
8 changed files with 39 additions and 28 deletions
|
|
@ -83,4 +83,7 @@ extern system_t sys;
|
|||
// a pointer to the result variable. Returns true when it succeeds
|
||||
int read_double(char *line, uint8_t *char_counter, double *double_ptr);
|
||||
|
||||
// Delays variable-defined milliseconds. Compiler compatibility fix for _delay_ms().
|
||||
void delay_ms(uint16_t ms);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue