el_pango
Member
Hi,
In my code, I'm trying to do this:
Unfortunately, mmap()ing doesn't work and leaves scrn_ptr as MAP_FAILED. What am I doing wrong here? Is this no longer supported?
Learned/stole ideas from http://pandorawiki.org/Kernel_interfacek
In my code, I'm trying to do this:
Code:
system("ofbset -fb /dev/fb1 -pos 0 0 -size 800 480 -mem 192000 -en 1 ");
system("fbset -fb /dev/fb1 -g 400 240 400 240 16");
fbdev = open("/dev/fb1", O_RDONLY);
if(fbdev == -1) exit(2);
scrn_ptr = mmap(0,400 * 240 * 2, PROT_WRITE | PROT_READ, MAP_SHARED, fbdev, 0);
Unfortunately, mmap()ing doesn't work and leaves scrn_ptr as MAP_FAILED. What am I doing wrong here? Is this no longer supported?
Learned/stole ideas from http://pandorawiki.org/Kernel_interfacek