Revert usart_readline() change
authorJoseph Coffland <joseph@cauldrondevelopment.com>
Mon, 5 Sep 2016 21:25:20 +0000 (14:25 -0700)
committerJoseph Coffland <joseph@cauldrondevelopment.com>
Mon, 5 Sep 2016 21:25:20 +0000 (14:25 -0700)
src/usart.c

index 91ecb108952dc311275a70304d50403446e59239..7d66f635b4cb8dc2a208e96b28fa0894d92d3ede 100644 (file)
@@ -199,8 +199,7 @@ char *usart_readline() {
   bool eol = false;
 
   while (!rx_buf_empty()) {
-    char data = rx_buf_peek();
-    rx_buf_pop();
+    char data = usart_getc();
 
     if (usart_flags & USART_ECHO) usart_putc(data);
 
@@ -236,13 +235,10 @@ char *usart_readline() {
     if (eol) {
       line[i] = 0;
       i = 0;
-
-      _set_rxc_interrupt(true); // Enable read interrupt
       return line;
     }
   }
 
-  _set_rxc_interrupt(true); // Enable read interrupt
   return 0;
 }