打印
[STM8]

关于stm8 电容触摸库的使用

[复制链接]
708|4
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
alvad|  楼主 | 2019-10-18 08:42 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
大家好,最近想用电容触摸库做样品。
看到大家有很多成功的案例,也下了触摸库例程,看来看去也不知道怎么用?
有谁可以指教一下,不胜感激。

我下的资料是STM8S_TouchSensing_Lib_V2.50
F:\我的资料\stm8 touch\STM8S_TouchSensing_Lib_Vme\Projects\Examples\STM8S207K6_Ex01\src



6) Getting started



This section detailed the steps to follow in order to build a touch-sensing application using the STM8S Touch-Sensing Driver:
•Copy the stm8_tsl_conf_RC_TOADAPT.h file to y**elopment folder.
•Rename this file in stm8_tsl_conf.h.
•Modify the stm8_tsl_conf.h file in order to adapt it to your application. See the Configuration file section for more details on the different settings.
•Include the stm8_tsl_api.h file to the main file.
#include "stm8_tsl_api.h"
•Add to your project, all the STM8S Touch-Sensing Driver files.
•Add the path to the STM8S Touch-Sensing Driver header files in the preprocessor section of your project.
•In the init section of the application, call the TSL_Init() function to initialize the TSL state machine.

/* Init TSL RC */TSL_Init();/* Init Application Keys */Init_keys(); •In the same init section, initialize the keys to be used by the application (i.e. IMPLEMENTED, ENABLED, DxSGroup).

sSCKeyInfo[0].Setting.b.IMPLEMENTED = 1;sSCKeyInfo[0].Setting.b.ENABLED = 1;sSCKeyInfo[0].DxSGroup = 0x01; •Call the TSL_Action() function in a continuous loop of the application.

for (;;) {  /* Run TSL RC state machine */  TSL_Action();  /* Run Application */  Application_Action();

使用特权

评论回复
沙发
alvad|  楼主 | 2019-10-18 09:19 | 只看该作者
希望有过类似工程经验的分享一下。
初始化配置里面需要注意什么,怎么读取某触摸键的值等。

使用特权

评论回复
板凳
renzheshengui| | 2019-11-14 08:42 | 只看该作者
我总是找不到合适的屏

使用特权

评论回复
地板
paotangsan| | 2019-11-14 08:44 | 只看该作者
我也处于摸索阶段

使用特权

评论回复
5
labasi| | 2019-11-14 08:47 | 只看该作者
帮楼主顶一下

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

2

主题

21

帖子

1

粉丝