39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
51#include "drv_i2c_master.h"
73#define TOUCHPAD4_REG_INFO_FLAGS 0x10
74#define TOUCHPAD4_REG_GESTURES 0x11
75#define TOUCHPAD4_REG_RELATIVE_X 0x12
76#define TOUCHPAD4_REG_RELATIVE_Y 0x13
77#define TOUCHPAD4_REG_FINGER1_X 0x14
78#define TOUCHPAD4_REG_FINGER1_Y 0x15
79#define TOUCHPAD4_REG_FINGER1_TOUCH_STR 0x16
80#define TOUCHPAD4_REG_FINGER1_AREA 0x17
81#define TOUCHPAD4_REG_FINGER2_X 0x18
82#define TOUCHPAD4_REG_FINGER2_Y 0x19
83#define TOUCHPAD4_REG_FINGER2_TOUCH_STR 0x1A
84#define TOUCHPAD4_REG_FINGER2_AREA 0x1B
85#define TOUCHPAD4_REG_TOUCH_STATUS0 0x20
86#define TOUCHPAD4_REG_TOUCH_STATUS1 0x21
87#define TOUCHPAD4_REG_TOUCH_STATUS2 0x22
88#define TOUCHPAD4_REG_ALP_CHANNEL_COUNT 0x23
89#define TOUCHPAD4_REG_ALP_CHANNEL_LTA 0x24
90#define TOUCHPAD4_REG_ALP_COUNT_A 0x25
91#define TOUCHPAD4_REG_ALP_COUNT_B 0x26
92#define TOUCHPAD4_REG_TRACKPAD_ATI_MULT_DIV 0x30
93#define TOUCHPAD4_REG_TRACKPAD_ATI_COMP_DIV 0x31
94#define TOUCHPAD4_REG_TRACKPAD_ATI_TARGET 0x32
95#define TOUCHPAD4_REG_TRACKPAD_REF_DRIFT_LIMIT 0x33
96#define TOUCHPAD4_REG_TRACKPAD_MIN_CNT_REATI_VAL 0x34
97#define TOUCHPAD4_REG_REATI_RETRY_TIME 0x35
98#define TOUCHPAD4_REG_ALP_ATI_MULT_DIV 0x36
99#define TOUCHPAD4_REG_ALP_ATI_COMP_DIV 0x37
100#define TOUCHPAD4_REG_ALP_ATI_TARGET 0x38
101#define TOUCHPAD4_REG_ALP_ATI_DRIFT_LIMIT 0x39
102#define TOUCHPAD4_REG_ALP_ATI_COMP_A 0x3A
103#define TOUCHPAD4_REG_ALP_ATI_COMP_B 0x3B
104#define TOUCHPAD4_REG_ACTIVE_MODE_REPORT_RATE 0x40
105#define TOUCHPAD4_REG_IDLE_TOUCH_MODE_REPORT_RATE 0x41
106#define TOUCHPAD4_REG_IDLE_MODE_REPORT_RATE 0x42
107#define TOUCHPAD4_REG_LP1_MODE_REPORT_RATE 0x43
108#define TOUCHPAD4_REG_LP2_MODE_REPORT_RATE 0x44
109#define TOUCHPAD4_REG_ACTIVE_MODE_TIMEOUT 0x45
110#define TOUCHPAD4_REG_IDLE_TOUCH_MODE_TIMEOUT 0x46
111#define TOUCHPAD4_REG_IDLE_MODE_TIMEOUT 0x47
112#define TOUCHPAD4_REG_LP1_MODE_TIMEOUT 0x48
113#define TOUCHPAD4_REG_REFERENCE_UPDATE_TIME 0x49
114#define TOUCHPAD4_REG_I2C_TIMEOUT 0x4A
115#define TOUCHPAD4_REG_SYSTEM_CONTROL 0x50
116#define TOUCHPAD4_REG_CONFIG_SETTINGS 0x51
117#define TOUCHPAD4_REG_OTHER_SETTINGS 0x52
118#define TOUCHPAD4_REG_TOUCH_CLEAR_SET_THRESH 0x53
119#define TOUCHPAD4_REG_ALP_THRESH 0x54
120#define TOUCHPAD4_REG_OPEN_0 0x55
121#define TOUCHPAD4_REG_ALP_CLEAR_SET_DEBOUNCE 0x56
122#define TOUCHPAD4_REG_OPEN_1 0x57
123#define TOUCHPAD4_REG_TRACKPAD_CONVER_FREQ 0x58
124#define TOUCHPAD4_REG_ALP_CONVER_FREQ 0x59
125#define TOUCHPAD4_REG_TRACKPAD_HW_SETTINGS 0x5A
126#define TOUCHPAD4_REG_ALP_HW_SETTINGS 0x5B
127#define TOUCHPAD4_REG_TOTAL_RXS_TRACKPAD_SETTINGS 0x60
128#define TOUCHPAD4_REG_MAX_MULTITOUCHES_TOTAL_TXS 0x61
129#define TOUCHPAD4_REG_X_RES 0x62
130#define TOUCHPAD4_REG_Y_RES 0x63
131#define TOUCHPAD4_REG_XY_DYNAMIC_FILTER_BOT_SPEED 0x64
132#define TOUCHPAD4_REG_XY_DYNAMIC_FILTER_TOP_SPEED 0x65
133#define TOUCHPAD4_REG_STATIC_FILTER_VAL_DYNAMIC_FILTER_BOT 0x66
134#define TOUCHPAD4_REG_FINGER_SPLIT_STAT_TOUCH_MOVE_THRESH 0x67
135#define TOUCHPAD4_REG_X_TRIM_VALUE 0x68
136#define TOUCHPAD4_REG_Y_TRIM_VALUE 0x69
137#define TOUCHPAD4_REG_ALP_COUNT_FILTER_BETA 0x70
138#define TOUCHPAD4_REG_LP2_LP1_BETA 0x71
139#define TOUCHPAD4_REG_ALP_SETUP 0x72
140#define TOUCHPAD4_REG_ALP_TX_ENABLE 0x73
141#define TOUCHPAD4_REG_SETTINGS_MAJOR_MINOR_VER 0x74
142#define TOUCHPAD4_REG_GESTURE_ENABLE 0x80
143#define TOUCHPAD4_REG_TAP_TIME 0x81
144#define TOUCHPAD4_REG_TAP_DIST 0x82
145#define TOUCHPAD4_REG_HOLD_TIME 0x83
146#define TOUCHPAD4_REG_SWIPE_TIME 0x84
147#define TOUCHPAD4_REG_SWIPE_X_DIST 0x85
148#define TOUCHPAD4_REG_SWIPE_Y_DIST 0x86
149#define TOUCHPAD4_REG_SWIPE_ANGLE 0x87
150#define TOUCHPAD4_REG_RXTX_MAP_1_0 0x90
151#define TOUCHPAD4_REG_RXTX_MAP_3_2 0x91
152#define TOUCHPAD4_REG_RXTX_MAP_5_4 0x92
153#define TOUCHPAD4_REG_RXTX_MAP_7_6 0x93
154#define TOUCHPAD4_REG_RXTX_MAP_9_8 0x94
155#define TOUCHPAD4_REG_RXTX_MAP_11_10 0x95
156#define TOUCHPAD4_REG_RXTX_MAP_13_12 0x96
157#define TOUCHPAD4_REG_1st_CHANNEL_FOR_CYCLE0 0xA0
158#define TOUCHPAD4_REG_2nd_CHANNEL_FOR_CYCLE0 0xA1
159#define TOUCHPAD4_REG_2nd1st_CHANNEL_FOR_CYCLE1 0xA2
160#define TOUCHPAD4_REG_1st_CHANNEL_FOR_CYCLE2 0xA3
161#define TOUCHPAD4_REG_2nd_CHANNEL_FOR_CYCLE2 0xA4
162#define TOUCHPAD4_REG_2nd1st_CHANNEL_FOR_CYCLE3 0xA5
163#define TOUCHPAD4_REG_1st_CHANNEL_FOR_CYCLE4 0xA6
164#define TOUCHPAD4_REG_2nd_CHANNEL_FOR_CYCLE4 0xA7
165#define TOUCHPAD4_REG_2nd1st_CHANNEL_FOR_CYCLE5 0xA8
166#define TOUCHPAD4_REG_1st_CHANNEL_FOR_CYCLE6 0xA9
167#define TOUCHPAD4_REG_2nd_CHANNEL_FOR_CYCLE6 0xAA
168#define TOUCHPAD4_REG_2nd1st_CHANNEL_FOR_CYCLE7 0xAB
169#define TOUCHPAD4_REG_1st_CHANNEL_FOR_CYCLE8 0xAC
170#define TOUCHPAD4_REG_2nd_CHANNEL_FOR_CYCLE8 0xAD
171#define TOUCHPAD4_REG_2nd1st_CHANNEL_FOR_CYCLE9 0xAE
172#define TOUCHPAD4_REG_1st_CHANNEL_FOR_CYCLE10 0xB0
173#define TOUCHPAD4_REG_2nd_CHANNEL_FOR_CYCLE10 0xB1
174#define TOUCHPAD4_REG_2nd1st_CHANNEL_FOR_CYCLE11 0xB2
175#define TOUCHPAD4_REG_1st_CHANNEL_FOR_CYCLE12 0xB3
176#define TOUCHPAD4_REG_2nd_CHANNEL_FOR_CYCLE12 0xB4
177#define TOUCHPAD4_REG_2nd1st_CHANNEL_FOR_CYCLE13 0xB5
178#define TOUCHPAD4_REG_1st_CHANNEL_FOR_CYCLE14 0xB6
179#define TOUCHPAD4_REG_2nd_CHANNEL_FOR_CYCLE14 0xB7
180#define TOUCHPAD4_REG_2nd1st_CHANNEL_FOR_CYCLE15 0xB8
181#define TOUCHPAD4_REG_1st_CHANNEL_FOR_CYCLE16 0xB9
182#define TOUCHPAD4_REG_2nd_CHANNEL_FOR_CYCLE16 0xBA
183#define TOUCHPAD4_REG_2nd1st_CHANNEL_FOR_CYCLE17 0xBB
184#define TOUCHPAD4_REG_TRACKPAD_COUNT_VAL 0xE0
185#define TOUCHPAD4_REG_TRACKPAD_REF_VAL 0xE1
186#define TOUCHPAD4_REG_TRACKPAD_DELTA_VAL 0xE2
187#define TOUCHPAD4_REG_TRACKPAD_ATI_COMPENSATION_VAL 0xE3
205#define TOUCHPAD4_TP_ATI_MULTIPLIERS_DIVIDERS_0 0xE1
206#define TOUCHPAD4_TP_ATI_MULTIPLIERS_DIVIDERS_1 0x3B
207#define TOUCHPAD4_TP_COMPENSATION_DIV_0 0x0F
208#define TOUCHPAD4_TP_COMPENSATION_DIV_1 0x00
209#define TOUCHPAD4_TP_ATI_TARGET_0 0xFA
210#define TOUCHPAD4_TP_ATI_TARGET_1 0x00
211#define TOUCHPAD4_TP_REF_DRIFT_LIMIT_0 0x32
212#define TOUCHPAD4_TP_REF_DRIFT_LIMIT_1 0x00
213#define TOUCHPAD4_TP_MIN_COUNT_REATI_0 0x32
214#define TOUCHPAD4_TP_MIN_COUNT_REATI_1 0x00
215#define TOUCHPAD4_REATI_RETRY_TIME_0 0x05
216#define TOUCHPAD4_REATI_RETRY_TIME_1 0x00
217#define TOUCHPAD4_ALP_ATI_MULTIPLIERS_DIVIDERS_0 0x82
218#define TOUCHPAD4_ALP_ATI_MULTIPLIERS_DIVIDERS_1 0x28
219#define TOUCHPAD4_ALP_COMPENSATION_DIV_0 0x05
220#define TOUCHPAD4_ALP_COMPENSATION_DIV_1 0x00
221#define TOUCHPAD4_ALP_ATI_TARGET_0 0xFA
222#define TOUCHPAD4_ALP_ATI_TARGET_1 0x00
223#define TOUCHPAD4_ALP_LTA_DRIFT_LIMIT_0 0x14
224#define TOUCHPAD4_ALP_LTA_DRIFT_LIMIT_1 0x00
230#define TOUCHPAD4_ALP_COMPENSATION_A_0 0xC4
231#define TOUCHPAD4_ALP_COMPENSATION_A_1 0x01
232#define TOUCHPAD4_ALP_COMPENSATION_B_0 0xE8
233#define TOUCHPAD4_ALP_COMPENSATION_B_1 0x01
239#define TOUCHPAD4_ACTIVE_MODE_REPORT_RATE_0 0x0A
240#define TOUCHPAD4_ACTIVE_MODE_REPORT_RATE_1 0x00
241#define TOUCHPAD4_IDLE_TOUCH_MODE_REPORT_RATE_0 0x32
242#define TOUCHPAD4_IDLE_TOUCH_MODE_REPORT_RATE_1 0x00
243#define TOUCHPAD4_IDLE_MODE_REPORT_RATE_0 0x32
244#define TOUCHPAD4_IDLE_MODE_REPORT_RATE_1 0x00
245#define TOUCHPAD4_LP1_MODE_REPORT_RATE_0 0x32
246#define TOUCHPAD4_LP1_MODE_REPORT_RATE_1 0x00
247#define TOUCHPAD4_LP2_MODE_REPORT_RATE_0 0x64
248#define TOUCHPAD4_LP2_MODE_REPORT_RATE_1 0x00
249#define TOUCHPAD4_ACTIVE_MODE_TIMEOUT_0 0x0A
250#define TOUCHPAD4_ACTIVE_MODE_TIMEOUT_1 0x00
251#define TOUCHPAD4_IDLE_TOUCH_MODE_TIMEOUT_0 0x3C
252#define TOUCHPAD4_IDLE_TOUCH_MODE_TIMEOUT_1 0x00
253#define TOUCHPAD4_IDLE_MODE_TIMEOUT_0 0x14
254#define TOUCHPAD4_IDLE_MODE_TIMEOUT_1 0x00
255#define TOUCHPAD4_LP1_MODE_TIMEOUT_0 0x0A
256#define TOUCHPAD4_LP1_MODE_TIMEOUT_1 0x00
257#define TOUCHPAD4_REF_UPDATE_TIME_0 0x08
258#define TOUCHPAD4_REF_UPDATE_TIME_1 0x00
259#define TOUCHPAD4_I2C_TIMEOUT_0 0x64
260#define TOUCHPAD4_I2C_TIMEOUT_1 0x00
266#define TOUCHPAD4_SYSTEM_CONTROL_0 0x00
267#define TOUCHPAD4_SYSTEM_CONTROL_1 0x00
268#define TOUCHPAD4_CONFIG_SETTINGS0 0x3C
269#define TOUCHPAD4_CONFIG_SETTINGS1 0x06
270#define TOUCHPAD4_OTHER_SETTINGS_0 0x20
271#define TOUCHPAD4_OTHER_SETTINGS_1 0xFF
272#define TOUCHPAD4_TRACKPAD_TOUCH_SET_THRESHOLD 0x1A
273#define TOUCHPAD4_TRACKPAD_TOUCH_CLEAR_THRESHOLD 0x14
274#define TOUCHPAD4_ALP_THRESHOLD_0 0x08
275#define TOUCHPAD4_ALP_THRESHOLD_1 0x00
276#define TOUCHPAD4_OPEN_0_0 0xFF
277#define TOUCHPAD4_OPEN_0_1 0xFF
278#define TOUCHPAD4_ALP_SET_DEBOUNCE 0x02
279#define TOUCHPAD4_ALP_CLEAR_DEBOUNCE 0x04
280#define TOUCHPAD4_OPEN_1_0 0xFF
281#define TOUCHPAD4_OPEN_1_1 0xFF
282#define TOUCHPAD4_TP_CONVERSION_FREQUENCY_UP_PASS_LENGTH 0x05
283#define TOUCHPAD4_TP_CONVERSION_FREQUENCY_FRACTION_VALUE 0x7F
284#define TOUCHPAD4_ALP_CONVERSION_FREQUENCY_UP_PASS_LENGTH 0x05
285#define TOUCHPAD4_ALP_CONVERSION_FREQUENCY_FRACTION_VALUE 0x7F
286#define TOUCHPAD4_TRACKPAD_HARDWARE_SETTINGS_0 0x01
287#define TOUCHPAD4_TRACKPAD_HARDWARE_SETTINGS_1 0x0D
288#define TOUCHPAD4_ALP_HARDWARE_SETTINGS_0 0x65
289#define TOUCHPAD4_ALP_HARDWARE_SETTINGS_1 0x1D
295#define TOUCHPAD4_TRACKPAD_SETTINGS_0_0 0x28
296#define TOUCHPAD4_TRACKPAD_SETTINGS_0_1 0x04
297#define TOUCHPAD4_TRACKPAD_SETTINGS_1_0 0x05
298#define TOUCHPAD4_TRACKPAD_SETTINGS_1_1 0x01
299#define TOUCHPAD4_X_RESOLUTION_0 0x00
300#define TOUCHPAD4_X_RESOLUTION_1 0x03
301#define TOUCHPAD4_Y_RESOLUTION_0 0x00
302#define TOUCHPAD4_Y_RESOLUTION_1 0x04
303#define TOUCHPAD4_XY_DYNAMIC_FILTER_BOTTOM_SPEED_0 0x06
304#define TOUCHPAD4_XY_DYNAMIC_FILTER_BOTTOM_SPEED_1 0x00
305#define TOUCHPAD4_XY_DYNAMIC_FILTER_TOP_SPEED_0 0x7C
306#define TOUCHPAD4_XY_DYNAMIC_FILTER_TOP_SPEED_1 0x00
307#define TOUCHPAD4_XY_DYNAMIC_FILTER_BOTTOM_BETA 0x07
308#define TOUCHPAD4_XY_DYNAMIC_FILTER_STATIC_FILTER_BETA 0x80
309#define TOUCHPAD4_STATIONARY_TOUCH_MOV_THRESHOLD 0x14
310#define TOUCHPAD4_FINGER_SPLIT_FACTOR 0x00
311#define TOUCHPAD4_X_TRIM_VALUE_0 0x14
312#define TOUCHPAD4_X_TRIM_VALUE_1 0x00
313#define TOUCHPAD4_Y_TRIM_VALUE_0 0x14
314#define TOUCHPAD4_Y_TRIM_VALUE_1 0x00
320#define TOUCHPAD4_ALP_COUNT_FILTER_BETA_0 0xB4
321#define TOUCHPAD4_OPEN_0 0x00
322#define TOUCHPAD4_ALP_LTA_BETA_LP1 0x06
323#define TOUCHPAD4_ALP_LTA_BETA_LP2 0x04
324#define TOUCHPAD4_ALP_SETUP_0 0x33
325#define TOUCHPAD4_ALP_SETUP_1 0x03
326#define TOUCHPAD4_ALP_TX_ENABLE_0 0x40
327#define TOUCHPAD4_ALP_TX_ENABLE_1 0x05
333#define TOUCHPAD4_MINOR_VERSION 0x00
334#define TOUCHPAD4_MAJOR_VERSION 0x01
340#define TOUCHPAD4_GESTURE_ENABLE_0 0x3F
341#define TOUCHPAD4_GESTURE_ENABLE_1 0x0F
342#define TOUCHPAD4_TAP_TIME_0 0x96
343#define TOUCHPAD4_TAP_TIME_1 0x00
344#define TOUCHPAD4_TAP_DISTANCE_0 0x32
345#define TOUCHPAD4_TAP_DISTANCE_1 0x00
346#define TOUCHPAD4_HOLD_TIME_0 0x2C
347#define TOUCHPAD4_HOLD_TIME_1 0x01
348#define TOUCHPAD4_SWIPE_TIME_0 0x96
349#define TOUCHPAD4_SWIPE_TIME_1 0x00
350#define TOUCHPAD4_SWIPE_X_DISTANCE_0 0xC8
351#define TOUCHPAD4_SWIPE_X_DISTANCE_1 0x00
352#define TOUCHPAD4_SWIPE_Y_DISTANCE_0 0xC8
353#define TOUCHPAD4_SWIPE_Y_DISTANCE_1 0x00
354#define TOUCHPAD4_SWIPE_ANGLE_0 0x17
355#define TOUCHPAD4_GESTURE_OPEN_0 0x00
361#define TOUCHPAD4_RX_TX_MAP_0 0x05
362#define TOUCHPAD4_RX_TX_MAP_1 0x04
363#define TOUCHPAD4_RX_TX_MAP_2 0x01
364#define TOUCHPAD4_RX_TX_MAP_3 0x00
365#define TOUCHPAD4_RX_TX_MAP_4 0x0A
366#define TOUCHPAD4_RX_TX_MAP_5 0x09
367#define TOUCHPAD4_RX_TX_MAP_6 0x08
368#define TOUCHPAD4_RX_TX_MAP_7 0x07
369#define TOUCHPAD4_RX_TX_MAP_8 0x06
370#define TOUCHPAD4_RX_TX_MAP_9 0x0A
371#define TOUCHPAD4_RX_TX_MAP_10 0x09
372#define TOUCHPAD4_RX_TX_MAP_11 0x08
373#define TOUCHPAD4_RX_TX_MAP_12 0x00
374#define TOUCHPAD4_RX_TX_MAP_13 0x00
380#define TOUCHPAD4_PLACEHOLDER_0 0x05
381#define TOUCHPAD4_CH_1_CYCLE_0 0x00
382#define TOUCHPAD4_CH_2_CYCLE_0 0x02
383#define TOUCHPAD4_PLACEHOLDER_1 0x05
384#define TOUCHPAD4_CH_1_CYCLE_1 0x01
385#define TOUCHPAD4_CH_2_CYCLE_1 0x03
386#define TOUCHPAD4_PLACEHOLDER_2 0x05
387#define TOUCHPAD4_CH_1_CYCLE_2 0x04
388#define TOUCHPAD4_CH_2_CYCLE_2 0x06
389#define TOUCHPAD4_PLACEHOLDER_3 0x05
390#define TOUCHPAD4_CH_1_CYCLE_3 0x05
391#define TOUCHPAD4_CH_2_CYCLE_3 0x07
392#define TOUCHPAD4_PLACEHOLDER_4 0x05
393#define TOUCHPAD4_CH_1_CYCLE_4 0x08
394#define TOUCHPAD4_CH_2_CYCLE_4 0x0A
395#define TOUCHPAD4_PLACEHOLDER_5 0x05
396#define TOUCHPAD4_CH_1_CYCLE_5 0x09
397#define TOUCHPAD4_CH_2_CYCLE_5 0x0B
398#define TOUCHPAD4_PLACEHOLDER_6 0x05
399#define TOUCHPAD4_CH_1_CYCLE_6 0x0C
400#define TOUCHPAD4_CH_2_CYCLE_6 0x0E
401#define TOUCHPAD4_PLACEHOLDER_7 0x05
402#define TOUCHPAD4_CH_1_CYCLE_7 0x0D
403#define TOUCHPAD4_CH_2_CYCLE_7 0x0F
404#define TOUCHPAD4_PLACEHOLDER_8 0x05
405#define TOUCHPAD4_CH_1_CYCLE_8 0x10
406#define TOUCHPAD4_CH_2_CYCLE_8 0x12
407#define TOUCHPAD4_PLACEHOLDER_9 0x05
408#define TOUCHPAD4_CH_1_CYCLE_9 0x11
409#define TOUCHPAD4_CH_2_CYCLE_9 0x13
415#define TOUCHPAD4_PLACEHOLDER_10 0x05
416#define TOUCHPAD4_CH_1_CYCLE_10 0xFF
417#define TOUCHPAD4_CH_2_CYCLE_10 0xFF
418#define TOUCHPAD4_PLACEHOLDER_11 0x05
419#define TOUCHPAD4_CH_1_CYCLE_11 0xFF
420#define TOUCHPAD4_CH_2_CYCLE_11 0xFF
421#define TOUCHPAD4_PLACEHOLDER_12 0x05
422#define TOUCHPAD4_CH_1_CYCLE_12 0xFF
423#define TOUCHPAD4_CH_2_CYCLE_12 0xFF
424#define TOUCHPAD4_PLACEHOLDER_13 0x05
425#define TOUCHPAD4_CH_1_CYCLE_13 0xFF
426#define TOUCHPAD4_CH_2_CYCLE_13 0xFF
427#define TOUCHPAD4_PLACEHOLDER_14 0x05
428#define TOUCHPAD4_CH_1_CYCLE_14 0xFF
429#define TOUCHPAD4_CH_2_CYCLE_14 0xFF
430#define TOUCHPAD4_PLACEHOLDER_15 0x05
431#define TOUCHPAD4_CH_1_CYCLE_15 0xFF
432#define TOUCHPAD4_CH_2_CYCLE_15 0xFF
433#define TOUCHPAD4_PLACEHOLDER_16 0x05
434#define TOUCHPAD4_CH_1_CYCLE_16 0xFF
435#define TOUCHPAD4_CH_2_CYCLE_16 0xFF
436#define TOUCHPAD4_PLACEHOLDER_17 0x05
437#define TOUCHPAD4_CH_1_CYCLE_17 0xFF
438#define TOUCHPAD4_CH_2_CYCLE_17 0xFF
445#define TOUCHPAD4_SET_DEV_ADDR 0x56
463#define TOUCHPAD4_MAP_MIKROBUS( cfg, mikrobus ) \
464 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
465 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
466 cfg.mclr = MIKROBUS( mikrobus, MIKROBUS_RST ); \
467 cfg.rdy = MIKROBUS( mikrobus, MIKROBUS_INT )
err_t touchpad4_generic_write(touchpad4_t *ctx, uint8_t reg, uint16_t tx_data)
Touchpad 4 I2C writing function.
err_t touchpad4_init(touchpad4_t *ctx, touchpad4_cfg_t *cfg)
Touchpad 4 initialization function.
uint8_t touchpad4_get_ready(touchpad4_t *ctx)
Get ready pin state.
err_t touchpad_get_channels(touchpad4_t *ctx, uint32_t *channels)
Read channel information.
void touchpad4_reset(touchpad4_t *ctx)
Reset function.
void touchpad4_cfg_setup(touchpad4_cfg_t *cfg)
Touchpad 4 configuration object setup function.
err_t touchpad4_generic_read(touchpad4_t *ctx, uint8_t reg, uint16_t *rx_data)
Touchpad 4 I2C reading function.
void touchpad4_set_rst(touchpad4_t *ctx, uint8_t state)
Set reset pin state.
err_t touchpad4_get_touch(touchpad4_t *ctx, touchpad4_info_t *touch_info)
Read touch informations.
err_t touchpad4_default_cfg(touchpad4_t *ctx)
Touchpad 4 default configuration function.
Touchpad 4 Click configuration object.
Definition touchpad4.h:498
uint32_t i2c_speed
Definition touchpad4.h:505
pin_name_t scl
Definition touchpad4.h:499
pin_name_t mclr
Definition touchpad4.h:502
pin_name_t rdy
Definition touchpad4.h:503
pin_name_t sda
Definition touchpad4.h:500
uint8_t i2c_address
Definition touchpad4.h:506
Touchpad 4 Click touchpad information object.
Definition touchpad4.h:528
uint8_t number_of_touches
Definition touchpad4.h:529
Touchpad 4 Click context object.
Definition touchpad4.h:477
i2c_master_t i2c
Definition touchpad4.h:485
uint8_t event_enabled
Definition touchpad4.h:489
uint8_t slave_address
Definition touchpad4.h:488
digital_out_t mclr
Definition touchpad4.h:479
digital_in_t rdy
Definition touchpad4.h:482
Touchpad 4 Click touch object.
Definition touchpad4.h:515
int16_t area
Definition touchpad4.h:519
int16_t strength
Definition touchpad4.h:518
int16_t x
Definition touchpad4.h:516
int16_t y
Definition touchpad4.h:517
touchpad4_return_value_t
Touchpad 4 Click return value data.
Definition touchpad4.h:539
@ TOUCHPAD4_ERROR
Definition touchpad4.h:541
@ TOUCHPAD4_OK
Definition touchpad4.h:540