t_stat qty_attach( UNIT * unitp, char * cptr ) { t_stat r ; int a ; /* switches: A auto-disconnect * M modem control */ qty_mdm = qty_auto = 0; /* modem ctl off */ r = tmxr_attach( &qty_desc, unitp, cptr ) ; /* attach QTY */ if ( r != SCPE_OK ) { return ( r ) ; /* error! */ } if ( sim_switches & SWMASK('M') ) /* modem control? */ { qty_mdm = 1; sim_printf( "Modem control activated\n" ) ; if ( sim_switches & SWMASK ('A') ) /* autodisconnect? */ { qty_auto = 1 ; sim_printf( "Auto disconnect activated\n" ) ; } } qty_polls = 0 ; for ( a = 0 ; a < QTY_MAX ; ++a ) { /* QTY lines are always enabled - force RX and TX to 'enabled' */ qty_status[ a ] = (QTY_L_RXE | QTY_L_TXE) ; } sim_activate( unitp, tmxr_poll ) ; return ( SCPE_OK ) ; } /* end of 'qty_attach' */
t_stat mux_attach (UNIT *uptr, char *cptr) { t_stat r; r = tmxr_attach (&mux_desc, uptr, cptr); /* attach */ if (r != SCPE_OK) /* error */ return r; rtc_register (RTC_COC, mux_tps, &mux_unit[MUXC]); /* register timer */ return SCPE_OK; }
t_stat ttx_attach (UNIT *uptr, CONST char *cptr) { t_stat r; r = tmxr_attach (&ttx_desc, uptr, cptr); /* attach */ if (r != SCPE_OK) /* error */ return r; sim_activate (uptr, 0); /* start poll at once */ return SCPE_OK; }
t_stat ports_attach(UNIT *uptr, CONST char *cptr) { t_stat r; sim_debug(TRACE_DBG, &ports_dev, "ports_attach()\n"); tmxr_set_modem_control_passthru(&ports_desc); r = tmxr_attach(&ports_desc, uptr, cptr); if (r != SCPE_OK) { tmxr_clear_modem_control_passthru(&ports_desc); return r; } return SCPE_OK; }
/* Attach master unit */ t_stat dtc_attach(UNIT * uptr, CONST char *cptr) { int i; t_stat r; r = tmxr_attach(&dtc_desc, uptr, cptr); /* attach */ if (r != SCPE_OK) return r; /* error */ sim_activate(&dtc_unit[1], 100); /* quick poll */ for (i = 0; i < DTC_MLINES; i++) { dtc_lstatus[i] = BufNotReady; /* Device not connected */ } uptr->CMD = DTC_RDY; iostatus |= DTC_FLAG; return SCPE_OK; }