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.
Dependencies: mbed DRV88255 TextLCD Ping mbed-rtos
Controller.h
- Committer:
- sbouber1
- Date:
- 2016-06-10
- Revision:
- 10:fd4670ec0806
- Parent:
- 9:b3674516729d
- Child:
- 38:930469a33001
File content as of revision 10:fd4670ec0806:
#ifndef __CONTROLLER_H__
#define __CONTROLLER_H__
#include <string>
#include "rtos.h"
class Controller {
public:
Controller(bool threaded, int interval_ms);
virtual void update() = 0;
virtual std::string get_name() = 0;
bool is_threaded();
void run();
int get_interval_ms();
void set_priority(osPriority priority);
osPriority get_priority();
private:
bool threaded;
bool has_spawned;
Thread *ctrl_thread;
int interval_ms;
osPriority prio;
static void thread_stub(void const *args);
};
#endif