LinuxQuestions.org
Help answer threads with 0 replies.
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-04-2008, 09:02 AM   #1
webquinty
Member
 
Registered: Apr 2008
Location: Espaņa
Distribution: Suse
Posts: 227

Rep: Reputation: 32
Problem access ioport .....


Hello,

I have tried to access ioport to read some information from pc/104 board, but I have a small problem.

After request_region, in my case, request_region(ox150 ,8,"MyBoard")
I have tried to read a byte with inb an always return me the same value 0xFF, but If I try to write a byte (bit 0 is a led) ,I can turn off and turn on the led.

So, Could somebody tell me why can write a register without problems and can not read a byte???

Best regards.
 
Old 12-06-2008, 04:55 PM   #2
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
It might be a write-only register. Some registers behave like that.

jlinkels
 
Old 12-08-2008, 09:54 AM   #3
webquinty
Member
 
Registered: Apr 2008
Location: Espaņa
Distribution: Suse
Posts: 227

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by jlinkels View Post
It might be a write-only register. Some registers behave like that.

jlinkels
Hello,

Registers that I have tried to read are R/W.
But I read some infromation that it is necessary to compile driver at least with this option -O2.
I will try to do it, perhaps this is my problem.

Thanks a lot ans best regards
 
  


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
/ access problem Dauron Linux - General 6 11-28-2006 08:03 AM
access to /proc/ioport eddycur Programming 0 11-13-2005 11:28 PM
freebsd ioport usage file? infamous41md *BSD 2 06-15-2004 03:23 PM
Internet and LAN access is unstable-is this a hardware problem or a software problem? soren625 Linux - Networking 1 06-07-2004 06:43 AM
Access Problem prashu_bvp Linux - Networking 0 03-05-2003 01:33 AM

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

All times are GMT -5. The time now is 07:41 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