LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-21-2005, 10:45 PM   #1
BorgKiller
Member
 
Registered: Dec 2002
Location: Cyberspace, address block 212
Distribution: FreeBSD 6.1-RELEASE
Posts: 34

Rep: Reputation: 15
Parallel Port Access


Hey all,

I am currentally making a program which will access my computers parallel port (I made a simple device to attach to it). So far I have had great success with the program, I am power up the device, power down the device and make it power up and down in sequence. But I have run into some problems:

1) In linux, I use ioperm and outb to access and control the device. I have searched all over the net but I cant find any reference to ioperm and outb's equilivants in FreeBSD and Windows. Anyone got any ideas on where I should start looking?

2) Currentally the device only has 2 states, on and off. Is there any way I can access on certain pins and power them up but leave the rest off?

Thanks, I know they are probally very noobish questions,
BorgKiller
 
Old 12-22-2005, 04:46 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
I would consider getting a copy of this book:

Linux Device Drivers, 3rd Edition, O'Reilly
Jonathan Corbet, Alessandro Rubini, Greg Kroah-Hartman

It is *the* book on Linux device drivers programming ... and the authors happen to go into considerable detail on accessing the parallel port (as example "real-world hardware").

I'm frankly not familiar with "ioperm" and friends, and I don't know what their limitations are on Linux, or whether or not they're portable to any OS besides Linux.

I'd definitely consider porting your Linux "ioperm" code into a device driver. And although the code itself wouldn't be portable, the basic structure and design of your Linux device driver would be directly applicable to either/both of FreeBSD and/or Windows.

IMHO .. PSM
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
alternate methods of parallel port access bobbens Programming 9 10-25-2005 08:47 AM
Allow program to access parallel port LongName Linux - Newbie 5 08-27-2004 06:08 PM
Parallel port pin access Robert0380 Linux - Hardware 5 07-29-2003 04:11 PM
urgent help please (parallel port access) yahya Programming 1 08-12-2002 12:36 PM
urgent help please ( parallel port access) yahya Linux - Software 1 08-12-2002 12:32 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration