mc146818a: add frequency to time source and convert to use time source
[qemupp.git] / include / io.hpp
blob76799c9a0fd35f9a42e1f8b32ad468e449bd2086
1 #ifndef IO_HPP
2 #define IO_HPP
4 #include "marshal.hpp"
5 #include <functional>
7 class Pin
9 public:
10 Pin();
11 Pin(bool init);
13 void raise(void);
14 void lower(void);
16 bool get(void);
17 void set(bool value);
19 void marshal(Marshaller *m, const char *name);
21 void add_edge_notifier(std::function<void (bool)> func);
23 private:
24 bool state;
25 bool has_edge_notifier;
26 std::function<void (bool)> notifier;
29 class InputPin : public Pin
33 class OutputPin : public Pin
37 #endif