projects
/
sx
/
simavr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
regExp
home
|
summary
|
tags
|
heads
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
raw
|
patch
| inline |
side by side
(parent:
f57913c
)
Commit
06d4a1c42edadccd03295f7824817fffa535cf80
author
Michel Pollet
<buserror@gmail.com>
Sun, 3 Jun 2012 14:08:34 +0000
(15:08 +0100)
committer
Michel Pollet
<buserror@gmail.com>
Sun, 3 Jun 2012 14:08:34 +0000
(15:08 +0100)
Make sure whst we type is converted too
Signed-off-by: Michel Pollet <buserror@gmail.com>
examples/parts/uart_pty.c
patch
|
blob
|
history
|
download
diff --git
a/examples/parts/uart_pty.c
b/examples/parts/uart_pty.c
index eb3ba7fb7d46d88ddec79cbd273a8dffa1fc057a..ff9594245be94ed12955f063bd64f8a7e1bcda6d 100644
(file)
--- a/
examples/parts/uart_pty.c
+++ b/
examples/parts/uart_pty.c
@@
-84,6
+84,12
@@
uart_pty_flush_incoming(
if (p->tap.s) {
while (p->xon && !uart_pty_fifo_isempty(&p->tap.out)) {
uint8_t byte = uart_pty_fifo_read(&p->tap.out);
+ if (p->tap.crlf && byte == '\r') {
+ uart_pty_fifo_write(&p->tap.in, '\n');
+ }
+ if (byte == '\n')
+ continue;
+ uart_pty_fifo_write(&p->tap.in, byte);
avr_raise_irq(p->irq + IRQ_UART_PTY_BYTE_OUT, byte);
}
}