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:
Gregory Alexander 2001-06-10 23:53:09 +00:00
parent 56b670a371
commit af1b064007
1 changed files with 12 additions and 1 deletions

View File

@ -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;
}
}
};