48#include "drv_i2c_master.h"
49#include "drv_digital_in.h"
81#define FT5XX6_REG_DEVICE_MODE 0x0
88#define FT5XX6_REG_GEST_ID 0x1
94#define FT5XX6_REG_TD_STATUS 0x2
101#define FT5XX6_REG_TOUCH1_XH 0x3
108#define FT5XX6_REG_TOUCH1_XL 0x4
115#define FT5XX6_REG_TOUCH1_YH 0x5
122#define FT5XX6_REG_TOUCH1_YL 0x6
129#define FT5XX6_REG_TOUCH2_XH 0x9
136#define FT5XX6_REG_TOUCH2_XL 0xA
143#define FT5XX6_REG_TOUCH2_YH 0xB
150#define FT5XX6_REG_TOUCH2_YL 0xC
157#define FT5XX6_REG_TOUCH3_XH 0xF
164#define FT5XX6_REG_TOUCH3_XL 0x10
171#define FT5XX6_REG_TOUCH3_YH 0x11
178#define FT5XX6_REG_TOUCH3_YL 0x12
185#define FT5XX6_REG_TOUCH4_XH 0x15
192#define FT5XX6_REG_TOUCH4_XL 0x16
199#define FT5XX6_REG_TOUCH4_YH 0x17
206#define FT5XX6_REG_TOUCH4_YL 0x18
213#define FT5XX6_REG_TOUCH5_XH 0x1B
220#define FT5XX6_REG_TOUCH5_XL 0x1C
227#define FT5XX6_REG_TOUCH5_YH 0x1D
234#define FT5XX6_REG_TOUCH5_YL 0x1E
241#define FT5XX6_REG_TOUCH_DET_TH 0x80
248#define FT5XX6_REG_TOUCH_PEAK_DET_TH 0x81
255#define FT5XX6_REG_TOUCH_TH_CAL 0x82
262#define FT5XX6_REG_TOUCH_TH_WATER 0x83
269#define FT5XX6_REG_TOUCH_TH_TEMP_COMP 0x84
276#define FT5XX6_REG_POWER_CTRL_MODE 0x86
283#define FT5XX6_REG_MONITOR_STATUS_TMR 0x87
290#define FT5XX6_REG_MONITOR_ACT_PERIOD 0x88
297#define FT5XX6_REG_ENTER_IDLE_TIMER 0x89
304#define FT5XX6_REG_AUTO_CALIB_MODE 0xA0
311#define FT5XX6_REG_LIB_VERSION_H 0xA1
318#define FT5XX6_REG_LIB_VERSION_L 0xA2
325#define FT5XX6_REG_LIB_CHIP_VENDOR_ID 0xA3
332#define FT5XX6_REG_IVT_TO_HOST_STATUS 0xA4
339#define FT5XX6_REG_POWER_CONSUME_MODE 0xA5
346#define FT5XX6_REG_FW_ID 0xA6
353#define FT5XX6_REG_RUNNING_STATE 0xA7
360#define FT5XX6_REG_CTPM_VENDOR_ID 0xA8
366#define FT5XX6_REG_ERROR_ID 0xA9
373#define FT5XX6_REG_CONFIGURE_CAL_MODE 0xAA
380#define FT5XX6_REG_BIG_AREA_TH 0xAE
399#define FT5XX6_INT_MODE_POLLING 0
405#define FT5XX6_INT_MODE_TRIGGER 1
411#define FT5XX6_I2C_ADDR 0x38
417#define FT5XX6_N_DATA_TRANSFER_MIN 1
418#define FT5XX6_N_DATA_TRANSFER_MAX 256
424#define FT5XX6_GESTURE_ITEMS_MAX 7
430#define FT5XX6_EVENT_PRESS_DET 0x80
447#define FT5XX6_MASK_PRESS_COORD 0xFFF
453#define FT5XX6_MASK_PRESS_EVENT 0xC0
459#define FT5XX6_MASK_PRESS_DET 0xC0
465#define FT5XX6_MASK_TP_NUM 0xF
484#define FT5XX6_OFFSET_PRESS_EVENT 6
490#define FT5XX6_OFFSET_PRESS_ID 4
496#define FT5XX6_OFFSET_DEV_MODE 4
502#define FT5XX6_OFFSET_TOUCH_READING 6
510#define FT5XX6_MAP_PINS( cfg ) \
511 cfg.i2c_cfg.scl = CTP_SCL; \
512 cfg.i2c_cfg.sda = CTP_SDA; \
513 cfg.int_pin = CTP_INT
814 uint8_t * data_out, uint16_t n_bytes );
const ft5xx6_controller_t FT5X26_CONTROLLER
FT5x26 Touch Controllers Descriptor.
ft5xx6_run_mode_t
FT5xx6 Run Mode Settings.
@ FT5XX6_RUN_MODE_AUTO_CAL
const ft5xx6_controller_t FT5X16_CONTROLLER
FT5x16 Touch Controllers Descriptor.
const ft5xx6_controller_t FT5X46_CONTROLLER
FT5x46 Touch Controllers Descriptor.
ft5xx6_dev_mode_t
FT5xx6 Device Mode Settings.
@ FT5XX6_DEV_MODE_SYS_INFO
const ft5xx6_controller_t FT5X06_CONTROLLER
FT5x06 Touch Controllers Descriptor.
#define FT5XX6_GESTURE_ITEMS_MAX
FT5xx6 Gesture Items Limit Setting.
void ft5xx6_run_mode_setup(ft5xx6_t *ctx, ft5xx6_run_mode_t mode)
FT5xx6 Run Mode Setup Function.
uint8_t ft5xx6_generic_read_single(ft5xx6_t *ctx, uint8_t reg_addr)
FT5xx6 Generic Single Read Function.
void ft5xx6_press_coordinates(ft5xx6_t *ctx, tp_touch_item_t *touch_item)
FT5xx6 Pressure Coordinates Check Function.
tp_err_t ft5xx6_init(ft5xx6_t *ctx, ft5xx6_cfg_t *cfg, tp_drv_t *drv)
FT5xx6 Initialization Function.
void ft5xx6_cfg_setup(ft5xx6_cfg_t *cfg, const ft5xx6_controller_t *controller)
FT5xx6 Configuration Object Setup Function.
tp_event_t ft5xx6_press_detect(ft5xx6_t *ctx)
FT5xx6 Touch Pressure Detect Function.
void ft5xx6_dev_mode_setup(ft5xx6_t *ctx, ft5xx6_dev_mode_t mode)
FT5xx6 Device Mode Setup Function.
void ft5xx6_gesture(ft5xx6_t *ctx, tp_event_t *event)
FT5xx6 Gesture Check Function.
void ft5xx6_generic_write(ft5xx6_t *ctx, uint8_t reg_addr, uint8_t data_in)
FT5xx6 Generic Write Function.
void ft5xx6_default_cfg(ft5xx6_t *ctx)
FT5xx6 Default Configuration Function.
tp_err_t ft5xx6_process(ft5xx6_t *ctx)
FT5xx6 Process Function.
tp_err_t ft5xx6_generic_read_multiple(ft5xx6_t *ctx, uint8_t reg_addr, uint8_t *data_out, uint16_t n_bytes)
FT5xx6 Generic Multiple Read Function.
FT5xx6 Configuration Object.
const ft5xx6_controller_t * controller
i2c_master_config_t i2c_cfg
FT5xx6 Gesture Item Definition.
const ft5xx6_controller_t * controller