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.
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 float cpupercent; //defining the extern 00010 void measureCPUidle (void const* arg) { 00011 00012 Timer timer; 00013 cpupercent = 0; //defined in system.h 00014 00015 while(1) { 00016 timer.reset(); 00017 timer.start(); 00018 wait(1); 00019 00020 int thistime = timer.read_us()-1000000; 00021 cpupercent = thistime; 00022 } 00023 }
Generated on Tue Jul 12 2022 22:48:38 by
