Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Eurobot_2012_Secondary by
system.cpp
00001 #include "system.h" 00002 00003 //Defining the externs 00004 DigitalOut OLED1(LED1); 00005 DigitalOut OLED2(LED2); 00006 DigitalOut OLED3(LED3); 00007 DigitalOut OLED4(LED4); 00008 00009 //nop style wait function 00010 void nopwait(int ms){ 00011 while(ms--) 00012 for (volatile int i = 0; i < 24000; i++); 00013 } 00014 00015 float cpupercent; //defining the extern 00016 void measureCPUidle (void const* arg) { 00017 00018 Timer timer; 00019 cpupercent = 0; //defined in system.h 00020 00021 while(1) { 00022 timer.reset(); 00023 timer.start(); 00024 wait(1); 00025 00026 int thistime = timer.read_us()-1000000; 00027 cpupercent = thistime; 00028 } 00029 }
Generated on Tue Jul 12 2022 21:02:13 by
1.7.2
