For Programmers: Free Programming Magazines  


Home > Archive > Unix Programming > August 2005 > Re: Need sample C code for access I/O ports









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Need sample C code for access I/O ports
David Schwartz

2005-08-24, 9:56 pm


"Steven Woody" <anti-spam.narkewoody@gmail.com.dont-post-to> wrote in
message news:87u0hgnakp.fsf@narke.yellow.line...

> i got a mutipl-port serial board and need to write a simple C program to
> set
> its base addresses in a Linux box. according to the user manual of the
> board,
> the job can be accomplish be write/read some bytes to some specify IO
> ports.
>
> i got no more experiences in accessing IO ports in Linux, so i think i'd
> better
> find some simple code rather than coding from scratch.
>
> any help will be highly appreciated.


Read the man page for "iopl". But you are doing this the wrong way, you
should write a driver.

DS


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com