ibmpc: Remove PROTOCOL_XT_ERROR
This isn't needed as long as data line is read in proper timing. Current ibmpc ISR has seemed to work well for reading data line so far.
This commit is contained in:
parent
b46e3ff09e
commit
4b42f5c1b7
2 changed files with 6 additions and 30 deletions
|
|
@ -251,13 +251,12 @@ inline void IBMPC::isr(void)
|
|||
// x x x x x x x x | *1 0 0 0 0 0 0 0 midway(8 bits received)
|
||||
// b6 b5 b4 b3 b2 b1 b0 1 | 0 *1 0 0 0 0 0 0 XT_IBM-midway ^1
|
||||
// b7 b6 b5 b4 b3 b2 b1 b0 | 0 *1 0 0 0 0 0 0 AT-midway ^1
|
||||
// b7 b6 b5 b4 b3 b2 b1 b0 | 1 *1 0 0 0 0 0 0 XT_Clone-done ^3
|
||||
// b6 b5 b4 b3 b2 b1 b0 1 | 1 *1 0 0 0 0 0 0 XT_IBM-error ^3
|
||||
// b7 b6 b5 b4 b3 b2 b1 b0 | 1 *1 0 0 0 0 0 0 XT_Clone-done
|
||||
// pr b7 b6 b5 b4 b3 b2 b1 | 0 0 *1 0 0 0 0 0 AT-midway[b0=0]
|
||||
// b7 b6 b5 b4 b3 b2 b1 b0 | 1 0 *1 0 0 0 0 0 XT_IBM-done ^2
|
||||
// pr b7 b6 b5 b4 b3 b2 b1 | 1 0 *1 0 0 0 0 0 AT-midway[b0=1] ^2
|
||||
// b7 b6 b5 b4 b3 b2 b1 b0 | 1 1 *1 0 0 0 0 0 XT_IBM-error-done
|
||||
// x x x x x x x x | 0 1 *1 0 0 0 0 0 illegal
|
||||
// x x x x x x x x | 1 1 *1 0 0 0 0 0 illegal
|
||||
// st pr b7 b6 b5 b4 b3 b2 | b1 b0 0 *1 0 0 0 0 AT-done
|
||||
// x x x x x x x x | x x 1 *1 0 0 0 0 illegal
|
||||
// all other states than above illegal
|
||||
|
|
@ -273,34 +272,11 @@ inline void IBMPC::isr(void)
|
|||
// midway
|
||||
goto NEXT;
|
||||
break;
|
||||
case 0b11000000: // ^3
|
||||
{
|
||||
uint8_t us = 100;
|
||||
// wait for rising and falling edge of b7 of XT_IBM
|
||||
if (!protocol) {
|
||||
while (!(IBMPC_CLOCK_PIN & clock_mask) && us) { wait_us(1); us--; }
|
||||
while ( (IBMPC_CLOCK_PIN & clock_mask) && us) { wait_us(1); us--; }
|
||||
} else if (protocol == IBMPC_PROTOCOL_XT_CLONE) {
|
||||
us = 0;
|
||||
}
|
||||
|
||||
if (us) {
|
||||
// XT_IBM-error: read start(0) as 1
|
||||
goto NEXT;
|
||||
} else {
|
||||
// XT_Clone-done
|
||||
isr_debug = isr_state;
|
||||
isr_state = isr_state>>8;
|
||||
protocol = IBMPC_PROTOCOL_XT_CLONE;
|
||||
goto DONE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0b11100000:
|
||||
// XT_IBM-error-done
|
||||
case 0b11000000:
|
||||
// XT_Clone-done
|
||||
isr_debug = isr_state;
|
||||
isr_state = isr_state>>8;
|
||||
protocol = IBMPC_PROTOCOL_XT_ERROR;
|
||||
protocol = IBMPC_PROTOCOL_XT_CLONE;
|
||||
goto DONE;
|
||||
break;
|
||||
case 0b10100000: // ^2
|
||||
|
|
@ -369,6 +345,7 @@ inline void IBMPC::isr(void)
|
|||
goto DONE;
|
||||
break;
|
||||
case 0b01100000:
|
||||
case 0b11100000:
|
||||
case 0b00110000:
|
||||
case 0b10110000:
|
||||
case 0b01110000:
|
||||
|
|
|
|||
|
|
@ -75,7 +75,6 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#define IBMPC_PROTOCOL_XT 0x20
|
||||
#define IBMPC_PROTOCOL_XT_IBM 0x21
|
||||
#define IBMPC_PROTOCOL_XT_CLONE 0x22
|
||||
#define IBMPC_PROTOCOL_XT_ERROR 0x23
|
||||
|
||||
// Error numbers
|
||||
#define IBMPC_ERR_NONE 0
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue