[Feature][T108][system][task-view-1692]Merged gsw hal code

Only Configure: No
Affected branch: GSW_V1453
Affected module: libgsw
Is it affected on IC: only ASR
Self-test: yes
Doc Update: no

Change-Id: I7fb669b6afc6e2f92a1e86ec8543498eb73120b4
diff --git a/mbtk/libgsw_lib/gsw_uart_interface.c b/mbtk/libgsw_lib/gsw_uart_interface.c
index d16fa69..e09aefd 100755
--- a/mbtk/libgsw_lib/gsw_uart_interface.c
+++ b/mbtk/libgsw_lib/gsw_uart_interface.c
@@ -13,6 +13,8 @@
 

 #include "gsw_uart_interface.h"

 

+#define MODEM_CONNECT_MCU_PORT      "/dev/ttyS1"

+

 #ifndef LOG_ERR_LEVEL

 #define LOG_ERR_LEVEL  3      /* error conditions */

 #endif

@@ -138,9 +140,6 @@
     return GSW_HAL_SUCCESS;

 }

 

-

-

-

 int32_t gsw_uart_open_ex(int8_t *port, gsw_hal_uart_baudrate baudrate, uint32_t bits, int8_t parity, uint32_t stop)

 {

     if (handle())

@@ -303,7 +302,7 @@
     return fd;

 }

 

-void gsw_uart_flush(int fd)

+void gsw_uart_flush(int32_t fd)

 {

     if (handle())

         return;

@@ -317,7 +316,6 @@
     //return GSW_HAL_SUCCESS;

 }

 

-

 int gsw_uart_read(int fd, unsigned char *buffer, int len, int timeout_ms)

 {

     if (handle())

@@ -407,9 +405,6 @@
     return GSW_HAL_SUCCESS;

 }

 

-

-

-

 void gsw_uart_close(int fd)

 {

     if (handle())

@@ -434,3 +429,7 @@
     //return GSW_HAL_SUCCESS;

 }

 

+int gsw_uart_open(unsigned int baudrate,  unsigned int bits, char parity, unsigned int stop)

+{

+    return gsw_uart_open_ex((int8_t *)MODEM_CONNECT_MCU_PORT, (gsw_hal_uart_baudrate)baudrate, bits, parity, stop);

+}