gpio_direction_input(SABRESD_GPIO8);
gpio_direction_output(SABRESD_GPIO9, 0);
3.8.4
RS232 Initial Code
The RS232 initial code as below. It shows you how to initial COM port.
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.5
Display Output Setting
3.8.5.1
LVDS Settings
Please set environment in u-boot as below:
setenv
bootargs_base
enable_wait_mode=off video=mxcfb1:dev=ldb,1024x768M@60,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
DCLK). For example, the total horizontal line is 1344 DCLK, and total vertical number
'setenv
bootargs
12
/(Total horizontal line * Total vertical line *
33
console=ttymxc0,115200
ROM-3420 User Manual