Display Power; Display Backlight; Sd Cards And Usb Mass Storage - GARZ&FRICKE GUF-Yocto-34.0-r5756-0-VINCELL User Manual

Embedded computer systems
Table of Contents

Advertisement

USB Serial Gadget
Again, further drivers can be activated by reconfiguring the Linux kernel. The USB Device drivers are not compiled
into the kernel by default, but are located as modules in the file system. In order to use the Serial Gadget for
example, the according module has to be loaded:
root@vincell:~# modprobe g_serial
The Serial Gadget creates a virtual serial port over USB, accessible via the device node /dev/ttyGS0.

6.9 Display power

The display can be powered on or off by software. The value is exported as a virtual file in the sysfs under
/sys/class/graphics/fb0/blank. It can be accessed using the standard file operations open(), read(), write() and
close().
Example 1: Turn display off:
root@vincell:~# echo 4 > /sys/class/graphics/fb0/blank
Example 2: Turn display on:
root@vincell:~# echo 0 > /sys/class/graphics/fb0/blank
Please note that this value is not persistent, i.e. it gets lost when the device is rebooted.

6.10 Display backlight

The brightness of the display backlight can be adjusted in a range from 0 to 255. The value is exported as a
virtual file in the sysfs under /sys/class/backlight/pwm-backlight.0/brightness. It can be accessed using the
standard file operations open(), read(), write() and close().
Example 1: Reading and adjusting the current backlight brightness on the console:
root@vincell:~# cat /sys/class/backlight/pwm-backlight.0/brightness
255
root@vincell:~# echo 100 > /sys/class/backlight/pwm-backlight.0/brightness
Please note that this value is not persistent, i.e. it gets lost when the device is rebooted. In order to change the
brightness permanently, it has to be set in the XML configuration, which can be done using the
Example 2: Adjusting the backlight brightness permanently on the console:
!
root@vincell:~# xconfig addattribute -p /configurationFile/variables/display/
backlight -n level_ac -v 100
,
Please note that adjusting this value does not affect the brightness immediately. A reboot is required for this
setting to take effect. If you want to adjust the brightness immediately and permanently, you have to execute both
examples.

6.11 SD cards and USB mass storage

SD cards and USB mass storage devices can be accessed directly by using their devices nodes. The SD card can
be found under /dev/mmcblk0, its single partitions are located under
number. The USB mass storage devices can be found under
/dev/sdXY
with Y being a positive number.
Example 1: Create a FAT32 file system on the first partition of an SD card:
root@vincell:~# mkfs.vfat /dev/mmcblk0p1
GUF-Yocto-34.0-r5756-0
/dev/mmcblk0pX
/dev/sdX
with X=a..z, its single partitions under
VINCELL
User Manual
¡
¡
xconfig
tool.
with X being a positive
31

Advertisement

Table of Contents
loading

Table of Contents