47 lines
1.0 KiB
C
47 lines
1.0 KiB
C
#ifndef TP_IT7259_H
|
|
#define TP_IT7259_H
|
|
|
|
#include "imsensors/common/sensors_common.h"
|
|
|
|
typedef enum {
|
|
IT7259_PRES_NONE = 0U,
|
|
IT7259_PRES_HOVER = 1U,
|
|
IT7259_PRES_LIGHT = 2U,
|
|
IT7259_PRES_NORMAL = 4U,
|
|
IT7259_PRES_HIGH = 8U,
|
|
IT7259_PRES_HEAVY = 0x0FU,
|
|
} ims_it7259_pres_t;
|
|
|
|
typedef struct {
|
|
ims_i2c_xfer_t i2c_xfer;
|
|
ims_delay_t delay;
|
|
} ims_it7259_cb_t;
|
|
|
|
typedef struct {
|
|
uint32_t rom_version;
|
|
uint32_t fw_version;
|
|
uint8_t vendor_fw_version;
|
|
} ims_it7259_sensor_fw_info_t;
|
|
|
|
typedef struct {
|
|
uint8_t id;
|
|
uint16_t pos_x;
|
|
uint16_t pos_y;
|
|
ims_it7259_pres_t pres;
|
|
} ims_it7259_point_t;
|
|
|
|
typedef struct {
|
|
ims_it7259_cb_t cb;
|
|
void *pdev;
|
|
|
|
ims_it7259_sensor_fw_info_t fw_info;
|
|
|
|
uint16_t resolution_x;
|
|
uint16_t resolution_y;
|
|
} ims_it7259_t;
|
|
|
|
ims_ret_t ims_it7259_init(ims_it7259_t *tp);
|
|
ims_ret_t ims_it7259_read_points(ims_it7259_t *tp, uint8_t *num_tp, ims_it7259_point_t *points);
|
|
|
|
#endif // TP_IT7259_H
|