int hpibrecv(int unit, int slave, int sec, void *buf, int cnt) { if (hpib_softc[unit].sc_type == HPIBC) return (fhpibrecv(unit, slave, sec, (char *)buf, cnt)); else return (nhpibrecv(unit, slave, sec, (char *)buf, cnt)); }
int hpibrecv(int unit, int slave, int sec, uint8_t *buf, int cnt) { if (hpib_softc[unit].sc_type == HPIBC) return (fhpibrecv(unit, slave, sec, buf, cnt)); return nhpibrecv(unit, slave, sec, buf, cnt); }
int hpibid(int unit, int slave) { short id; int rv; if (hpib_softc[unit].sc_type == HPIBC) rv = fhpibrecv(unit, 31, slave, (char *)&id, 2); else rv = nhpibrecv(unit, 31, slave, (char *)&id, 2); if (rv != 2) return (0); return (id); }
int hpibid(int unit, int slave) { short id; int rv; if (hpib_softc[unit].sc_type == HPIBC) rv = fhpibrecv(unit, 31, slave, (uint8_t *)&id, 2); else rv = nhpibrecv(unit, 31, slave, (uint8_t *)&id, 2); if (rv != 2) return 0; return id; }
void hpibgo(int unit, int slave, int sec, void *addr, int count, int flag) { if (hpib_softc[unit].sc_type == HPIBC) { if (flag == F_READ) fhpibrecv(unit, slave, sec, (char *)addr, count); else fhpibsend(unit, slave, sec, (char *)addr, count); } else { if (flag == F_READ) nhpibrecv(unit, slave, sec, (char *)addr, count); else nhpibsend(unit, slave, sec, (char *)addr, count); } }
void hpibgo(int unit, int slave, int sec, uint8_t *addr, int count, int flag) { if (hpib_softc[unit].sc_type == HPIBC) if (flag == F_READ) fhpibrecv(unit, slave, sec, addr, count); else fhpibsend(unit, slave, sec, addr, count); else if (flag == F_READ) nhpibrecv(unit, slave, sec, addr, count); else nhpibsend(unit, slave, sec, addr, count); }