Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Jul 1998 16:31:31 -0700
From:      john@ece.arizona.edu (John Galbraith)
To:        randal@comtest.com
Cc:        dufault@hda.com, mike@smith.net.au, FreeBSD-hardware@FreeBSD.ORG
Subject:   Re: new GPIB driver
Message-ID:  <199807222331.QAA10025@burdell.ece.arizona.edu>
In-Reply-To: <199807221926.JAA23230@oldyeller.comtest.com> (randal@comtest.com)

next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> "Randal" == Randal S Masutani <randal@comtest.com> writes:

    Randal> Thanks John.  I will be glad to work with you on your
    Randal> driver.  My customer has signed the non-disclosure with NI
    Randal> for their TNT controller chip and will hopefully get some
    Randal> docs soon(but I've been waiting for over a month now. Very
    Randal> typical of NI I suppose.)

OK, but if he signed a NDA, we can't exactly use that info in the
driver, and distribute it all over the planet.  At least not according
to the agreement.  If he wants to give me or you the information, it
seems to be a legal risk (and rightly so) for your customer. 

    Randal> I need to have NI 488.2 library interface for the project
    Randal> I am working on.  Currently I am only required to
    Randal> implement about 10 functions from NI's library and that's
    Randal> all I have time for, due to my deadline.  I am currently
    Randal> working on getting it working with Freds code.

    Randal> From your last email I take it that you haven't
    Randal> implemented any of NI's 488.2 library calls?  So do you
    Randal> have a similar interface to Freds code?

Yeah, it uses ioctl() calls.  They are quite similar.  It didn't take
me more than a few minutes to convert my code from the stock driver to
mine.  If I had thought about it more,  I could have just left them
identical (except I would have to add a bunch).  Another difference
between his and my driver is how he uses the minor numbers.  He likes
to be able to open minor device 4, and write() to a device on the GPIB
bus at address 4.  This is sometimes useful, granted, but I personally
don't even need to write to a GPIB printer or anything this way.
Instead, I use the minor number as a card index, so I can have
multiple cards in the machine at the same time.  This may not be very
common in real life, but I anticipate this being very useful for
debugging the driver itself.  I don't know any other way to actually
measure the GPIB transfer rate.  Maybe there is some special equipment
available, but I don't have it.  In any case, it would be trivial to
write a program that would direct raw data directly to a specific
device on the GPIB without any controller functions included.  

It just struck me that I could have the lower minor numbers work like
Fred's driver, and some upper number (like 32) to be the main special
file that you would open when you just wanted to dump data directly to
a specific device.  Not a big deal for now, though.  Right now, I
haven't even implemented write() and read(), other than to return the
"system call not implemented" error.

I will be hacking on this tonight, unless I get called off on some social
errand...

John



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hardware" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199807222331.QAA10025>