Browse Source

Show running task with LCD and LEDs

DricomDragon 5 years ago
parent
commit
a502b853a9
1 changed files with 13 additions and 4 deletions
  1. 13 4
      prog/sources/user-tasks.cpp

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

@@ -3,22 +3,31 @@
 static uint64_t gStack1 [64] ;
 
 static void task1 (USER_MODE) {
+	digitalWrite(L0_LED, true);
 	for (unsigned int i(0); i < 20; i++) {
-		digitalToggle(L0_LED);
-		printChar (MODE_ '>') ;
+		printChar (MODE_ '1') ;
+
+		digitalWrite(L0_LED, false);
 		waitDuring(MODE_ 500);
+		digitalWrite(L0_LED, true);
 	}
+
+	digitalWrite(L0_LED, false);
 }
 
 
 static uint64_t gStack2 [64] ;
 
 static void task2 (USER_MODE) {
+	digitalWrite(L1_LED, true);
 	for (unsigned int i(0); i < 20; i++) {
-		digitalToggle(L1_LED);
-		printChar (MODE_ '<') ;
+		printChar (MODE_ '2') ;
+
+		digitalWrite(L1_LED, false);
 		waitDuring(MODE_ 400);
+		digitalWrite(L1_LED, true);
 	}
+	digitalWrite(L1_LED, false);
 }