[Feature][T108][task-view-1499] change gsw .h file

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: I678871907e2be939e6673ee09bfed88992013348
diff --git a/mbtk/include/gsw/gsw_uart_interface.h b/mbtk/include/gsw/gsw_uart_interface.h
new file mode 100755
index 0000000..037e8cc
--- /dev/null
+++ b/mbtk/include/gsw/gsw_uart_interface.h
@@ -0,0 +1,66 @@
+/**

+*  @file  : gsw_uart_interface.h

+*  @brief : soc uart api

+*  @date : 

+*  @author : 

+*  @version : v1.0

+*  @copyright Copyright(C) 2022,Gosuncnwelink

+*/

+#ifndef __GSW_UART_INTERFACE__H__

+#define __GSW_UART_INTERFACE__H__

+#include "gsw_hal_errcode.h"

+

+#if defined(__cplusplus)

+extern "C" {

+#endif

+/**

+ * @brief uart open

+ * @param [in] baudrate: baud rate of the UART frame

+ * @param [in] bits: bit of UART the frame

+ * @param [in] parity: parity of the UART frame

+ * @param [in] stop: stop bit of the UART frame

+ * @retval the UART handle

+  * @retval -1: fail

+ */

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

+

+/**

+ * @brief uart flush

+ * @param [in] fd: the gsw_uart_open return handle of UART

+ * @retval void

+ */

+void gsw_uart_flush(int fd);

+

+/**

+ * @brief uart close

+ * @param [in] fd: the gsw_uart_open return handle of UART

+ * @retval void

+ */

+void gsw_uart_close(int fd);

+

+/**

+ * @brief uart write

+ * @param [in] fd: the gsw_uart_open return handle of UART

+ * @param [in] buffer: the user send the data of UART

+ * @param [in] len: the user send the data length of UART

+ * @retval 0: success

+ * @retval other: fail

+ */

+int gsw_uart_write(int fd, const unsigned char *buffer, int len);

+

+/**

+ * @brief uart read

+ * @param [in] fd: the gsw_uart_open return handle of UART

+ * @param [out] buffer: the user read the data of UART

+ * @param [in] len: the user need read the data length of UART

+ * @param [in] timeout_ms: read data MAX timeout;ms

+ * @retval 0: success

+ * @retval other: fail

+ */

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

+

+#if defined(__cplusplus)

+}

+#endif

+#endif

+