Updated streaming scripts. Compiler compatibility for _delay_ms().

- Moved obsolete streaming scripts to folder for reference.

- Added a more complex Python streaming script which uses the serial
buffer as an additional streaming buffer.

- Removed all references to a _delay_ms(variable) to allow for better
porting across different compilers.
This commit is contained in:
Sonny Jeon
2012-01-27 19:48:46 -07:00
parent fca3fb4188
commit b86ba60a25
10 changed files with 109 additions and 1 deletions

View File

@@ -21,6 +21,7 @@
#include "nuts_bolts.h"
#include <stdint.h>
#include <stdlib.h>
#include <util/delay.h>
int read_double(char *line, uint8_t *char_counter, double *double_ptr)
{
@@ -36,3 +37,9 @@ int read_double(char *line, uint8_t *char_counter, double *double_ptr)
return(true);
}
// Delays variable defined milliseconds. Compiler compatibility fix for _delay_ms(),
// which only accepts constants in future compiler releases.
void delay_ms(uint16_t ms)
{
while ( ms-- ) { _delay_ms(1); }
}