summaryrefslogtreecommitdiff
path: root/n/avr/modules/uart
diff options
context:
space:
mode:
authorschodet2005-10-09 12:40:00 +0000
committerschodet2005-10-09 12:40:00 +0000
commite061346e31c0281f97393762a7e55f486a26be4a (patch)
tree2e0ff3f52b1f5afe93b82d45d1735f39f7091446 /n/avr/modules/uart
parent7e7af8f294d6b8c49c341a560f6c4c34a583bd08 (diff)
Ajout du test du reset.
Diffstat (limited to 'n/avr/modules/uart')
-rw-r--r--n/avr/modules/uart/test/test_uart.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/n/avr/modules/uart/test/test_uart.c b/n/avr/modules/uart/test/test_uart.c
index be652f2..76716e7 100644
--- a/n/avr/modules/uart/test/test_uart.c
+++ b/n/avr/modules/uart/test/test_uart.c
@@ -48,12 +48,22 @@ main (void)
{
utils_delay (0.1);
if (uart0_poll ())
- uart0_putc (uart0_getc ());
+ {
+ char c = uart0_getc ();
+ if (c == 'z')
+ utils_reset ();
+ uart0_putc (c);
+ }
if (uart1_poll ())
uart1_putc (uart1_getc ());
}
#else
while (1)
- uart0_putc (uart0_getc ());
+ {
+ char c = uart0_getc ();
+ if (c == 'z')
+ utils_reset ();
+ uart0_putc (c);
+ }
#endif
}