Added a few access functions to pit, also changed
the constructor to an init function so that it can be called at any time.
This commit is contained in:
parent
56b670a371
commit
af1b064007
@ -159,7 +159,7 @@ private:
|
||||
}
|
||||
|
||||
public:
|
||||
pit_82C54 (void) {
|
||||
void init (void) {
|
||||
Bit8u i;
|
||||
for(i=0;i<3;i++) {
|
||||
counter[i].read_state=LSByte;
|
||||
@ -181,6 +181,9 @@ public:
|
||||
counter[i].status_latched=0;
|
||||
}
|
||||
}
|
||||
pit_82C54 (void) {
|
||||
init();
|
||||
}
|
||||
|
||||
void clock(Bit8u cnum) {
|
||||
if(cnum>MAX_COUNTER) {
|
||||
@ -569,5 +572,13 @@ public:
|
||||
return counter[cnum].OUT;
|
||||
}
|
||||
}
|
||||
bool read_GATE(Bit8u cnum) {
|
||||
if(cnum>MAX_COUNTER) {
|
||||
BX_ERROR(("Counter number incorrect in 82C54 read_GATE"));
|
||||
return 0;
|
||||
} else {
|
||||
return counter[cnum].GATE;
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user