FreeBSD/contrib/pnpinfo/pnpinfo.c
/*
 * Run the isolation protocol. Use rd_port as the READ_DATA port
 * value (caller should try multiple READ_DATA locations before giving
 * up). Upon exiting, all cards are aware that they should use rd_port
 * as the READ_DATA port;
 *
 */
Run the isolation protocol. Use rd_port as the READ_DATA port
value (caller should try multiple READ_DATA locations before giving
up). Upon exiting, all cards are aware that they should use rd_port
as the READ_DATA port.
Run the isolation protocol . Use rd_port as the READ_DATA port value ( caller should try multiple READ_DATA locations before giving up ) . Upon exiting all cards are aware that they should use rd_port as the READ_DATA port .
int
isolation_protocol()
{
    int csn;
    u_char data[9];
    send_Initiation_LFSR();
    pnp_write(PNP_CONFIG_CONTROL, 0x04);
    for (csn = 1; (csn < PNP_MAX_CARDS); csn++) {
	logdevs = 0 ;
	pnp_write(PNP_WAKE, 0);
	pnp_write(PNP_SET_RD_DATA, rd_port);
	outb(_PNP_ADDRESS, PNP_SERIAL_ISOLATION);
	DELAY(1000);	
	if (get_serial(data))
	    dump_resdata(data, csn);
	else
	    break;
    }
    return csn - 1;
}
int isolation_protocol ( ) { int csn ; u_char data [ 9 ] ; send_Initiation_LFSR ( ) ; pnp_write ( PNP_CONFIG_CONTROL , 0x04 ) ; for ( csn = 1 ; ( csn < PNP_MAX_CARDS ) ; csn ++ ) { logdevs = 0 ; pnp_write ( PNP_WAKE , 0 ) ; pnp_write ( PNP_SET_RD_DATA , rd_port ) ; outb ( _PNP_ADDRESS , PNP_SERIAL_ISOLATION ) ; DELAY ( 1000 ) ; if ( get_serial ( data ) ) dump_resdata ( data , csn ) ; else break ; } return csn - 1 ; }
Run the isolation protocol.
Run the isolation protocol .
/* Reset CSN for All Cards */ /* Wake up cards without a CSN */ /* Delay 1 msec */