Eurobot system lib
Embed:
(wiki syntax)
Show/hide line numbers
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
1.7.2