Change peripheral io UART APIs 24/152224/1 accepted/tizen/unified/20170926.165631 submit/tizen/20170926.023501
authorkibak.yoon <kibak.yoon@samsung.com>
Fri, 22 Sep 2017 11:41:53 +0000 (20:41 +0900)
committerkibak.yoon <kibak.yoon@samsung.com>
Mon, 25 Sep 2017 09:34:32 +0000 (18:34 +0900)
Change-Id: Ic5c5c26c88720c270188cfde10d777ad66297e32
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
gps-plugin/src/gps_plugin_replay.c

index aea4183..c15f2eb 100644 (file)
@@ -120,27 +120,31 @@ static int gps_uart_open()
                return FALSE;
        }
        _D("GPS Uart Port Open Successful !!");
-       ret = peripheral_uart_set_baudrate(uart_hndl, PERIPHERAL_UART_BAUDRATE_9600);
+       ret = peripheral_uart_set_baud_rate(uart_hndl, PERIPHERAL_UART_BAUD_RATE_9600);
        if (ret < 0) {
                _E("GPS Uart Port Open failed !!");
                goto ERROR;
        }
-       ret = peripheral_uart_set_mode(uart_hndl,
-                       PERIPHERAL_UART_BYTESIZE_8BIT,
-                       PERIPHERAL_UART_PARITY_NONE,
-                       PERIPHERAL_UART_STOPBITS_1BIT);
+       ret = peripheral_uart_set_byte_size(uart_hndl, PERIPHERAL_UART_BYTE_SIZE_8BIT);
        if (ret < 0) {
                _E("GPS Uart Set Mode failed !!");
                goto ERROR;
        }
-       ret = peripheral_uart_set_flowcontrol(uart_hndl, true, false);
+       ret = peripheral_uart_set_parity(uart_hndl, PERIPHERAL_UART_PARITY_NONE);
        if (ret < 0) {
-               _E("GPS Uart Set Flow Control Open failed !!");
+               _E("GPS Uart Set Mode failed !!");
                goto ERROR;
        }
-       ret = peripheral_uart_flush(uart_hndl);
+       ret = peripheral_uart_set_stop_bits(uart_hndl, PERIPHERAL_UART_STOP_BITS_1BIT);
        if (ret < 0) {
-               _E("GPS Uart Flush failed !!");
+               _E("GPS Uart Set Mode failed !!");
+               goto ERROR;
+       }
+       ret = peripheral_uart_set_flow_control(uart_hndl,
+                       PERIPHERAL_UART_HARDWARE_FLOW_CONTROL_AUTO_RTSCTS,
+                       PERIPHERAL_UART_SOFTWARE_FLOW_CONTROL_NONE);
+       if (ret < 0) {
+               _E("GPS Uart Set Flow Control Open failed !!");
                goto ERROR;
        }
        return TRUE;