IBASE Technology RP-103-SMC User Manual page 96

Carrier board for rm-n8/rm-n8m/rm-n8mmi smarc2.0 cpu module
Table of Contents

Advertisement

10. LVDS Test
//Open the file for reading and writing
framebuffer_fd = open("/dev/fb0", O_RDWR);
// Get fixed screen information
ioctl(framebuffer_fd, FBIOGET_FSCREENINFO, &finfo)
// Get variable screen information
ioctl(framebuffer_fd, FBIOGET_VSCREENINFO, &vinfo)
// Figure out the size of the screen in bytes
screensize = vinfo.xres * vinfo.yres * vinfo.bits_per_pixel / 8;
// Map the device to memory
fbp = (char *)mmap(0, screensize, PROT_READ | PROT_WRITE,
MAP_SHARED, framebuffer_fd, 0);
// Figure out where in memory to put the pixel
memset(fbp, 0x00,screensize);
//draw point by fbp
long int location = 0;
location = (x+g_xoffset) * (g_bits_per_pixel/8) +
(y+g_yoffset) * g_line_length;
*(fbp + location + 0) = color_b;
*(fbp + location + 1) = color_g;
*(fbp + location + 2) = color_r;
//close framebuffer fd
close(framebuffer_fd);
88
RP-103-SMC User Manual

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the RP-103-SMC and is the answer not in the manual?

Related Products for IBASE Technology RP-103-SMC

Table of Contents