LeMaker Guitar:Backlight adjustment for LCD
The function of Backlight adjustment for LCD is to make the LCD become dark or bright.The following steps can teach you how to achieve it.
Adjusting LCD backlight
Step 1: Download the LeMaker Guitar BSP to linux PC and config it.
Please refer to the website:http://wiki.lemaker.org/LeMaker_Guitar:How_to_use_LeMaker_Guitar_BSP for more information.
Step 2: Execute the command below to update to the latest BSP.
cd linux-actions-bsp/linux-actions git branch #You can get "s500-master" sudo git checkout s500-master sudo git pull
Step 3: Execute the command below to config the BSP again.
cd linux-actions-bsp/ make clean ./configure Submodule 'linux-actions' (https://github.com/LeMaker/linux-actions.git) registered for path 'linux-actions' Submodule 'owl-actions' (https://github.com/LeMaker/owl-actions.git) registered for path 'owl-actions' Submodule 'u-boot-actions' (https://github.com/LeMaker/u-boot-actions.git) registered for path 'u-boot-actions' Cloning into 'owl-actions'... remote: Counting objects: 35, done. remote: Compressing objects: 100% (24/24), done. remote: Total 35 (delta 8), reused 35 (delta 8), pack-reused 0 Unpacking objects: 100% (35/35), done. Submodule path 'owl-actions': checked out ************************************************ Select board type: 1. lemaker_guitar_bbb 2. lemaker_guitar_bbc 3. lemaker_guitar_bbd Which would you like? [lemaker_guitar_bbb] 1 s500 lemaker_guitar_bbb configured. Now run `make`
Compile Linux kernel and u-boot
Step 4: Copy bootloader.bin, u-boot-dtb.img, misc.img and lib flie to your Lemaker Guitar on linux-actions-bsp/output.
Step 5: Update Linux platform firmware.
Please refer to the website:http://wiki.lemaker.org/LeMaker_Guitar:How_to_update_Linux_platform_firmware for more information.
View the effect of backlight adjustment
The node of Backlight adjustment for LCD is on /sys/devices/backlight.2/backlight/backlight.2 directory.So you can use command below to view the node.
ls -lh /sys/devices/backlight.2/backlight/backlight.2 total 0 -r--r--r-- 1 root root 4.0K Jan 1 11:06 actual_brightness -rw-r--r-- 1 root root 4.0K Jan 1 11:08 bl_power -rw-r--r-- 1 root root 4.0K Jan 1 11:00 brightness lrwxrwxrwx 1 root root 0 Jan 1 11:08 device -> ../../../backlight.2 -r--r--r-- 1 root root 4.0K Jan 1 11:00 max_brightness drwxr-xr-x 2 root root 0 Jan 1 11:05 power lrwxrwxrwx 1 root root 0 Jan 1 11:00 subsyste-> ../../../../class/backlight -r--r--r-- 1 root root 4.0K Jan 1 11:06 threshold_step -r--r--r-- 1 root root 4.0K Jan 1 11:08 total_steps -r--r--r-- 1 root root 4.0K Jan 1 11:00 type -rw-r--r-- 1 root root 4.0K Jan 1 11:00 uevent
The important node are bl_power, brightness, actual_brightness, max_brightness:
The bl_power is uesd for backlight enable,and its minimum value is 0.
echo 0 > bl_power
The brightness is uesd for backlight adjustment,and the larger the value, the higher the brightness.
echo 100 > brightness
The actual_brightness is on behalf of the actual value of backlight.
The max_brightness is on behalf of the maximum value of backlight.