projects
/
avr_bc100.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
4008-04-07 Release
[avr_bc100.git]
/
BaseMegaFirmware
/
GCC
/
mystdio.c
1
// Martin Thomas 3/2008
\r
2
\r
3
#include <avr/io.h>
\r
4
#include "uart.h"
\r
5
#include "mystdio.h"
\r
6
\r
7
static int uart_putchar( char c, FILE *stream )
\r
8
{
\r
9
if ( c == '\n' ) {
\r
10
uart_putc( '\r' );
\r
11
}
\r
12
uart_putc( c );
\r
13
\r
14
return 0;
\r
15
}
\r
16
\r
17
static FILE uart_stream = FDEV_SETUP_STREAM(uart_putchar, NULL, _FDEV_SETUP_WRITE);
\r
18
\r
19
void mystdio_init(void)
\r
20
{
\r
21
stdout = &uart_stream;
\r
22
}
\r