[rescue] Solaris Parallel Port Programming

Dave McGuire mcguire at neurotica.com
Fri Jul 25 13:39:37 CDT 2003


On Friday, July 25, 2003, at 02:28 PM, Sheldon T. Hall wrote:
>> Are you going to use the Solaris driver, or are you looking to
>> control the port yourself at the driver level?  If so, looking
>> at the driver source in Linux may prove usefull.
>
> I dunno. What I'd _really_ like to do is have some simple routine that 
> let
> me set the various parallel port lines "high" or "low" from a shell 
> script.
> I don't know whether that would require "bare metal" programming or 
> whether
> I can use the driver.
>
>> man pages on bpp have a listing of all the IOCTL stuff... as for
>> using them... well... I've never done that :-)
>
> I'll have a look.  I've never done that sort of thing, either, but 
> I've made
> a career out of doing things that haven't been done before....

   IOCTL dicking is pretty easy...in general, you allocate a struct of a 
particular type (depending on the IOCTL you want to use), stuff its 
members with the (IOCTL-dependent) values depending on what you want to 
do, then call ioctl() with the IOCTL number that you want to call and a 
pointer the struct as parameters.

   It should be fairly easy to build a command-line program to twiddle 
those bits.  If you decide to do that, drop me a note and I'll do what 
I can to help out.

           -Dave

--
Dave McGuire                 "You don't have Vaseline in Canada?"
St. Petersburg, FL                     -Bill Bradford



More information about the rescue mailing list