tests: fix test programs using old uart API
authorGregor Riepl <onitake@gmail.com>
Mon, 15 Dec 2014 02:28:49 +0000 (03:28 +0100)
committerOlivier Matz <zer0@droids-corp.org>
Sun, 25 Jan 2015 21:19:19 +0000 (22:19 +0100)
The uart API changed and these tests were not adapted: the first
parameter is now the UART port number.

Signed-off-by: Gregor Riepl <onitake@gmail.com>
modules/debug/diagnostic/test/test_int_show.c
modules/ihm/menu/test/main.c

index d5ef558..2d22079 100644 (file)
@@ -53,9 +53,9 @@ void interrupt(void)
   
   // prints the string
   if (buf[buf_index] == 0)
-    uart0_send(' ');
+    uart_send(0, ' ');
   else
-    uart0_send(buf[buf_index++]);
+    uart_send(0, buf[buf_index++]);
 
 }
 
@@ -77,7 +77,7 @@ int test_int_show(void)
   wait_ms(500);
 
   // should be replaced by the scheduler
-  uart0_register_tx_event((void *) interrupt);
+  uart_register_tx_event(0, (void *) interrupt);
 
   // start characters
   printf("\n");
index 548e7d1..fe0974f 100644 (file)
@@ -102,7 +102,7 @@ int main(void)
 #ifdef HOST_VERSION        
        scanf("%c",&c);
 #else
-        c=uart0_recv();
+        c=uart_recv(0);
 #endif
         m=menu_default_update(m, c);
     }