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 );