sys/sparc/dev/zs.c
/*
 * Raise or lower modem control (DTR/RTS) signals.  If a character is
 * in transmission, the change is deferred.
 */
Raise or lower modem control (DTR/RTS) signals.  If a character is
in transmission, the change is deferred.
Raise or lower modem control ( DTR / RTS ) signals . If a character is in transmission the change is deferred .
static void
zs_modem(struct zs_chanstate *cs, int onoff)
{
	int s, bis, and;
	if (onoff) {
		bis = ZSWR5_DTR | ZSWR5_RTS;
		and = ~0;
	} else {
		bis = 0;
		and = ~(ZSWR5_DTR | ZSWR5_RTS);
	}
	s = splzs();
	cs->cs_preg[5] = (cs->cs_preg[5] | bis) & and;
	if (cs->cs_heldchange == 0) {
		if (cs->cs_ttyp->t_state & TS_BUSY) {
			cs->cs_heldtbc = cs->cs_tbc;
			cs->cs_tbc = 0;
			cs->cs_heldchange = 1;
		} else {
			cs->cs_creg[5] = (cs->cs_creg[5] | bis) & and;
			ZS_WRITE(cs->cs_zc, 5, cs->cs_creg[5]);
		}
	}
	splx(s);
}
static void zs_modem ( struct zs_chanstate * cs , int onoff ) { int s , bis , and ; if ( onoff ) { bis = ZSWR5_DTR | ZSWR5_RTS ; and = ~ 0 ; } else { bis = 0 ; and = ~ ( ZSWR5_DTR | ZSWR5_RTS ) ; } s = splzs ( ) ; cs -> cs_preg [ 5 ] = ( cs -> cs_preg [ 5 ] | bis ) & and ; if ( cs -> cs_heldchange == 0 ) { if ( cs -> cs_ttyp -> t_state & TS_BUSY ) { cs -> cs_heldtbc = cs -> cs_tbc ; cs -> cs_tbc = 0 ; cs -> cs_heldchange = 1 ; } else { cs -> cs_creg [ 5 ] = ( cs -> cs_creg [ 5 ] | bis ) & and ; ZS_WRITE ( cs -> cs_zc , 5 , cs -> cs_creg [ 5 ] ) ; } } splx ( s ) ; }
Raise or lower modem control (DTR/RTS) signals.
Raise or lower modem control ( DTR / RTS ) signals .