mcu_ab568x/app/platform/gui/ctp/spt5113/spt5113c.h
2025-05-30 18:03:10 +08:00

94 lines
2.2 KiB
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef __SPT5113C_H__
#define __SPT5113C_H__
#include "include.h"
#define CTP_STP5113_CHIP_ID (0x53)
#define TRUE true
#define FALSE false
/*
* 函数名spt5113c_init
* 描述 SPT5113C触摸初始化
* 输入 void
* 输出 bool 初始化成功返回true失败返回false
*/
bool spt5113c_init(void);
/*
* 函数名spt5113c_enter_sleep
* 描述 SPT5113C进入休眠
* 输入 void
* 输出 void
*/
void spt5113c_enter_sleep(void);
/*
* 函数名spt5113c_readkick
* 描述 SPT5113C读触摸数据
* 输入 void
* 输出 void
*/
void spt5113c_readkick(void);
/*
* 函数名spt5113c_get_point
* 描述 SPT5113C触摸坐标获取
* 输入 int32_t *x X坐标
* int32_t *y Y坐标
* 输出 bool 有触摸返回true无触摸返回false
*/
bool spt5113c_get_point(int32_t *x, int32_t *y);
/*
* 函数名spt5113c_wake_up
* 描述 SPT5113C唤醒
* 输入 void
* 输出 void
*/
void spt5113c_wake_up(void);
/*
* 函数名spt5113c_start_work
* 描述 SPT5113C按照默认频率运行
* 输入 void
* 输出 void
*/
void spt5113c_start_work(void);
/*
* 函数名spt5113c_start_work_with_scan
* 描述 SPT5113C运行并开始扫描跳频
* 输入 void
* 输出 void
*/
void spt5113c_start_work_with_scan(void);
/*
* 函数名spt5113c_start_work_with_freqset
* 描述 SPT5113C按照给定的频率运行
* 输入 uint8_t freqset 频率设置值
* 输出 void
*/
void spt5113c_start_work_with_freqset(uint16_t freqset);
/*
* 函数名spt5113c_freq_check_cmd_finish_get
* 描述 SPT5113C查询扫描跳频状态
* 输入 void
* 输出 bool 扫描跳频完成返回true未完成返回false
*/
bool spt5113c_freq_check_cmd_finish_get(void);
/*
* 函数名spt5113c_freq_get
* 描述 SPT5113C获取扫描跳频完成得到的频率
* 输入 void
* 输出 uint16_t 频率值
*/
uint16_t spt5113c_freq_result_get(void);
uint16_t spt5113c_freq_save_get(void);
void spt5113c_freq_save_set(uint16_t freqset);
#endif