Eurobot2012_Primary
Dependencies: mbed Eurobot_2012_Primary
Diff: Eurobot_shared/system/system.cpp
- Revision:
- 25:143b19c1fb05
- Parent:
- 24:7a3906c2f5d5
- Child:
- 26:0995f61cb7b8
--- a/Eurobot_shared/system/system.cpp Fri May 04 05:23:45 2012 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -#include "system.h" - -//Defining the externs -DigitalOut OLED1(LED1); -DigitalOut OLED2(LED2); -DigitalOut OLED3(LED3); -DigitalOut OLED4(LED4); - -//nop style wait function -void nopwait(int ms){ -while(ms--) - for (volatile int i = 0; i < 24000; i++); -} - -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