Browse Source

Change task behaviour to print > and blink led

DricomDragon 5 năm trước cách đây
mục cha
commit
9010be45f9
1 tập tin đã thay đổi với 4 bổ sung16 xóa
  1. 4 16
      prog/sources/user-tasks.cpp

+ 4 - 16
prog/sources/user-tasks.cpp

@@ -2,23 +2,11 @@
 
 static uint64_t gStack1 [64] ;
 
-
-static uint32_t gDisplayTime = 0 ;
-
 static void task1 (USER_MODE) {
-	int counter(0);
-	while (counter < 4) {
-		if (gDisplayTime <= millis (MODE)) {
-			const uint32_t s = systick (MODE) ;
-			gotoLineColumn (MODE_ 1, 0) ;
-			printUnsigned (MODE_ s) ;
-			gotoLineColumn (MODE_ 2, 0) ;
-			printUnsigned (MODE_ millis (MODE)) ;
-			gotoLineColumn (MODE_ 3, 0) ;
-			printUnsigned64 (MODE_ micros (MODE)) ;
-			gDisplayTime += 1000 ;
-			counter ++;
-		}
+	for (unsigned int i(0); i < 20; i++) {
+		digitalToggle(L0_LED);
+		printChar (MODE_ '>') ;
+		busyWaitDuring(MODE_ 500);
 	}
 }