BeBits Information Developer Central Submit Application Your Account Web Links Contact Us
BeBits
parallelport driver
version 0.1
contact publisher
home page
screenshots
version history
other reviews
send updates for this application
talkback
0 comments
 Published by Pieter Panman
   Click here for more information about this publisher...
 Date Posted:   March 23rd, 2001
 Last Updated:   March 23rd, 2001
 License: Freeware
 Downloads: 1,333 total; 22 recently
 Page Views: 11,005 total
 User Rating: awaiting 10 votes Give this application a rating
 Jump to the Downloads section
About parallelport driver:
First version of my parallel port driver. Only tested with my computer, currently allows you to set the 8 output bits and read the status bits. Email me suggestions please ;)


This is probably most interesting for developers, or people who like to fiddle with their parallel port!

Someone at Be, inc. told me that there is no supported parallel port driver, so I just wrote a bare bones driver...
Simply drop the parallelport file into /boot/home/config/add-ons/kernel/drivers/bin. Then make a link of that file in /boot/home/config/add-ons/kernel/drivers/dev/misc.

By writing 1 byte to /dev/misc/parallelport you can modify the 8 data bits, and by reading 1 byte you can read info about the inputs.

I'll put more info up later, I just wanted to share it with you.

And this is my first kernel level driver, so it might crash your whole system, although it has not done anything on my system yet.

Enjoy!
==============================================
Here is a sample snippet on how to access it:

int fd;
status_t err;
uchar c;

fd = open("/dev/misc/parallelport", O_RDWR);
if (fd < 0) {
printf("Error opening devicen");
return 1;
}

c = 255;
err = write(fd, &c, 1); // Set all 8 databits to high
if (err < 0)
printf("Error setting 8 bits to onn");

while (true) { // Spit out the byte that contains info about the input bits
snooze(100000);
c++;
err = read(fd, &c, 1);
printf("bits %dn", c);
}
close(fd);
Latest Version
   
Details about this version:
First version, only write 1 byte to write to the 8 output bits and read 1 byte to check out the status bits.

More to come, please email me with suggestions!

WARNING: I haven't had time to work on it, but I've been informed that my driver is full of bugs. (Thanks Marco)
1) I don't release the memory I allocate
2) I don't use the number of bytes requested
3) I don't release the ISA module
4) makefile sucks :)
So be careful when using this, use it mostly as an inspiration.

 
Any Processor - requires R5   (15 KB) 290 downloads
 
 
Dev LinkLink reliability rating  [rating: 10]    Download this app  Report bad link surf.to
 
Add Additional Location
  Source Included
 
Related Links:
Post your own comment to the Talkback for this application!
Report a problem with the listing for this application!
Like this app? Have questions or comments?
Why not tell the author? Use the "e-mail publisher" link to get in touch with the publisher; they usually love getting feedback.
 
The Green Board
  Recent Downloads  -  # 246
Total Downloads  -  # 1,636
Total Views  -  # 1,380
User Ratings  -  N/A
  Input Device Drivers
Misc. Development
1.  BePodder - 9.80
2.  QEMU - 9.68
3.  ScummVM - 9.57
4.  cpu_fix - 9.42
5.  Jukebox - 9.40
6.  libdl.so - 9.40
7.  Haiku AGP busm... - 9.35
8.  vim6 - 9.31
9.  Beezer - 9.26
10.  HandBrake - 9.25
1.  BeOS 5 Perso... - 13,528
2.  Realtek RTL8... - 13,069
3.  Ati Radeon G... - 12,499
4.  Ensoniq Audio... - 7,529
5.  ATI Rage 128... - 7,425
6.  USB Joystick... - 5,629
7.  Broadcom 440x... - 5,394
8.  USB Serial dr... - 4,699
9.  S3 Trio 64 v2... - 4,693
10.  Intel Extreme... - 4,457
You are not logged in.
 Login

 
Unless otherwise noted, everything is copyright © 1999-2009 Haikuware. All Rights Reserved.
For more legal trivia, take a gander at our
Legal Stuff page and our Privacy Statement.