From fe7ae4bcb1b6729ce1bbc2dc8731a29fe5734a1a Mon Sep 17 00:00:00 2001 From: Segwon Date: Thu, 21 Dec 2017 11:38:12 +0900 Subject: [PATCH] pio: can be included only peripheral-io.h Change-Id: I75b7bb51643b0c4d9bec30964b4855f4e022f289 Signed-off-by: Segwon --- gps-plugin/src/gps_plugin_replay.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/gps-plugin/src/gps_plugin_replay.c b/gps-plugin/src/gps_plugin_replay.c index 23e6450..fe4b724 100644 --- a/gps-plugin/src/gps_plugin_replay.c +++ b/gps-plugin/src/gps_plugin_replay.c @@ -36,9 +36,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 @@ -102,11 +99,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; } @@ -116,35 +113,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; @@ -159,7 +156,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; } @@ -838,7 +835,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; } -- 2.7.4