* Copyright (c) 1982, 1990 The Regents of the University of California.
* %sccs.include.redist.c%
* @(#)nhpib.c 7.1 (Berkeley) %G%
* Internal/98624 HPIB driver
#include "../hpdev/nhpibreg.h"
register struct hpib_softc
*hs
= &hpib_softc
[unit
];
register struct nhpibdevice
*hd
= (struct nhpibdevice
*)hs
->sc_addr
;
if ((int)hd
== internalhpib
) {
else if (hd
->hpib_cid
== HPIBB
) {
hs
->sc_ba
= hd
->hpib_csa
& CSA_BA
;
register struct hpib_softc
*hs
= &hpib_softc
[unit
];
register struct nhpibdevice
*hd
;
hd
= (struct nhpibdevice
*)hs
->sc_addr
;
hd
->hpib_acr
= AUX_SSWRST
;
hd
->hpib_acr
= AUX_CSHDW
;
hd
->hpib_acr
= AUX_SSTD1
;
hd
->hpib_acr
= AUX_SVSTD1
;
hd
->hpib_acr
= AUX_CHDFA
;
hd
->hpib_acr
= AUX_CHDFE
;
hd
->hpib_acr
= AUX_CSWRST
;
nhpibsend(unit
, slave
, sec
, buf
, cnt
)
register struct hpib_softc
*hs
= &hpib_softc
[unit
];
register struct nhpibdevice
*hd
;
register int origcnt
= cnt
;
hd
= (struct nhpibdevice
*)hs
->sc_addr
;
hd
->hpib_data
= C_TAG
+ hs
->sc_ba
;
hd
->hpib_data
= C_LAG
+ slave
;
hd
->hpib_data
= C_SCG
+ sec
;
nhpibrecv(unit
, slave
, sec
, buf
, cnt
)
register struct hpib_softc
*hs
= &hpib_softc
[unit
];
register struct nhpibdevice
*hd
;
register int origcnt
= cnt
;
hd
= (struct nhpibdevice
*)hs
->sc_addr
;
hd
->hpib_data
= C_LAG
+ hs
->sc_ba
;
hd
->hpib_data
= C_TAG
+ slave
;
hd
->hpib_data
= C_SCG
+ sec
;
register struct hpib_softc
*hs
= &hpib_softc
[unit
];
register struct nhpibdevice
*hd
;
hd
= (struct nhpibdevice
*)hs
->sc_addr
;
register struct nhpibdevice
*hd
;
register int timo
= 100000;
while ((hd
->hpib_mis
& MIS_BO
) == 0 && --timo
)
register struct nhpibdevice
*hd
;
register int timo
= 100000;
while ((hd
->hpib_mis
& MIS_BI
) == 0 && --timo
)