Appendix
RP-103-SMC User Manual
89
11.
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
Содержание RP-103-SMC
Страница 15: ...Introduction RP 103 SMC User Manual 7 1 ...
Страница 17: ...Introduction RP 103 SMC User Manual 9 1 RP 103 SMC Dimensions ...
Страница 18: ...10 RP 103 SMC User Manual 1 4 I O View ...
Страница 20: ...12 Chapter 2 Jumpers and Connectors on the Carrier Board ...
Страница 48: ...40 RP 103 SMC User Manual CN24 SATA power RM N8QM only Pin Signal Name 1 5V 2 GND 3 GND 4 12V ...
Страница 50: ...42 RP 103 SMC User Manual CN26 SATA power Pin Signal Name 1 5V 2 GND 3 GND 4 12V ...
Страница 52: ...44 RP 103 SMC User Manual CN28 CAN2 3 Pin Signal Name 1 CAN2_H 2 CAN2_L 3 GND 4 CAN3_H 5 CAN3_L 6 GND ...
Страница 56: ...48 RP 103 SMC User Manual CN32 FAN Pin Signal Name 1 GND 2 12V 3 N C 4 N C ...
Страница 60: ...52 RP 103 SMC User Manual CN35 RTC BAT Pin Signal Name 1 LI_CELL 2 GND ...
Страница 76: ...68 RP 103 SMC User Manual This page is intentionally left blank ...