示例#1
0
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));
}
示例#2
0
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);
}
示例#3
0
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);
}
示例#4
0
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;
}
示例#5
0
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);
	}
}
示例#6
0
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);
}