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:
@@ -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); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user