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 Eurobot2013 by
Diff: system/system.h
- Revision:
- 10:2bd9f4e02b74
- Parent:
- 9:08552997b544
- Child:
- 11:5ba926692210
diff -r 08552997b544 -r 2bd9f4e02b74 system/system.h
--- a/system/system.h Wed Nov 14 17:15:53 2012 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-
-#ifndef SYSTEM_H
-#define SYSTEM_H
-
-#include "globals.h"
-#include "rtos.h"
-
-//Declaring the onboard LED's for everyone to use
-extern DigitalOut OLED1;//(LED1);
-extern DigitalOut OLED2;//(LED2);
-extern DigitalOut OLED3;//(LED3);
-extern DigitalOut OLED4;//(LED4);
-
-//nop style wait function
-void nopwait(int ms);
-
-//a type which is a pointer to a rtos thread function
-typedef void (*tfuncptr_t)(void const *argument);
-
-//---------------------
-//Signal ticker stuff
-#define SIGTICKARGS(thread, signal) \
- (tfuncptr_t) (&Signalsetter::callback), osTimerPeriodic, (void*)(new Signalsetter(thread, signal))
-
-class Signalsetter {
-public:
- Signalsetter(Thread& inthread, int insignal) :
- thread(inthread) {
- signal = insignal;
- //pc.printf("ptr saved as %#x \r\n", (int)(&(inthread)));
- }
-
- static void callback(void* thisin) {
-
- Signalsetter* fthis = (Signalsetter*)thisin;
- //pc.printf("callback will signal thread object at %#x \r\n", (int)(&(fthis->thread)));
- fthis->thread.signal_set(fthis->signal);
- //delete fthis; //this is useful for single fire tickers!
- }
-
-private:
- Thread& thread;
- int signal;
-};
-
-//---------------------
-//cpu usage measurement function
-extern float cpupercent;
-void measureCPUidle (void const* arg);
-
-#endif
