mirror of
https://github.com/rcornwell/sims.git
synced 2026-01-21 02:07:41 +00:00
I7000: Fixed COM device to work correctly.
This commit is contained in:
parent
e06c06bf29
commit
d7be310574
@ -69,20 +69,13 @@ chan_set_devs(DEVICE * dptr)
|
||||
for (num = sim_devices[i]->numunits; num > 0; num--)
|
||||
(uptr++)->flags |= UNIT_DIS;
|
||||
goto nextdev;
|
||||
} else {
|
||||
/* Set type to highest found */
|
||||
for(type = 7; type >=0; type--)
|
||||
if (ctype >> type)
|
||||
break;
|
||||
chan_unit[chan].flags &= ~(CHAN_MODEL);
|
||||
chan_unit[chan].flags |= CHAN_S_TYPE(type)|CHAN_SET;
|
||||
}
|
||||
}
|
||||
/* Set channel to highest type */
|
||||
if ((chan_unit[chan].flags & CHAN_SET) == 0) {
|
||||
/* Set type to highest found */
|
||||
for(type = 7; type >=0; type--)
|
||||
if (ctype >> type)
|
||||
if (ctype & (1 << type))
|
||||
break;
|
||||
chan_unit[chan].flags &= ~(CHAN_MODEL);
|
||||
chan_unit[chan].flags |= CHAN_S_TYPE(type)|CHAN_SET;
|
||||
@ -109,20 +102,13 @@ chan_set_devs(DEVICE * dptr)
|
||||
&& num_devs[chan] != 0)) {
|
||||
uptr->flags |= UNIT_DIS;
|
||||
goto next;
|
||||
} else {
|
||||
/* Set type to highest found */
|
||||
for(type = 7; type >= 0; type--)
|
||||
if (ctype >> type)
|
||||
break;
|
||||
chan_unit[chan].flags &= ~(CHAN_MODEL);
|
||||
chan_unit[chan].flags |= CHAN_S_TYPE(type)|CHAN_SET;
|
||||
}
|
||||
}
|
||||
/* Set channel to highest type */
|
||||
if ((chan_unit[chan].flags & CHAN_SET) == 0) {
|
||||
/* Set type to highest found */
|
||||
for(type = 7; type >=0; type--)
|
||||
if (ctype >> type)
|
||||
if (ctype & (1 << type))
|
||||
break;
|
||||
chan_unit[chan].flags &= ~(CHAN_MODEL);
|
||||
chan_unit[chan].flags |= CHAN_S_TYPE(type)|CHAN_SET;
|
||||
|
||||
@ -328,7 +328,7 @@ DEVICE com_dev = {
|
||||
3, 10, 31, 1, 16, 8,
|
||||
&tmxr_ex, &tmxr_dep, &com_reset,
|
||||
NULL, &com_attach, &com_detach,
|
||||
&com_dib, DEV_DIS | DEV_DISABLE| DEV_DEBUG|DEV_NET, 0, dev_debug,
|
||||
&com_dib, DEV_DISABLE| DEV_DEBUG|DEV_NET, 0, dev_debug,
|
||||
NULL, NULL, &com_help, NULL, NULL, &com_description
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user