Zephyr API Documentation 4.4.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
input_mchp_touch_api.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2026 Microchip Technology Inc.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
13#ifndef ZEPHYR_INCLUDE_INPUT_MCHP_TOUCH_H_
14#define ZEPHYR_INCLUDE_INPUT_MCHP_TOUCH_H_
15
23#ifdef __cplusplus
24extern "C" {
25#endif
26
39#define QTM_KEY_STATE_DISABLE 0x00u
40
46#define QTM_KEY_STATE_INIT 0x01u
47
53#define QTM_KEY_STATE_CAL 0x02u
54
60#define QTM_KEY_STATE_NO_DET 0x03u
61
67#define QTM_KEY_STATE_FILT_IN 0x04u
68
74#define QTM_KEY_STATE_DETECT 0x85u
75
81#define QTM_KEY_STATE_FILT_OUT 0x86u
82
88#define QTM_KEY_STATE_ANTI_TCH 0x07u
89
95#define QTM_KEY_STATE_SUSPEND 0x08u
96
102#define QTM_KEY_STATE_CAL_ERR 0x09u
103
110#define KEY_TOUCHED_MASK 0x80u
111
120uint16_t get_sensor_node_signal(const struct device *dev, uint16_t sensor_node);
121
129void update_sensor_node_signal(const struct device *dev,
130 uint16_t sensor_node,
131 uint16_t new_signal);
132
142 uint16_t sensor_node);
143
152 uint16_t sensor_node,
153 uint16_t new_reference);
154
165uint16_t get_sensor_cc_val(const struct device *dev, uint16_t sensor_node);
166
176void update_sensor_cc_val(const struct device *dev,
177 uint16_t sensor_node,
178 uint16_t new_cc_value);
179
189uint8_t get_sensor_state(const struct device *dev, uint16_t sensor_node);
190
202void update_sensor_state(const struct device *dev,
203 uint16_t sensor_node,
204 uint8_t new_state);
205
214void calibrate_node(const struct device *dev, uint16_t sensor_node);
215
224void suspend_sensor(const struct device *dev, uint16_t sensor_node);
225
234void resume_sensor(const struct device *dev, uint16_t sensor_node);
235
244
253uint8_t get_scroller_state(const struct device *dev, uint16_t sensor_node);
254
264 uint16_t sensor_node);
265
266#ifdef __cplusplus
267}
268#endif
269
/* mchp_ptc_sensor_states */ /* mchp_ptc_interface */
272
273#endif /* ZEPHYR_INCLUDE_INPUT_MCHP_TOUCH_H_ */
uint16_t get_sensor_node_signal(const struct device *dev, uint16_t sensor_node)
Get the signal value of a sensor node.
uint8_t get_sensor_state(const struct device *dev, uint16_t sensor_node)
Get the state of a sensor node.
void calibrate_node(const struct device *dev, uint16_t sensor_node)
Calibrate a sensor node.
uint16_t get_sensor_cc_val(const struct device *dev, uint16_t sensor_node)
Get the compensation capacitance of a sensor node.
void update_sensor_node_reference(const struct device *dev, uint16_t sensor_node, uint16_t new_reference)
Update the reference value of a sensor node.
uint16_t get_sensor_node_reference(const struct device *dev, uint16_t sensor_node)
Get the reference value of a sensor node.
void update_sensor_cc_val(const struct device *dev, uint16_t sensor_node, uint16_t new_cc_value)
Update the compensation capacitance of a sensor node.
void update_sensor_node_signal(const struct device *dev, uint16_t sensor_node, uint16_t new_signal)
Update the signal value of a sensor node.
uint8_t get_def_no_of_sensors(const struct device *dev)
Get the number of configured sensor nodes.
uint16_t get_scroller_position(const struct device *dev, uint16_t sensor_node)
Get the position of a scroller sensor.
uint8_t get_scroller_state(const struct device *dev, uint16_t sensor_node)
Get the state of a scroller sensor.
void update_sensor_state(const struct device *dev, uint16_t sensor_node, uint8_t new_state)
Update the state of a sensor node.
void resume_sensor(const struct device *dev, uint16_t sensor_node)
Resume a suspended sensor node.
void suspend_sensor(const struct device *dev, uint16_t sensor_node)
Suspend a sensor node.
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
Runtime device structure (in ROM) per driver instance.
Definition device.h:513