pio: can be included only peripheral-io.h 66/164766/1 accepted/tizen_5.0_unified tizen_5.0 accepted/tizen/5.0/unified/20181102.012051 accepted/tizen/unified/20171221.071355 submit/tizen/20171221.025332 submit/tizen_5.0/20181101.000001
authorSegwon <segwon.han@samsung.com>
Thu, 21 Dec 2017 02:38:12 +0000 (11:38 +0900)
committerSegwon Han <segwon.han@samsung.com>
Thu, 21 Dec 2017 02:39:20 +0000 (02:39 +0000)
Change-Id: I75b7bb51643b0c4d9bec30964b4855f4e022f289
Signed-off-by: Segwon <segwon.han@samsung.com>
gps-plugin/src/gps_plugin_replay.c

index 765e2c5..312ec1f 100644 (file)
@@ -33,9 +33,6 @@
 #include "setting.h"
 
 #include "peripheral_io.h"
-#include "peripheral_gdbus_i2c.h"
-#include "peripheral_common.h"
-#include "peripheral_internal.h"
 
 #define REPLAY_NMEA_SET_SIZE           4096
 #define REPLAY_NMEA_SENTENCE_SIZE      128
@@ -99,11 +96,11 @@ static int gps_uart_close()
 
        ret = peripheral_uart_close(uart_hndl);
        if (ret < 0) {
-               _E("GPS Uart Port Close failed !!");
+               LOG_PLUGIN(DBG_ERR, "GPS Uart Port Close failed !!");
                return FALSE;
        }
        uart_hndl = NULL;
-       _D("GPS Uart Port Close Successful !!");
+       LOG_PLUGIN(DBG_LOW, "GPS Uart Port Close Successful !!");
        return TRUE;
 }
 
@@ -113,35 +110,35 @@ static int gps_uart_open()
 
        ret = peripheral_uart_open(GPS_UART_PORT, &uart_hndl);
        if (ret < 0) {
-               _E("GPS Uart Port Open failed !!");
+               LOG_PLUGIN(DBG_ERR, "GPS Uart Port Open failed !!");
                return FALSE;
        }
-       _D("GPS Uart Port Open Successful !!");
+       LOG_PLUGIN(DBG_LOW, "GPS Uart Port Open Successful !!");
        ret = peripheral_uart_set_baud_rate(uart_hndl, PERIPHERAL_UART_BAUD_RATE_9600);
        if (ret < 0) {
-               _E("GPS Uart Port Open failed !!");
+               LOG_PLUGIN(DBG_ERR, "GPS Uart Port Open failed !!");
                goto ERROR;
        }
        ret = peripheral_uart_set_byte_size(uart_hndl, PERIPHERAL_UART_BYTE_SIZE_8BIT);
        if (ret < 0) {
-               _E("GPS Uart Set Mode failed !!");
+               LOG_PLUGIN(DBG_ERR, "GPS Uart Set Mode failed !!");
                goto ERROR;
        }
        ret = peripheral_uart_set_parity(uart_hndl, PERIPHERAL_UART_PARITY_NONE);
        if (ret < 0) {
-               _E("GPS Uart Set Mode failed !!");
+               LOG_PLUGIN(DBG_ERR, "GPS Uart Set Mode failed !!");
                goto ERROR;
        }
        ret = peripheral_uart_set_stop_bits(uart_hndl, PERIPHERAL_UART_STOP_BITS_1BIT);
        if (ret < 0) {
-               _E("GPS Uart Set Mode failed !!");
+               LOG_PLUGIN(DBG_ERR, "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 !!");
+               LOG_PLUGIN(DBG_ERR, "GPS Uart Set Flow Control Open failed !!");
                goto ERROR;
        }
        return TRUE;
@@ -156,7 +153,7 @@ static int gps_uart_read(char *buf, int len)
 
        /* ERROR if the length is less than 0 */
        if ((length = peripheral_uart_read(uart_hndl, (uint8_t *)buf, len)) < PERIPHERAL_ERROR_NONE)
-               _E("GPS Uart Read failed !!");
+               LOG_PLUGIN(DBG_ERR, "GPS Uart Read failed !!");
 
        return length;
 }
@@ -813,7 +810,7 @@ int gps_plugin_replay_gps_deinit(gps_failure_reason_t *reason_code)
        g_user_data = NULL;
 
        peripheral_uart_close(uart_hndl);
-       _D("GPS Uart Port Close Successful !!");
+       LOG_PLUGIN(DBG_LOW, "GPS Uart Port Close Successful !!");
 
        return TRUE;
 }