Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 10-31-2006, 04:11 PM   #1
LQ Newbie
Registered: Oct 2006
Posts: 4

Rep: Reputation: 0
Memory mapped device access in Linux

I am trying to access (read/write) a memory mapped device in Linux using a C program.

Currently I am using the following piece of code in order to write data to the device.

tsuAddress[0]=0xb0000; //The address of the device is 0xb0000
tsuFileDescriptor[0] = open("/dev/mem", O_RDWR) ;

lseek(tsuFileDescriptor[0],tsuAddress[0], SEEK_SET);

Although data are finally sent to the device, they are NOT sent IMMEDIATELY after the write() function has completed (as I understand, the Operating System makes some buffering prior to sending the data to the device).

To be more specific, what I want is for the data to be sent to the memory mapped device IMMEDIATELY after the write() function executes.

Thanking you in advance, TSIK
Old 10-31-2006, 09:26 PM   #2
Registered: Oct 2006
Posts: 460

Rep: Reputation: 31
make some realtime FIFO files in the dev directory
they get a much higher scheduling priority


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Linux As Extra Memory Device virtualy Linux - General 2 07-24-2006 05:23 PM
which device in /dev is mapped to an USB device malo_umoran Slackware 4 07-31-2005 01:12 PM
How to access USB falsh memory on linux ziox Linux - Hardware 4 07-19-2004 01:39 PM
Memory Mapped file IO problems legogt Programming 0 08-01-2003 01:52 PM
device to simulate physical memory with PCI device kevinsung Linux - Software 1 12-14-2002 10:11 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:18 PM.

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