Eurobot system lib

Revision:
0:b35c6c9aad45
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/system.cpp	Thu Apr 26 19:40:58 2012 +0000
@@ -0,0 +1,23 @@
+#include "system.h"
+
+//Defining the externs
+DigitalOut     OLED1(LED1);
+DigitalOut     OLED2(LED2);
+DigitalOut     OLED3(LED3);
+DigitalOut     OLED4(LED4);
+
+float cpupercent; //defining the extern
+void measureCPUidle (void const* arg) {
+    
+    Timer timer;
+    cpupercent = 0; //defined in system.h
+    
+    while(1) {
+        timer.reset();
+        timer.start();
+        wait(1);
+        
+        int thistime = timer.read_us()-1000000;
+        cpupercent = thistime;
+    }
+}
\ No newline at end of file