当前位置: 首页 > java >正文

【全志V821_FoxPi】3-2 Linux 5.4 SPI + XPT2046触摸(ADS7846) + tslib

【全志V821_FoxPi】3-2 Linux 5.4 SPI + XPT2046触摸 + tslib

  • 一、背景
  • 二、内核使能ADS7846
  • 三、设备树修改
    • 3-1 查找配置方法
    • 3-2 修改设备树
  • 四、添加tslib
    • 4-1 tslib简介
    • 4-2 添加tslib软件包
  • 五、编译打包烧录
  • 六、触摸校准
  • 七、触摸测试
  • 八、完善文件系统
    • 8-1 pointercal
    • 8-2 profile
  • 九、再次编译打包测试

一、背景

手上有一块3.5寸的TFT屏,电阻触摸,芯片型号是XPT2046,但是搜了内核,并没有相同名字的驱动
在这里插入图片描述

后来百度搜了一下,似乎XPT2046和ADS7846是通用的,于是开始尝试移植

在这里插入图片描述

二、内核使能ADS7846

make kernel_menuconfig

然后搜索 ADS7846
在这里插入图片描述

使能该配置
在这里插入图片描述

三、设备树修改

3-1 查找配置方法

通过 find 查找设备树的配置
find ./ -name "*ads7846*"

root@foxpi:/opt/V821_SDK_V1.1# find ./ -name "*ads7846*"
./out/v821/kernel/build/include/config/touchscreen/ads7846.h
./out/v821/kernel/build/drivers/input/touchscreen/ads7846.o
./out/v821/kernel/build/drivers/input/touchscreen/.ads7846.o.cmd
./kernel/linux-5.4-ansc/Documentation/devicetree/bindings/input/touchscreen/ads7846.txt
./kernel/linux-5.4-ansc/include/linux/spi/ads7846.h
./kernel/linux-5.4-ansc/drivers/input/touchscreen/ads7846.c

cat ./kernel/linux-5.4-ansc/Documentation/devicetree/bindings/input/touchscreen/ads7846.txt

Example for a TSC2046 chip connected to an McSPI controller of an OMAP SoC::spi_controller {tsc2046@0 {reg = <0>;      /* CS0 */compatible = "ti,tsc2046";interrupt-parent = <&gpio1>;interrupts = <8 0>;     /* BOOT6 / GPIO 8 */spi-max-frequency = <1000000>;pendown-gpio = <&gpio1 8 0>;vcc-supply = <&reg_vcc3>;ti,x-min = /bits/ 16 
http://www.xdnf.cn/news/14644.html

相关文章:

  • 如何进行 iOS App 混淆加固?IPA 加壳与资源保护实战流程
  • Rust——什么是高滑点交易,以及在DashMap` 中怎么快速筛选它
  • RS485 vs CAN总线:工业通信双雄的深度对决
  • 云原生灰度方案对比:服务网格灰度(Istio ) 与 K8s Ingress 灰度(Nginx Ingress )
  • Redis—持久化
  • 【Redis】Redis的下载安装和配置
  • 221. 最大正方形
  • SpringCloud系列(37)--搭建SpringCloud Gateway
  • MySQL为什么默认引擎是InnoDB?
  • 深度学习入门--(二)感知机
  • 微信小程序中scss、ts、wxml
  • DEAPDataset的EEG脑电图数据(Emotion_Prediction)使用介绍【第一期】
  • 【请关注】实操mongodb集群部署
  • APISIX
  • 鸿蒙Next仓颉开发语言中的数据类型总结分享
  • Spring 容器核心扩展实战:Spring Boot中三大扩展问题解析
  • sql格式化自动识别SQL语法结构
  • 大塘至浦北高速:解锁分布式光伏“交能融合”密码,引领绿色交通革命
  • 掌握CIS基准合规性:通过自动化简化网络安全
  • 磐维数据库PanWeiDB V2.0-S3.1.1_B01集中式一主二备安装
  • 细谈QT信号与槽机制
  • 覆盖迁移工具选型、增量同步策略与数据一致性校验
  • Unity3D仿星露谷物语开发70之背景音乐
  • 内存泄漏和内存溢出的区别
  • 【机器学习深度学习】非线性激活函数
  • Linux零基础快速入门到精通
  • 学习记录:DAY33
  • 2025.6.24总结
  • 用 Python 打造立体数据世界:3D 堆叠条形图绘制全解析
  • HTML炫酷烟花