FreeBSD/sys/dev/ppbus/ppb_base.c
/*
 * ppb_get_status()
 *
 * Read the status register and update the status info
 */
ppb_get_status()
Read the status register and update the status info
ppb_get_status () Read the status register and update the status info
int
ppb_get_status(device_t bus, struct ppb_status *status)
{
	register char r;
	ppb_assert_locked(bus);
	r = status->status = ppb_rstr(bus);
	status->timeout	= r & TIMEOUT;
	status->error	= !(r & nFAULT);
	status->select	= r & SELECT;
	status->paper_end = r & PERROR;
	status->ack	= !(r & nACK);
	status->busy	= !(r & nBUSY);
	return (0);
}
int ppb_get_status ( device_t bus , struct ppb_status * status ) { register char r ; ppb_assert_locked ( bus ) ; r = status -> status = ppb_rstr ( bus ) ; status -> timeout = r & TIMEOUT ; status -> error = ! ( r & nFAULT ) ; status -> select = r & SELECT ; status -> paper_end = r & PERROR ; status -> ack = ! ( r & nACK ) ; status -> busy = ! ( r & nBUSY ) ; return ( 0 ) ; }
ppb_get_status()
 Read the status register and update the status info
ppb_get_status () Read the status register and update the status info