wait for TXREADY to avoid serial transmit buffer overrun

This commit is contained in:
Markus Fröschle
2012-10-27 10:29:37 +00:00
parent 9c20f60004
commit 254317c13b
2 changed files with 16 additions and 3 deletions

View File

@@ -66,7 +66,7 @@ static void xputchar(int c)
"bsr printf_helper\n\t"
/* output */:
/* input */: "r" (c)
/* clobber */: "d0","a0"
/* clobber */: "d0","d2","a0"
);
}
@@ -380,3 +380,12 @@ void xvsnprintf(char *str, size_t size, const char *fmt, va_list va)
*xstring++ = '\0';
}
void display_progress()
{
static int _progress_index;
char progress_char[] = "|/-\\";
xputchar(progress_char[_progress_index++ % strlen(progress_char)]);
xputchar('\r');
}