I1620: Add optional CPS polling to TTY input activities

This commit is contained in:
Mark Pizzolato 2017-06-20 05:15:09 -07:00
parent 8560c4a32f
commit 5d50bfdfdc

View file

@ -95,12 +95,13 @@ UNIT tty_unit[] = {
}; };
REG tty_reg[] = { REG tty_reg[] = {
{ FLDATA (UNLOCK, tti_unlock, 0) }, { FLDATAD (UNLOCK, tti_unlock, 0, "keyboard unlocked flag") },
{ FLDATA (FLAG, tti_flag, 0), REG_HRO }, { FLDATAD (FLAG, tti_flag, 0, "set flag on next input digit"), REG_HRO },
{ DRDATA (COL, tto_col, 7) }, { DRDATAD (COL, tto_col, 7, "current column") },
{ DRDATA (KTIME, tty_unit[UTTI].wait, 24), REG_NZ + PV_LEFT }, { DRDATAD (KTIME, tty_unit[UTTI].wait, 24, "keyboard polling interval"), REG_NZ + PV_LEFT },
{ DRDATA (TTIME, tty_unit[UTTO].wait, 24), REG_NZ + PV_LEFT }, { DRDATAD (TTIME, tty_unit[UTTO].wait, 24, "typewriter character delay"), REG_NZ + PV_LEFT },
{ DRDATA (CPS, tty_unit[UTTO].DEFIO_CPS, 24), REG_NZ + PV_LEFT }, { DRDATAD (CPS, tty_unit[UTTO].DEFIO_CPS, 24, "Character Output Rate"), PV_LEFT },
{ DRDATAD (ICPS, tty_unit[UTTI].DEFIO_CPS, 24, "Character Input Rate"), PV_LEFT },
{ NULL } { NULL }
}; };
@ -308,7 +309,7 @@ int32 temp;
int8 raw, c; int8 raw, c;
const char *cp; const char *cp;
sim_activate (uptr, uptr->wait); /* continue poll */ DEFIO_ACTIVATE (uptr); /* continue poll */
if ((temp = sim_poll_kbd ()) < SCPE_KFLAG) /* no char or error? */ if ((temp = sim_poll_kbd ()) < SCPE_KFLAG) /* no char or error? */
return temp; return temp;
if (tti_unlock == 0) /* expecting input? */ if (tti_unlock == 0) /* expecting input? */