ART-Pi在rt-thread studio中使用touchgfx与触摸屏GT1151的适配

首先感谢大佬手把手操作,我们做下来,不出意外的话编译没有错误,我们也需要根据大佬的文章进行操作,但是有一个问题就是ART-Pi中Touchgfx默认的是GT9147触摸屏,如果使用其它的触摸屏就需要在在这里插入图片描述
中适配,由于时间原因长话短说,完成大佬的操作后,可以看到显示屏上显示demo但是并不能进行触摸操作,我们需要在在这里插入图片描述
这个文件中适配修改,比方说我使用的GT1151,先把GT1151的示例在工程中注释掉,然后根据GT1151的示例进行修改。
直接上代码:使用其它的触摸屏应该也是一样的方法。

/**
  ******************************************************************************
  * File Name          : STM32TouchController.cpp
  ******************************************************************************
  * @attention
  *
  * <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
  * All rights reserved.</center></h2>
  *
  * This software component is licensed by ST under Ultimate Liberty license
  * SLA0044, the "License"; You may not use this file except in compliance with
  * the License. You may obtain a copy of the License at:
  *                             www.st.com/SLA0044
  *
  ******************************************************************************
  */

/* USER CODE BEGIN STM32TouchController */

#include <STM32TouchController.hpp>
#include <rtthread.h>

#include "gt1151.h"
#include <touch.h>
#include <rtdevice.h>

#define DBG_TAG "gt1151_sample"
#define DBG_LVL DBG_LOG
#include <rtdbg.h>



#ifdef PKG_USING_GT1151


int gt1151_init(void)
{
  
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值