瀏覽代碼

更新CPU工程驱动代码逻辑
1.优化CPU工程WDT驱动逻辑。(选择在UI每刷一帧喂一次狗)

helen 4 月之前
父節點
當前提交
30f92ceb21
共有 1 個文件被更改,包括 16 次插入16 次删除
  1. 16 16
      amt630hv160-freertos-beta/lib/awtk/awtk/src/main_loop/main_loop_raw.inc

+ 16 - 16
amt630hv160-freertos-beta/lib/awtk/awtk/src/main_loop/main_loop_raw.inc

@@ -62,8 +62,8 @@ static ret_t lcd_mem_swap(lcd_t* lcd) {
 		lcd_mem_set_offline_fb(mem, mem->online_fb);
 		lcd_mem_set_online_fb(mem, offline_fb);
 	}
-	
-	return RET_OK;	
+	ark_wdt_keepalive();
+	return RET_OK;
 }
 
 lcd_t* platform_create_lcd(wh_t w, wh_t h) {
@@ -121,7 +121,7 @@ int XM_TpEventProc (unsigned int tp_event, unsigned int xPos, unsigned int yPos,
 	int ret;
 	if(win_width == 0 || win_height == 0)
 		return 0;
-	
+
 	EnterCriticalSection (&event_critical_section);
 	if(ticket == 0)
 		ticket = XM_GetTickCount();
@@ -133,7 +133,7 @@ int XM_TpEventProc (unsigned int tp_event, unsigned int xPos, unsigned int yPos,
 		}
 		else
 		{
-			XM_EVENT *event;	
+			XM_EVENT *event;
 			if (tp_event == XM_EVENT_TOUCHDOWN)
 			{
 				if (tp_clicked)
@@ -158,16 +158,16 @@ int XM_TpEventProc (unsigned int tp_event, unsigned int xPos, unsigned int yPos,
 			event->tp.type = tp_event;
 			event->tp.x = xPos;
 			event->tp.y = yPos;
-			
+
 			eventEPos ++;
-			
+
 			// ?????
 			OS_SignalCSema (&event_csema);
-			
+
 			ret = 1;
-		}	
+		}
 	} while (0);
-	
+
 	LeaveCriticalSection (&event_critical_section);
 	return ret;
 }
@@ -222,7 +222,7 @@ int XM_WaitEvent (XM_EVENT *event, unsigned int timeout) {
 		}
 		LeaveCriticalSection (&event_critical_section);
 	}
-	
+
 	return ret;
 }
 
@@ -261,7 +261,7 @@ static ret_t main_loop_xm_dispatch_tp_event(main_loop_simple_t* loop, XM_EVENT*
 				event.e.time = xm_event->tp.timestamp;
 
 #ifdef ENABLE_TOUCH_UP_LONG_PERIOD_RESPONSE
-			/* 
+			/*
 			 *	When fast touch, the interval of press and release may be too short to display on LCD,
 			 *	in which case enable ENABLE_TOUCH_UP_LONG_PERIOD_RESPONSE can display a distinct touch down response.
 			 */
@@ -287,7 +287,7 @@ static ret_t main_loop_xm_dispatch_tp_event(main_loop_simple_t* loop, XM_EVENT*
 		default:
 			break;
 		}
-		
+
 	return RET_OK;
 }
 
@@ -327,7 +327,7 @@ static ret_t main_loop_xm_dispatch_key_event(main_loop_simple_t* loop, XM_EVENT*
 		default:
 			break;
 		}
-	
+
 	return RET_OK;
 }
 
@@ -387,17 +387,17 @@ static ret_t main_loop_raw_dispatch(main_loop_simple_t* loop) {
 	return RET_OK;
 
 }
-void * init_Semaphore(int width, int height) 
+void * init_Semaphore(int width, int height)
 {
   OS_CreateCSema (&event_csema, 0);
-  InitializeCriticalSection (&event_critical_section); 
+  InitializeCriticalSection (&event_critical_section);
   eventBPos = eventEPos = 0;
   win_width = width;
   win_height = height;
   tp_clicked = 0;
   return (void *)1;
 }
-void deinit_Semaphore(void) 
+void deinit_Semaphore(void)
 {
 	DeleteCriticalSection (&event_critical_section);
 	OS_DeleteCSema (&event_csema);