Files
2026-01-12 18:46:01 +08:00

40 lines
672 B
C

/**
* @file touch_dev.h
* @touch dev head file.
*
* @Copyright (c) 2022 Semidrive Semiconductor.
* @All rights reserved.
*
**/
#ifndef TOUCH_DEV_H_
#define TOUCH_DEV_H_
#include <sdrv_i2c.h>
#include <udelay/udelay.h>
typedef struct {
char *name;
sdrv_i2c_t *i2c_ctrl;
int i2c_addr;
int irq;
int rst;
} touch_dev_t;
typedef struct {
uint16_t id;
uint16_t x;
uint16_t y;
} touch_point_t;
typedef struct {
uint16_t touch_num;
touch_point_t touch_point[10];
} touch_data_t;
#define ts_mdelay(x) udelay(x * 1000)
extern touch_data_t *sdrv_touch_data_pointer(void);
extern int sdrv_touch_init(sdrv_i2c_t *i2c_ctrl);
#endif