![Fortec Star iBASE IBR210 Скачать руководство пользователя страница 51](http://html1.mh-extra.com/html/fortec-star/ibase-ibr210/ibase-ibr210_manual_2321414051.webp)
Appendix
IBR210 User’s Manual
41
K.
HDMI Test
•
HDMI display test
//Open the file for reading and writing
framebuffer_fd = open("/dev/fb2", 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 + lo 0) = color_b;
*(fbp + lo 1) = color_g;
*(fbp + lo 2) = color_r;
//close framebuffer fd
close(framebuffer_fd);
•
HDMI audio test
#enable hdmi audio
echo 0 > /sys/class/graphics/fb2/blank
#play wav file by hdmi audio
aplay /home/root/testscript/hdmi/1K.wav -D plughw:0,0
Содержание iBASE IBR210
Страница 1: ......
Страница 3: ...IBR210 3 5 ARM based SBC With NXP Cortex A53 Quad Dual i MX8M User s Manual Version 0 2 Sep 2019...
Страница 10: ...viii IBR210 User s Manual This page is intentionally left blank...
Страница 17: ...General Information IBR210 User s Manual 7 1 1 6 Dimensions Unit mm...
Страница 18: ...8 IBR210 User s Manual IBR210 Reference Heat Sink...
Страница 22: ...12 IBR210 User s Manual 2 3 Jumper Connector Locations on IBR210 Board diagram of IBR210...
Страница 36: ...26 IBR210 User s Manual This page was intentionally left blank...
Страница 42: ...32 Appendix This section provides the information of reference code...