Erick / Mbed 2 deprecated ICE_BLE_TEST

Dependencies:   NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed

Fork of ICE by Erick

Revision:
71:34856d21f2bf
Parent:
67:49f266601d83
Child:
74:03ccf04998b5
--- a/src/CommandParser/cmd.cpp	Fri Sep 16 17:54:51 2016 +0000
+++ b/src/CommandParser/cmd.cpp	Fri Sep 16 20:54:07 2016 +0000
@@ -658,6 +658,17 @@
 void cmd_stack(int argc, char **argv)
 {
     vector<pair<string, Thread*> > taskList;
+    
+    const char *mapper[] = { "Inactive",
+                             "Ready",
+                             "Running",
+                             "WaitingDelay",
+                             "WaitingInterval",
+                             "WaitingOr",
+                             "WaitingAnd",
+                             "WaitingSempahore",
+                             "WaitingMailbox",
+                             "WaitingMutex" }; 
 
     //simply add your task to the list...
     taskList.push_back(make_pair((string)"AnalyticsLogger",  GLOBAL_analyticsLogger_thread));
@@ -670,12 +681,14 @@
 
     for ( vector<pair<string, Thread*> >::iterator pos = taskList.begin();
             pos != taskList.end(); ++ pos) {
-        printf("\r %-32s size/free/used/max = %u/%u/%u/%u\n",
+        printf("\r %-32s size/free/used/max = %u/%u/%u/%u\tpri=%-8u state=%-20s\n",
                pos->first.c_str(),
                pos->second->stack_size(),
                pos->second->free_stack(),
                pos->second->used_stack(),
-               pos->second->max_stack());
+               pos->second->max_stack(),
+               pos->second->get_priority(),
+               mapper[pos->second->get_state()]);
     }
 
     printf("\r\n");