依次 insmod 两个 ko文件,分别是 fbtft_device.ko , fb_st7789v.ko
# insmod fbtft_device.ko name=admatec_c-berry28 speed=400000 width=240 height=32
0 buswidth=8 busnum=1 cs=0 gpios=reset:133,cs:135,wr:136,dc:138,latch:137 debug=
4 bgr=1 fps=20 bpp=16
并提示如下信息:
[ 45.236485] m25p80 spi0.0: w25q128 spi0.0 50000kHz 8 bits mode=0x00
[ 45.242887] spidev spi1.1: lcdst7789v spi1.1 400kHz 8 bits mode=0x03
[ 45.249340] fbtft_device: name: admatec_c-berry28
[ 45.266462] fbtft_device: GPIOS used by 'admatec_c-berry28':
[ 45.272207] fbtft_device: 'reset' = GPIO133
[ 45.276387] fbtft_device: 'cs' = GPIO135
[ 45.280370] fbtft_device: 'rd' = GPIO136
[ 45.284289] fbtft_device: 'dc' = GPIO140
[ 45.288231] m25p80 spi0.0: w25q128 spi0.0 50000kHz 8 bits mode=0x00
[ 45.294553] spidev spi1.1: lcdst7789v spi1.1 400kHz 8 bits mode=0x03
[ 45.300946] spi spi1.0: fb_st7789v spi1.0 6000kHz 8 bits mode=0x00
insmod fb_st7789v.ko
并提示如下信息:
[ 54.909789] Console: switching to colour frame buffer device 30x40
[ 54.918167] graphics fb0: fb_st7789v frame buffer, 240x320, 150 KiB video memory, 4 z
生成 /dev/fb0 设备
关于 GPIO的说明:
如 reset pin是GPIOE(5), GPIOE(5) = 32*4 + 5 , 不同的芯片对应的数值不一样。
运行 QT5.4
先设置环境变量:
#!/bin/sh
export LD_LIBRARY_PATH=/mnt/sd/qtlib:$LD_LIBRARY_PATH
export QT_QPA_FONTDIR=/mnt/sd/qtlib/fonts
export QT_QPA_PLATFORM_PLUGIN_PATH=/mnt/sd/qtlib/plugins
export QT_QPA_PLATFORM=linuxfb:fb=/dev/fb0:size=320x240
阅读(9158) | 评论(0) | 转发(0) |