]> git.droids-corp.org - aversive.git/commitdiff
tests: fix test programs using old uart API
authorOlivier Matz <zer0@droids-corp.org>
Thu, 26 Mar 2015 18:32:05 +0000 (19:32 +0100)
committerOlivier Matz <zer0@droids-corp.org>
Thu, 26 Mar 2015 18:34:28 +0000 (19:34 +0100)
The uart API changed and these tests were not adapted: the first
parameter is now the UART port number.

Signed-off-by: Olivier Matz <zer0@droids-corp.org>
modules/comm/uart/test/main.c
modules/devices/brushless_motors/brushless_3phase_digital_hall/test/main.c
modules/devices/brushless_motors/brushless_3phase_digital_hall_double/test/main.c
modules/devices/control_system/filters/biquad/test/main.c
modules/devices/control_system/filters/quadramp_derivate/test/main.c
modules/ihm/parse/test/main.c
modules/ihm/rdline/test/main.c
projects/example2/main.c
projects/kbd_uart_test/main.c
projects/microb2010/tests/test_board2008/action.c

index 23ed2f012fd012b1bd10623a7d142fbaa6cf1f79..381b57c4682dabb61d12f8faddf38feeb7354981 100644 (file)
@@ -76,7 +76,7 @@ int main(void)
 
 #ifndef HOST_VERSION
        /* now we want to do a printf : we must register the
-        * uart0_send as stdout. Here no receive function is
+        * uart0_dev_send as stdout. Here no receive function is
         * specified. */
        fdevopen(uart0_dev_send, NULL);
 #endif
index 5e5cc9af9b352bb8495a26b3be3560daaa89979f..d804908ab4212d9ebc62e59d50f276f670457453 100644 (file)
@@ -111,7 +111,7 @@ int main(void)
 
 
        uart_init();
-       fdevopen((void *)uart0_send,NULL,0);
+       fdevopen((void *)uart0_dev_send, NULL,0);
 
        printf_P(PSTR("\nbonjour\n"));
        sei();
index aaebd2e4990fdd32f1344c5ed1c9835bee90cd46..1c4d14e84fc6e0676e81faa74786767b1a2d20b4 100644 (file)
@@ -137,7 +137,7 @@ int main(void)
 
 
        uart_init();
-       fdevopen((void *)uart0_send,NULL,0);
+       fdevopen((void *)uart0_devsend, NULL,0);
 
        printf_P(PSTR("\nbonjour\n"));
        sei();
index ba64fe794a80b6d3b832d22ccb9427c0b5e094df..6741657f435e6b711ff0d15cdd7a817b906af47f 100644 (file)
@@ -41,7 +41,7 @@ int main(void)
   
        // init uart
        uart_init();
-       fdevopen(uart0_send,NULL, 0);
+       fdevopen(uart0_dev_send, NULL, 0);
 
   
   
index 8850d4ae64728fde9192aa2325a48e19196b9cfb..f7215085056c09045faefb98c120d3fe169850fa 100644 (file)
@@ -87,7 +87,7 @@ int main(void)
   
   // init uart
   uart_init();
-  fdevopen((void *)uart0_send,NULL,0);
+  fdevopen((void *)uart0_dev_send, NULL,0);
 
   
   
index 64173f2e12bc3608bce9ad0874d2feb2d5b566d1..c370c1ed7e85a04e422328f929f15f7bf197797f 100644 (file)
@@ -56,7 +56,7 @@ write_char(char c) {
 
 void
 write_char(char c) {
-       uart0_send(c);
+       uart_send(0, c);
 }
 #endif
 
index 1165fb030e6f667bdf516c0dee910651f554ce3b..a029489a1aafe0f25a82729786de9eca8678e3f5 100644 (file)
@@ -103,7 +103,7 @@ write_char(char c) {
 #else
 void
 write_char(char c) {
-       uart0_send(c);
+       uart_send(0, c);
 }
 
 static void
@@ -206,7 +206,7 @@ int main(void)
 
        wait_ms(5000);
        printf("Start\n");
-       uart0_register_rx_event(rx);
+       uart_register_rx_event(0, rx);
        
        sei();
 #endif
index da4134f6a94ec7903f733fcbae4a5ef852069687..4faad5f7be377b55e2c08254679a75af44818759 100644 (file)
@@ -105,8 +105,8 @@ int main(void)
        u08 tab2[4];
 
 #ifndef HOST_VERSION 
-/*     uart_init(); */
-/*     fdevopen((int (*)(char))uart0_send,(int (*)(void))uart0_recv,0); */
+       uart_init();
+       fdevopen(uart0_dev_send, NULL, 0);
 #endif
        my_list_type my_list ;
        my_another_list_type another_list ;
index 35c66efc889d8e6272a25edc632c1a9c9d0e5371..b6626699642eec2ef24b7be02d3517e06c78bebd 100644 (file)
@@ -23,7 +23,7 @@ void process(uint8_t c)
 \r
   tab[0] = 0;\r
 \r
-  uart0_send(c);\r
+  uart_send(0, c);\r
 \r
   if(c=='\r')\r
     {\r
@@ -158,7 +158,7 @@ int main(void)
   //  kbd_register_event(menu_control);\r
 \r
   /* appele la fonction process a chaque reception de caractere */\r
-  //  uart0_register_rx_event(process);\r
+  //  uart_register_rx_event(0, process);\r
 \r
   /* creation du device uart */\r
   fdevopen(uart0_dev_send,uart0_dev_recv);\r
@@ -205,15 +205,15 @@ int main(void)
     {\r
       \r
 /*       wait_ms(1); */\r
-/*       uart0_send(0x00); */\r
+/*       uart_send(0, 0x00); */\r
 /*       wait_ms(1); */\r
-/*       uart0_send(0x03); */\r
+/*       uart_send(0, 0x03); */\r
 /*       wait_ms(1); */\r
-/*       uart0_send(0xAA); */\r
+/*       uart_send(0, 0xAA); */\r
 /*       wait_ms(1); */\r
-/*       uart0_send(0x55); */\r
+/*       uart_send(0, 0x55); */\r
 /*       wait_ms(1); */\r
-/*       uart0_send(0xFF); */\r
+/*       uart_send(0, 0xFF); */\r
 /*       wait_ms(1); */\r
 /*       wait_ms(1); */\r
       printf("\r\n>> Time set to %d seconds\r\n",time_get_s());\r
index 2b3917eae1a26f42f63d0d6205d78bfa49376c73..12882f0a49d5345ab4f5c98e527d20841810000d 100644 (file)
@@ -40,7 +40,7 @@ void action_init(void)
  */
 void action_servo_set(uint8_t num, uint16_t us)
 {
-       uart1_send(num);
-       uart1_send(0x40 | (us&0x3F));
-       uart1_send(0x80 | ((us>>6)&0x3F));
+       uart_send(1, num);
+       uart_send(1, 0x40 | (us&0x3F));
+       uart_send(1, 0x80 | ((us>>6)&0x3F));
 }