![Advantech RSB-4410 User Manual Download Page 49](http://html1.mh-extra.com/html/advantech/rsb-4410/rsb-4410_user-manual_2857964049.webp)
41
RSB-4410 User Manual
Chapter 3
S
oftware
Functionality
3.8.3
RS232 Initial Code
The RS232 initial code as below. It shows you how to initial COM2 ports.
int open_port(void)
{
int fd;
fd=open("/dev/ttymxc1",O_RDWR|O_NOCTTY|O_NDELAY);
if(fd == -1){
perror("open error");
}
return(fd);
}
3.8.4
Display Output Setting
3.8.4.1
LVDS Settings
Please set environment in u-boot as below:
setenv bootargs_mmc 'setenv bootargs ${bootargs} root=/
dev/mmcblk1p1 rootwait rw video=mxcfb0:dev=ldb,LDB-
XGA,if=RGB24'
LDB-XGA is an example for the resolution of your LVDS panel. You can input the
actual resolution of your LVDS panel here, such as 800x480, 1024x768, etc. The sys-
tem will accomplish the corresponding parameters automatically.
If the panel has problem to be activated, you may need to check the panel datasheet
to configure the panel related parameters. The LVDS video mode database is stored
in linux-3.0.35/drivers/video/mxc/ldb.c. You can add a new one for your LVDS panel.
static struct fb_videomode ldb_modedb[] = {
{
"LDB-XGA", 60, 1024, 768, 15385,
220, 40,
21, 7,
60, 10,
0,
FB_VMODE_NONINTERLACED,
FB_MODE_IS_DETAILED,},
}
The definition of fb_videomode in linux-3.0.35/include/linux/fb.h:
The name field is optional. If you input this value, it can be used in U-Boot environ-
ment settings.
The refresh field is the screen refresh frame rate, such as 60Hz, 70Hz. The resolution
can be filled in the xres & yres fields.
The pixel clock (pixclock) is equaled to 10
12
/(Total horizontal line * Total vertical line *
DCLK). For example, the total horizontal line is 1344 DCLK, and total vertical number
is 806 horizontal lines. The DCLK frequency is 60 MHz. Therefore, we can get 10
12
/
(1344*806*60) = 15385.
The margin values can be seen as front porch & back porch.
The sync_len means pulse width.
The sync value indicates the sync polarity (low or high).
struct fb_videomode {
const char *name; u32 refresh;