ips
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| ips [2018/01/20 02:06] – admin | ips [2025/10/14 06:22] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ==== IPS/TFT液晶屏 ==== | + | ==== SPI驱动液晶屏(framebuffer方式) |
| - | 这个页面讲述如何使用MT7688A驱动液晶屏幕。 8-) | + | 这个页面讲述如何使用MT7688A驱动液晶屏幕。 8-) ,据了解,在MT7688上用FB方法驱动彩屏,WIDORA首当其冲。 |
| + | |||
| + | 教程做好的固件: | ||
| ===准备=== | ===准备=== | ||
| Line 23: | Line 25: | ||
| | 3V3 电源 | BL 背光控制,高电平点亮 | | | 3V3 电源 | BL 背光控制,高电平点亮 | | ||
| + | {{ :: | ||
| + | |||
| + | ===修改代码=== | ||
| + | 首先,保证有openwrt_widora的代码并且编译过,因为涉及到内核代码修改,不编译是找不到内核源码的。 | ||
| + | |||
| + | 1 进入内核视频驱动目录:cd build_dir/ | ||
| + | |||
| + | 2 使用git下载fbtft工程到这里:git clone https:// | ||
| + | mangodeMacBook-Pro: | ||
| + | Kconfig | ||
| + | Makefile | ||
| + | backlight | ||
| + | mangodeMacBook-Pro: | ||
| + | |||
| + | 3 运行如下两句,让内核知道你这里添加了驱动 | ||
| + | * 在video/ | ||
| + | * {{:: | ||
| + | * 在video/ | ||
| + | * {{:: | ||
| + | |||
| + | 4 回到openwrt_widora根目录,运行make kernel_menuconfig,找 | ||
| + | Device Drivers | ||
| + | Character devices | ||
| + | |||
| + | {{:: | ||
| + | |||
| + | Graphics support | ||
| + | | ||
| + | {{:: | ||
| + | |||
| + | 分别展开看: | ||
| + | | ||
| + | < > Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) | ||
| + | | ||
| + | Frame buffer Devices | ||
| + | <*> Support for small TFT LCD display modules | ||
| + | < | ||
| + | |||
| + | | ||
| + | | ||
| + | -*- Backlight & LCD device support | ||
| + | |||
| + | Console display driver support | ||
| + | {{:: | ||
| + | |||
| + | Bootup logo ---> | ||
| + | [ ] | ||
| + | | ||
| + | | ||
| + | |||
| + | 配置完后,推出时保存配置。 | ||
| + | {{:: | ||
| + | |||
| + | 5 修改DTS,这里对应NEO,我们修改Widora32M.dts,路径是:target/ | ||
| + | 从105行,spidev@1这一段整体换成: | ||
| + | | ||
| + | # | ||
| + | # | ||
| + | | ||
| + | | ||
| + | reg = <1 0>; | ||
| + | | ||
| + | | ||
| + | | ||
| + | bgr; | ||
| + | fps = <15>; | ||
| + | | ||
| + | | ||
| + | }; | ||
| + | |||
| + | 改好的DTS在此: {{ :: | ||
| + | |||
| + | 回到openwrt_widora根目录开始编译,make V=s | ||
| + | 由于配置内核后,会和openwrt里个别选项冲突,例如有如下需要手动选择的情况,按照正常平台选择即可。 | ||
| + | {{:: | ||
| + | |||
| + | ===颜色反了=== | ||
| + | 修改fb_ili9341.c,在0x11前增加一条0x21指令: | ||
| + | write_reg(par, | ||
| + | write_reg(par, | ||
| + | 修改后编译,刷入NEO。 | ||
| + | |||
| + | ===自动关屏幕问题=== | ||
| + | 在drivers/ | ||
| + | |||
| + | ===测试=== | ||
| + | |||
| + | 不出意外,可以看到启动logo了: | ||
| + | |||
| + | {{:: | ||
| + | |||
| + | 终端,可以看到/ | ||
| + | |||
| + | {{:: | ||
| + | |||
| + | 把随机数打印到屏幕,不出意外看到花屏,root@Widora: | ||
| + | |||
| + | {{:: | ||
| + | 把屏幕例化成了很多tty设备,所以也可以往屏幕打印字符了: | ||
| + | root@Widora: | ||
| + | root@Widora: | ||
| + | root@Widora: | ||
| + | root@Widora: | ||
| + | root@Widora: | ||
| + | | ||
| + | 效果: | ||
| + | {{:: | ||
ips.1516413968.txt.gz · Last modified: (external edit)
