|
This and the answer I received on the facebook page to run the display
I have not yet tested it
1) LegacyKERNEL
[Only for LCD Display, no touch]
modprobe fbtft_device debug=3 rotate=90 name=flexfb speed=16000000 gpios=reset:2,dc:71 txbuflen=32768
modprobe flexfb width=320 height=480 regwidth=16 init=-1,0xb0,0x0,-1,0x11,-2,250,-1,0x3A,0x55,-1,0xC2,0x44,-1,0xC5,0x00,0x00,0x00,0x00,-1,0xE0,0x0F,0x1F,0x1C,0x0C,0x0F,0x08,0x48,0x98,0x37,0x0A,0x13,0x04,0x11,0x0D,0x00,-1,0xE1,0x0F,0x32,0x2E,0x0B,0x0D,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,-1,0xE2,0x0F,0x32,0x2E,0x0B,0x0D,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,-1,0x36,0x28,-1,0x11,-1,0x29,-3
con2fbmap 1 8
2) MAINLINE KERNEL
Make sure that you are using nightlies [Kernel 4.0++]
-----------LCD-------------
nano /boot/armbianEnv.txt
overlays=spi-spidev spi-add-cs1
param_spidev_spi_bus=0
param_spidev_spi_cs=1
nano /etc/modules-load.d/fbtft.conf
fbtft
flexfb
fbtft_device
nano /etc/modprobe.d/fbtft.conf
options fbtft_device rotate=90 name=piscreen speed=16000000 gpios=reset:2,dc:71 txbuflen=32768 fps=25
nano /etc/rc.local
con2fbmap 1 1
-----END OF LCD-------
----------TOUCH-------------
mkdir ds7846
cd ds7846
wget https://sourceforge.net/.../input/touchscreen/ads7846.c...
mv ads7846.c?format=raw ads7846.c
nano Makefile
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
The make file below is wrong. I don't know what is wrong with it, thus we manually create it.
=========
obj-m := ads7846.o
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
all(MAKE) -C $(KDIR) M=$(PWD) modules
clean(MAKE) -C $(KDIR) M=$(PWD) clean
install(MAKE) -C $(KDIR) M=$(PWD) modules_install
=========
MANUAL CREATION
make -C /lib/modules/4.11.3-sun8i/build M=/root/ds7846 modules
make -C /lib/modules/4.11.3-sun8i/build M=/root/ds7846 modules_install
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
depmod
cd ..
git clone https://github.com/notro/fbtft_tools/
git clone https://github.com/.../fbtft.../tree/master/ads7846_device
cd fbtft_tools/ads7846_device
make
make install
depmod
nano /etc/modprobe.d/ads7846_device.conf
options ads7846_device model=7846 cs=1 gpio_pendown=1 keep_vref_on=1 swap_xy=1 pressure_max=255 x_plate_ohms=60 x_min=200 x_max=3900 y_min=200 y_max=3900
nano /etc/modules-load.d/ads7846.conf
ads7846
ads7846_device
do a evtest after that to check if touch works.
---------- END OF TOUCH------------- |
|