#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
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;
}
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;
/* 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;
}
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;
}