[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit
Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/app/ccapp/soft_timer.h b/ap/app/ccapp/soft_timer.h
new file mode 100644
index 0000000..6a72de0
--- /dev/null
+++ b/ap/app/ccapp/soft_timer.h
@@ -0,0 +1,80 @@
+/*********************************************************************************
+ * °æ±¾ËùÓÐ (C)2008ÖÐÐËͨѶ¹É·ÝÓÐÏÞ¹«Ë¾
+ *
+ * ¹¦ÄÜ : ¶¨ÒåͨÓõĶ¨Ê±Æ÷¿â
+ * ×÷Õß : Ö£ÓñæÃ
+ * °æ±¾ : V1.0
+ * Íê³ÉÈÕÆÚ : 2008.05.05
+ * ÆäËü˵Ã÷ :
+ * ²ÎÊý :
+ * ÊäÈë :
+ * Êä³ö :
+ * ¸ü¸Ä¼Ç¼ :
+ * ʱ¼ä ×÷Õß ÄÚÈÝ
+ *-----------------------------------------------------------------------
+ * 08/05/05 Ö£ÓñæÃ ´´½¨
+ *
+ *
+***********************************************************************************/
+
+#ifndef _SOFT_TIMER_H_
+#define _SOFT_TIMER_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "message.h"
+//#include "errorcode.h"
+//#include "zte_log.h"
+
+/*¶¨ÒåÓ²¼þ¶¨Ê±Æ÷µÄ²½³¤£¬10ms*/
+#define TIMER_STEP 10
+
+/*¶¨ÒåÈí¼þ¶¨Ê±Æ÷µÄ×î´ó¸öÊý*/
+#define MAX_SOFT_TIMER_NUM 32
+
+/*¶¨Ê±Æ÷ÀàÐͱê־λucFlagµÄºê*/
+#define TIMER_FLAG_ONCE 0 /*´Ë¶¨Ê±Æ÷Ö»´¥·¢Ò»´Î*/
+#define TIMER_FLAG_RESTART 1 /*´Ë¶¨Ê±Æ÷³ÖÐøÓÐЧ*/
+
+
+/*if the thread of soft timer is exist, 0 means not exist*/
+#define SOFT_TIMER_THREAD_NULL 0
+#define SOFT_TIMER_THREAD_EXIST 1
+
+/*¶¨ÒåÈí¼þ¶¨Ê±Æ÷µÄÊý¾Ý½á¹¹*/
+typedef struct tagSOFT_TIMER
+{
+ struct tagSOFT_TIMER *prev;
+ struct tagSOFT_TIMER *next;
+ int used;
+ int done;
+ int timerValue;
+
+ USHORT usTimerID; /*¶¨Ê±Æ÷ID,ÓÃÀ´Çø·Ö²»Í¬µÄÈí¼þ¶¨Ê±Æ÷, 0±êʶ*/
+ UCHAR ucFlag; /*¶¨Ê±Æ÷ÀàÐͱê־λ*/
+ UCHAR ucReserved; /*±£Áô×Ö¶Î*/
+ ULONG ulCurInterval; /*µ±Ç°¶¨Ê±Æ÷³¬Ê±Ê£Óàʱ¼ä£¬µ¥Î» ºÁÃë(×¢Òâ²»ÊÇ΢Ãë)£¬±ØÐ붨ÒåΪӲ¼þ¶¨Ê±Æ÷²½³¤µÄ±¶Êý*/
+ ULONG ulNextInterval; /*³¬Ê±ºó¶¨Ê±Æ÷ÖØÖõļä¸ô£¬µ¥Î» ºÁÃë(×¢Òâ²»ÊÇ΢Ãë)*/
+ void * (*procCallBack)(void *); /*¶¨Ò嶨ʱÆ÷³¬Ê±ºóµÄ»Øµ÷´¦Àíº¯ÊýÖ¸Õë*/
+ void *args; /*¶¨Ò嶨ʱÆ÷³¬Ê±ºóµÄ»Øµ÷´¦Àíº¯ÊýµÄ²ÎÊý*/
+}SOFT_TIMER;
+
+
+/*Íⲿ½Ó¿Úº¯ÊýÉùÃ÷*/
+LONG CreateSoftTimer(USHORT usTimerID,
+ UCHAR ucFlag,
+ ULONG ulInterval,
+ void * (*procCallBack)(void *),
+ void *args);
+
+LONG DeleteSoftTimer(USHORT usTimerID);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+