Hi,

just for the mapping, you won't need most of the include files.

I often include xyz.h in xyz.c so that I get at least a warning when I change

sth. so that the public promises in .h no longer hold.

pru_if.h is in the post but not needed.

Remove the includes and the compiler will tell you what is missing.

You definitely don't need ltcsrv.h and the stuff for nice().


 * A file descriptor must be used for /dev/mem:


int dev_mem_fd;
dev_mem_fd = open("/dev/mem",O_RDWR | O_SYNC);

  * Shared RAM is mapped (prepared for use) by this line:


 shared_ram = (int *) mmap(NULL, 12*1024, PROT_READ | PROT_WRITE, MAP_SHARED, dev_mem_fd, 0x4A300000 + 0x10000);

  * Here follows examples of usage (in this case, writing to shared
    ram memory):


 shared_ram[0] = ...   ; //write to 0x4A310000
 shared_ram[1] = ...   ; //write to 0x4A310004
 shared_ram[1] = ...   ; //write to 0x4A310008
                       ^!!

Am I right?

Yes.

I should have snipped a lot of text, but was only half awake.

Cheers, Gerhard



--
For more options, visit http://beagleboard.org/discuss
--- You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/32141ab3-a346-b184-90bc-5c9bc810d169%40hoffmann-hochfrequenz.de.

Reply via email to