Transplantation of Linux-3.6.6 Based on S3C2440 -- solving the problem of automatic LCD Shutdown

Source: Internet
Author: User

 

So far, we have spent a lot of space on the LCD, but there is another problem, that is, the LCD will be automatically closed 10 minutes after the boot.

 

In the 179th line of the vt. c file (under the drivers/tty/VT directory), the variable "blakinterval" is defined:

Static int blankinterval = 10*60;

 

By changing the value of blankinterval, you can modify the LCD shutdown time. If we don't want the LCD to be closed, we just need to set this variable to zero.

 

Of course, we can also use the applicationProgramTo change the LCD shutdown time. As shown below:CodeTo disable the LCD in 1 minute:

# Include <fcntl. h>

# Include <stdio. h>

# Include <sys/IOCTL. h>

Int main (INT argc, char ** argv)

{

Int F;

F = open ("/dev/tty0", o_rdwr );

Write (F, "\ 033 [9; 1]", 8 );

Close (f );

Return 0;

}

 

If you do not want to disable the LCD, modify the following statement:

Write (F, "\ 033 [9; 0]", 8 );

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.