* Copyright (c) 1982, 1990 The Regents of the University of California.
* %sccs.include.redist.c%
* @(#)hpib.c 7.6 (Berkeley) %G%
#include "hp/dev/device.h"
int internalhpib
= IIOV(0x478000);
int fhpibppoll(), nhpibppoll();
struct hpib_softc hpib_softc
[NHPIB
];
extern struct hp_hw sc_table
[];
register struct hp_hw
*hw
;
register struct hpib_softc
*hs
;
for (hw
= sc_table
; i
< NHPIB
&& hw
< &sc_table
[MAXCTLRS
]; hw
++) {
hs
->sc_addr
= hw
->hw_kva
;
printf("hpib%d at sc%d\n", i
, hw
->hw_sc
);
hw
->hw_pa
= (caddr_t
) i
; /* XXX for autoconfig */
if (unit
>= NHPIB
|| hpib_softc
[unit
].sc_alive
== 0)
if (hpib_softc
[unit
].sc_type
== HPIBC
)
rv
= fhpibrecv(unit
, 31, slave
, &id
, 2);
rv
= nhpibrecv(unit
, 31, slave
, &id
, 2);
hpibsend(unit
, slave
, sec
, buf
, cnt
)
if (hpib_softc
[unit
].sc_type
== HPIBC
)
return (fhpibsend(unit
, slave
, sec
, buf
, cnt
));
return (nhpibsend(unit
, slave
, sec
, buf
, cnt
));
hpibrecv(unit
, slave
, sec
, buf
, cnt
)
if (hpib_softc
[unit
].sc_type
== HPIBC
)
return (fhpibrecv(unit
, slave
, sec
, buf
, cnt
));
return (nhpibrecv(unit
, slave
, sec
, buf
, cnt
));
register int unit
, slave
;
register int timo
= 1000000;
if (hpib_softc
[unit
].sc_type
== HPIBC
)
while (((*poll
)(unit
) & slave
) == 0)
hpibgo(unit
, slave
, sec
, addr
, count
, flag
)
if (hpib_softc
[unit
].sc_type
== HPIBC
)
fhpibrecv(unit
, slave
, sec
, addr
, count
);
fhpibsend(unit
, slave
, sec
, addr
, count
);
nhpibrecv(unit
, slave
, sec
, addr
, count
);
nhpibsend(unit
, slave
, sec
, addr
, count
);