blob: 187a7e9259468d845bfac33f31a4ab690685a27c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#ifndef DEF_TIMER_CLASS
#define DEF_TIMER_CLASS
#include <Devices/Device.proto.h>
class Timer : public Device {
private:
u8int m_frequency;
u8int m_ticks;
u32int m_seconds;
public:
Timer(u8int frequency = 100);
void setFrequency(u8int frequency);
String getClass();
String getName();
u32int uptime();//Returns seconds since init
u32int time(); //Returns miliseconds since init
void handleIRQ(registers_t registers, int irq);
};
#endif
|