(盈鹏飞嵌入式T113-S4主板)-电容式触摸屏测试(gt911)

SBC-T113S产品特性:

  • 采用Allwinner公司Cortex-A7双核T113-S3/S4处理器,运行最高速度为1.2GHZ;
  • 内置64-bit XuanTie C906 RISC-V协处理器(仅T113-S4支持);
  • 支持JPEG/MJPEG视频编码,最大分辨率1080p@60fps;支持多格式1080P@60fps视频解码 (H.265,H.264, MPEG-1/2/4);
  • 支持RGB666/LVDS/MIPI-DSI,分辨率最高1920x1080;
  • 支持128-256M Bytes DDR3 SDRAM,其中T113-S3内置128MB;T113-S4内置256MB;
  • 支持SPI NAND存储和启动(默认:256MB)或者EMMC启动(默认:4GB,最大32GB);
  • 支持一路USB2.0 OTG(设计为TYPE-A接口);支持二路USB2.0 HOST;
  • 支持七路RS232通信或者6路RS232和1路RS485(非隔离);
  • 支持一路CAN BUS通信(非隔离);
  • 支持一路10/100M以太网;
  • 稳定的操作系统的支持,可预装LINUX 5.4(Preempt)或者OpenWRT;
  • 经典尺寸主板,尺寸为120*100MM;

SBC-T113S产品功能评估图:

电容式触摸屏测试(gt911): 

本章节只介绍我司EAC-LCD70L液晶屏(1024X600分辨率)上配套的GT911电容式触摸的使用方法。

SBC-T113S主板通过CN30接口连接GT911电容式触摸屏,CN30接口位置如下图:

图42 电容式触摸屏连接器位置 

CN30的接口定义如下:

脚位

定义

说明

1

CTP_NRST

复位信号,连接处理器的PE1

2

VCC3V3_IO

电源3.3V

3

GND

4

CTP_INT

中断信号,连接处理器的PE0

5

CTP_SDA

I2C2串行数据信号,连接处理器的PE13,上拉4.7K

6

CTP_SCL

I2C2串行时钟信号,连接处理器的PE12,上拉4.7K

 CN30是使用的FPC0.5mm_1x6的连接线,满足如上线序的电容式触摸屏均可连接。

当该触摸屏正常连接到主板时,主板终端会出现如下信息:

[    0.580104] 001: get ctp_power is fail, -22

[    0.580116] 001: get ctp_power_ldo_vol is fail, -22

[    0.580130] 001: sunxi_ctp_startup: ctp_power_io is invalid.

[    0.580173] 001: get ctp_gesture_wakeup fail, no gesture wakeup

[    0.580198] 001: gt9xxnew_ts 2-0014: 2-0014 supply ctp not found, using dummy regulator

[    0.745390] 000: sunxi-i2c sunxi-i2c2: drv-mode: dma read data end

[    0.769471] 001: input: gt9xxnew_ts as /devices/virtual/input/input4

可以通过以下指令更详细的了解触摸屏的信息:

Target# cat /proc/bus/input/devices

root@T113-Embfly:~# cat /proc/bus/input/devices

I: Bus=0019 Vendor=0001 Product=0001 Version=0100

N: Name="sunxi-ts"

P: Phys=sunxi_ts/input0

S: Sysfs=/devices/platform/soc@3000000/2009c00.rtp/input/input1

U: Uniq=

H: Handlers=event1

B: PROP=0

B: EV=b

B: KEY=400 0 0 0 0 0 0 0 0 0 0

B: ABS=3

I: Bus=0019 Vendor=0001 Product=0001 Version=0100

N: Name="sunxi-gpadc0"

P: Phys=sunxigpadc0/input0

S: Sysfs=/devices/virtual/input/input2

U: Uniq=

H: Handlers=kbd event2

B: PROP=0

B: EV=100003

B: KEY=c0000 0 0 0

I: Bus=0000 Vendor=0000 Product=0000 Version=0000

N: Name="audiocodec sunxi Audio Jack"

P: Phys=ALSA

S: Sysfs=/devices/platform/soc@3000000/2030340.sound/sound/card0/input3

U: Uniq=

H: Handlers=kbd event3

B: PROP=0

B: EV=23

