TMXR: Fix modem status bit retrieval to also return DTR and RTS

The prior change disabled returning DTR and RTS which the documented
interface was quite specific about actively returning.

The only user of this API which actually cared about DTR and RTS was
the in the pdp11_dmc module.

As reported in #951
This commit is contained in:
Mark Pizzolato 2020-11-02 16:42:56 -08:00
parent f9ce5ae8ff
commit e3572e1a9f

View file

@ -1746,7 +1746,7 @@ if ((lp->modembits != before_modem_bits) && (sim_deb && lp->mp && dptr)) {
sim_debug (TMXR_DBG_MDM, dptr, " - Line %d - %p\n", (int)(lp-lp->mp->ldsc), lp->txb); sim_debug (TMXR_DBG_MDM, dptr, " - Line %d - %p\n", (int)(lp-lp->mp->ldsc), lp->txb);
} }
if (incoming_bits) if (incoming_bits)
*incoming_bits = (lp->modembits & TMXR_MDM_INCOMING); *incoming_bits = (lp->modembits & (TMXR_MDM_INCOMING | TMXR_MDM_DTR | TMXR_MDM_RTS));
if (lp->mp && lp->modem_control) { /* This API ONLY works on modem_control enabled multiplexer lines */ if (lp->mp && lp->modem_control) { /* This API ONLY works on modem_control enabled multiplexer lines */
if ((bits_to_set | bits_to_clear) || incoming_bits) {/* Anything to do? */ if ((bits_to_set | bits_to_clear) || incoming_bits) {/* Anything to do? */
if (lp->loopback) { if (lp->loopback) {