Project

General

Profile

Touchscreen is not detected ยป do_load_fpga_lcd.sh

Andri Haryono, 08/14/2017 02:26 PM

 
1
#!/bin/sh
2

    
3
cd /home/root/lcd-lx45
4

    
5
do_enum=1
6
if [ "x-p" == "x$1" ]
7
then
8
    do_enum=1
9
    shift
10
fi
11
if [ "x" != "x$1" ]
12
then
13
    industrialio_lcd_lx45.bin=$1
14
fi
15
rmmod fpga_ctrl.ko
16
insmod fpga_ctrl.ko
17
insmod fpga_i2c.ko
18
insmod ads7843.ko
19
insmod fpga_lcdctlr.ko
20
echo "1" > /sys/devices/fpga_ctrl/cmd
21
echo "2" > /sys/devices/fpga_ctrl/cmd
22
cat industrialio_lcd_lx45.bin > /sys/devices/fpga_ctrl/image
23
if [ 1 -eq $do_enum ]
24
then
25
    echo "3" > /sys/devices/fpga_ctrl/cmd
26
fi
27
echo -n "FPGA State = "
28
cat /sys/devices/fpga_ctrl/state
29
cat /sys/devices/fpga_ctrl/version
30

    
31
sleep 1
32

    
33
echo "1" > /sys/devices/fpga_ctrl/3/backlight
34

    
35
sleep 1
36

    
37
echo "100" > /sys/devices/fpga_ctrl/3/duty
38

    
39
sleep 5
    (1-1/1)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)