Bug fix: check if vm exists
[avr-sim.git] / Port.h
blob7d4d001a4b81a0c22096851f6aeb09f5b784dfa3
1 #ifndef AVR_PORT_H
2 #define AVR_PORT_H
4 #include "Hardware.h"
5 #include <string>
7 namespace avr {
9 class Register;
11 class Port : public Hardware {
12 public:
13 Port(Bus & bus, const std::string & name, unsigned int mask);
14 ~Port();
16 public:
17 bool attachReg(const char *name, IORegister *reg);
18 void regChanged( IORegister *reg );
19 void step();
21 private:
22 std::string name;
23 unsigned int mask;
25 private:
26 Register *port;
27 Register *pin;
28 Register *ddr;
33 #endif /*AVR_PORT_H*/