HP 9000 Series 300 Tutorials Manual page 189

Device i/o and user interfacing hp-ux concepts and tutorials
Hide thumbs Also See for HP 9000 Series 300:
Table of Contents

Advertisement

302
1*
send the preamble 3 or 4 bytes with attention true
*1
303
if (hpib_send_cmnd(eid, pre_cmd, (pcm3
?
4 : 3»
< 0)
304
fatal_err(lIhpib_send_cmnd preamble
II ,
ptr_dev, F_EXIT);
305
306
switch (rw_flag) {
307
case H_READ:
308
if ((tlog
=
read(eid, buffer, length»
< 0)
309
fatal_err ("read", ptr_dev, F_EXIT);
310
break;
311
312
case H_WRITE:
313
if ((tlog
=
write(eid, buffer, length»
<
0)
314
fatal_err ("write", ptr_dev, F_EXIT);
315
break;
316
317
case H_CMND:
318
return(O);
319
default:
320
return(-l);
321
}
322
1*
send the postamble 1 or 2 bytes with attention true
*1
323
if (hpib_send_cmnd(eid, post_cmd, (ocm1 ? 2 : 1»
< 0)
324
fatal_err(lIhpib_send_cmnd postamble", ptr_dev, F_EXIT);
325
326
1*
at last unlock the bus so other bus users can access it
*1
327
if (io_unlock(eid) < 0)
328
fatal_err ("io_unlock", ptr_dev, F_EXIT);
329
330
return(tlog);
331
}
332
333
int
334 amigo_identify()
335 {
336
unsigned char identify[2];
337
OIL Programming Example
0-9

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Hp 9000 series 800

Table of Contents