zte's code,first commit
Change-Id: I9a04da59e459a9bc0d67f101f700d9d7dc8d681b
diff --git a/ap/app/zte_log_agent/port_com.h b/ap/app/zte_log_agent/port_com.h
new file mode 100644
index 0000000..b198331
--- /dev/null
+++ b/ap/app/zte_log_agent/port_com.h
@@ -0,0 +1,67 @@
+/**
+ * ±¾³ÌÐò·ûºÏGPLÌõÔ¼
+ * Ò»×é²Ù×÷´®¿ÚµÄº¯Êý
+ * Beneboy 2003-5-16
+ */
+
+#ifndef comH
+#define comH
+
+
+typedef struct
+{
+ char prompt; // prompt after reciving data
+ int baudrate; // baudrate
+ char databit; // data bits, 5, 6, 7, 8
+ char debug; // debug mode, 0: none, 1: debug
+ char echo; // echo mode, 0: none, 1: echo
+ char fctl; // flow control, 0: none, 1: hardware, 2: software
+ char tty; // tty: 0, 1, 2, 3, 4, 5, 6, 7
+ char parity; // parity 0: none, 1: odd, 2: even
+ char stopbit; // stop bits, 1, 2
+ int reserved; // reserved, must be zero
+} portinfo_t, *pportinfo_t;
+
+
+/**
+ * ´ò¿ª´®¿Ú, ·µ»ØÎļþÃèÊö·û
+ * pportinfo: ´ýÉèÖõĴ®¿ÚÐÅÏ¢
+ */
+int PortOpen(pportinfo_t pportinfo,int mode);
+
+/**
+ * ¶Ë¿Ú³õʼ»¯
+ */
+int PortInit(int mode);
+/**
+ * ÉèÖô®¿Ú
+ * fdcom: ´®¿ÚÎļþÃèÊö·û, pportinfo: ´ýÉèÖõĴ®¿ÚÐÅÏ¢
+ */
+int PortSet(int fd);
+/**
+ * ¹Ø±Õ´®¿Ú
+ * fdcom: ´®¿ÚÎļþÃèÊö·û
+ */
+void PortClose(int fd);
+
+/**
+ * PortSend
+ * fd: ´®¿ÚÃèÊö·û,
+ * data: ´ý·¢ËÍÊý¾ÝÖ¸Õë
+ * datalen: Êý¾Ý³¤¶È
+ * ·µ»ØÊµ¼Ê·¢Ëͳ¤¶È
+ */
+int PortSend(int fd, unsigned char* data, int datalen);
+
+/**
+ * PortRecv
+ * ²ÎÊý£º
+ * fd: ´®¿ÚÃèÊö·û,
+ * data: ´ý½ÓÊÕÊý¾ÝÖ¸Õë
+ * datalen: Êý¾Ý³¤¶È
+ * ·µ»ØÊµ¼Ê¶ÁÈëµÄ×Ö½ÚÊý
+ */
+int PortRecv(int fd, unsigned char* data, int datalen);
+
+#endif
+