B: KEY=40 0 0 0 0 0 0 0 0 0 0 4 0 0 0 c0000 0 0 0

B: SW=14

I: Bus=0018 Vendor=dead Product=beef Version=28bb

N: Name="gt9xxnew_ts"

P: Phys=2b▒

S: Sysfs=/devices/virtual/input/input4

U: Uniq=

H: Handlers=kbd event4

B: PROP=2

B: EV=b

B: KEY=400 0 0 7f8 0 0 0 100000 0 0 0

B: ABS=2650000 0

GT911触摸屏的名字是"gt9xxnew_ts",用户可以通过节点event4来访问它。因电容式触摸屏不需要校验,一般使用evtest命令测试触摸有响应即表示正常。

终端执行“evtest”进入测试界面,这里event5对应的名字为“gt9xxnew_ts”,因此测试界面选择4按下回车即可开始测试:

Target# evtest

root@T113-Embfly:~# evtest

No device specified, trying to scan all of /dev/input/event*

Available devices:

/dev/input/event0:      sunxi-keyboard

/dev/input/event1:      sunxi-ts

/dev/input/event2:      sunxi-gpadc0

/dev/input/event3:      audiocodec sunxi Audio Jack

/dev/input/event4:      gt9xxnew_ts

Select the device event number [0-4]: 4

Input driver version is 1.0.1

Input device ID: bus 0x18 vendor 0xdead product 0xbeef version 0x28bb

Input device name: "gt9xxnew_ts"

Supported events:

  Event type 0 (EV_SYN)

  Event type 1 (EV_KEY)

    Event code 116 (KEY_POWER)

    Event code 227 (KEY_SWITCHVIDEOMODE)

    Event code 228 (KEY_KBDILLUMTOGGLE)

    Event code 229 (KEY_KBDILLUMDOWN)

    Event code 230 (KEY_KBDILLUMUP)

    Event code 231 (KEY_SEND)

    Event code 232 (KEY_REPLY)

    Event code 233 (KEY_FORWARDMAIL)

    Event code 234 (KEY_SAVE)

    Event code 330 (BTN_TOUCH)

  Event type 3 (EV_ABS)

    Event code 48 (ABS_MT_TOUCH_MAJOR)

      Value      0

      Min        0

      Max      255

    Event code 50 (ABS_MT_WIDTH_MAJOR)

      Value      0

      Min        0

      Max      255

    Event code 53 (ABS_MT_POSITION_X)

      Value      0

      Min        0

      Max     1024

    Event code 54 (ABS_MT_POSITION_Y)

      Value      0

      Min        0

      Max      600

    Event code 57 (ABS_MT_TRACKING_ID)

      Value      0

      Min        0

      Max      255

Properties:

  Property type 1 (INPUT_PROP_DIRECT)

Testing ... (interrupt to exit)

Event: time 47.491062, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1

Event: time 47.491062, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 548

Event: time 47.491062, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 316

Event: time 47.491062, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 23

Event: time 47.491062, type 3 (EV_ABS), code 50 (ABS_MT_WIDTH_MAJOR), value 23

Event: time 47.491062, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0

Event: time 47.491062, ++++++++++++++ SYN_MT_REPORT ++++++++++++

Event: time 47.491062, -------------- SYN_REPORT ------------

Event: time 47.505268, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 548

Event: time 47.505268, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 316

Event: time 47.505268, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 23

Event: time 47.505268, type 3 (EV_ABS), code 50 (ABS_MT_WIDTH_MAJOR), value 23

Event: time 47.505268, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0

Event: time 47.505268, ++++++++++++++ SYN_MT_REPORT ++++++++++++

Event: time 47.505268, -------------- SYN_REPORT ------------

Event: time 47.519633, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 548

Event: time 47.519633, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 316

Event: time 47.519633, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 23

Event: time 47.519633, type 3 (EV_ABS), code 50 (ABS_MT_WIDTH_MAJOR), value 23

Event: time 47.519633, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0

Event: time 47.519633, ++++++++++++++ SYN_MT_REPORT ++++++++++++

Event: time 47.519633, -------------- SYN_REPORT ------------

用手轻触电容式触摸,可以看到终端中有坐标信息显示出来。

  • 15
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值