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); write(tsuFileDescriptor[0],&dataToWrite,4); 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 www.tsik.eu |
make some realtime FIFO files in the dev directory
they get a much higher scheduling priority rtf_create() rtf_put() rtf_get() |
All times are GMT -5. The time now is 11:50 AM. |