demo new haven display

Dependencies:   LCD Menu ButtonCtrl TimeManagement EventLog AddressMap emic2

ESCM 2000 Control and Display application provides interface for the LPC1768 processor boards with the ECSM 2000 system.

This application implements SW interface : - RX 485 Receive from physical system - RX 485 Interface to send toECOM / ESCM board - CAN Interface to send to ECOM / ESCM board - 4x40 LCD with menu controls - RTC configuration -EMIC2 Sound Card - GPIO Extender to push buttons etc

Revision:
6:010ceb99f7b0
Parent:
5:65f21c0b6b79
--- a/stats_report.h	Thu Sep 12 11:28:26 2019 +0000
+++ b/stats_report.h	Tue Sep 17 13:48:57 2019 +0000
@@ -8,6 +8,27 @@
 
 #include "mbed.h"
 
+typedef struct {
+   Timer timer;
+   uint32_t counter;
+   uint64_t timeStamp;
+   uint64_t lastTimeStamp;
+   uint32_t deltaTime;
+   uint32_t deltaTimeMax;
+   uint32_t deltaTimeMin;
+   uint32_t deltaTimeAve;
+   uint32_t cycleTime;
+   uint32_t cycleTimeMax;
+   uint32_t cycleTimeMin;
+   uint32_t cycleTimeAve;
+} OsPerfData_t;
+
+typedef struct {
+   OsPerfData_t task[10];
+} OsTaskPerfData_t;  
+
+
+
 /**
  *  System Reporting library. Provides runtime information on device:
  *      - CPU sleep, idle, and wake times
@@ -79,7 +100,7 @@
     {
         static uint64_t prev_idle_time = 0;
 
-        printf("================= CPU STATS =================\r\n");
+        fprintf(stdout,"================= CPU STATS =================\r\n");
 
         // Collect and print cpu stats
         mbed_stats_cpu_get(&cpu_stats);
@@ -89,7 +110,7 @@
         uint8_t usage = 100 - ((diff * 100) / (sample_time_ms * 1000));  // usec;;
         prev_idle_time = cpu_stats.idle_time;
 
-        printf("Idle: %d%% Usage: %d%% \r\n", idle, usage);
+        fprintf(stdout,"Idle: %d%% Usage: %d%% \r\n", idle, usage);
     }
 
     /**
@@ -99,13 +120,14 @@
      */
     void report_heap_stats(void)
     {
-        printf("================ HEAP STATS =================\r\n");
+        fprintf(stdout,"================ HEAP STATS =================\r\n");
 
         // Collect and print heap stats
         mbed_stats_heap_get(&heap_stats);
 
-        printf("Current heap: %lu\r\n", heap_stats.current_size);
-        printf("Max heap size: %lu\r\n", heap_stats.max_size);
+        fprintf(stdout,"Current heap: %lu\r\n", heap_stats.current_size);
+        
+        fprintf(stdout,"Max heap size: %lu\r\n", heap_stats.max_size);
     }
 
     /**
@@ -113,20 +135,25 @@
      */
     void report_thread_stats(void)
     {
-        printf("================ THREAD STATS ===============\r\n");
+        
+        fprintf(stdout,"================ THREAD STATS ===============\r\n");
 
         // Collect and print running thread stats
         int count = mbed_stats_thread_get_each(thread_stats, max_thread_count);
 
         for (int i = 0; i < count; i++) {
-            printf("ID: 0x%lx \r\n",        thread_stats[i].id);
-            printf("Name: %s \r\n",         thread_stats[i].name);
-            printf("State: %ld \r\n",       thread_stats[i].state);
-            printf("Priority: %ld \r\n",    thread_stats[i].priority);
-            printf("Stack Size: %ld \r\n",  thread_stats[i].stack_size);
-            printf("Stack Space: %ld \r\n", thread_stats[i].stack_space);
+            fprintf(stdout,"ID: 0x%lx \r\n",        thread_stats[i].id);
+            fprintf(stdout,"Name: %s \r\n",         thread_stats[i].name);
+            fprintf(stdout,"State: %ld \r\n",       thread_stats[i].state);
+            fprintf(stdout,"Priority: %ld \r\n",    thread_stats[i].priority);
+            fprintf(stdout,"Stack Size: %ld \r\n",  thread_stats[i].stack_size);
+            fprintf(stdout,"Stack Space: %ld \r\n", thread_stats[i].stack_space);
         }
     }
+    
+    
+
+
 };
 
 #endif // STATS_REPORT_H