|
Zephyr API Documentation 4.4.0
A Scalable Open Source RTOS
|
Sensor-state values used by the Microchip PTC driver. More...
Macros | |
| #define | QTM_KEY_STATE_DISABLE 0x00u |
| Disabled sensor state. | |
| #define | QTM_KEY_STATE_INIT 0x01u |
| Sensor initialization state. | |
| #define | QTM_KEY_STATE_CAL 0x02u |
| Sensor calibration state. | |
| #define | QTM_KEY_STATE_NO_DET 0x03u |
| No-touch-detected sensor state. | |
| #define | QTM_KEY_STATE_FILT_IN 0x04u |
| Touch filter-in state. | |
| #define | QTM_KEY_STATE_DETECT 0x85u |
| Touch-detected sensor state. | |
| #define | QTM_KEY_STATE_FILT_OUT 0x86u |
| Touch filter-out state. | |
| #define | QTM_KEY_STATE_ANTI_TCH 0x07u |
| Anti-touch sensor state. | |
| #define | QTM_KEY_STATE_SUSPEND 0x08u |
| Sensor suspend state. | |
| #define | QTM_KEY_STATE_CAL_ERR 0x09u |
| Sensor calibration-error state. | |
| #define | KEY_TOUCHED_MASK 0x80u |
| Mask for the logical in-detect state. | |
Functions | |
| uint16_t | get_sensor_node_signal (const struct device *dev, uint16_t sensor_node) |
| Get the signal value 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. | |
| 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_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_cc_val (const struct device *dev, uint16_t sensor_node) |
| Get the compensation capacitance 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. | |
| uint8_t | get_sensor_state (const struct device *dev, uint16_t sensor_node) |
| Get the state of a sensor node. | |
| void | update_sensor_state (const struct device *dev, uint16_t sensor_node, uint8_t new_state) |
| Update the state of a sensor node. | |
| void | calibrate_node (const struct device *dev, uint16_t sensor_node) |
| Calibrate a sensor node. | |
| void | suspend_sensor (const struct device *dev, uint16_t sensor_node) |
| Suspend a sensor node. | |
| void | resume_sensor (const struct device *dev, uint16_t sensor_node) |
| Resume a suspended sensor node. | |
| uint8_t | get_def_no_of_sensors (const struct device *dev) |
| Get the number of configured sensor nodes. | |
| uint8_t | get_scroller_state (const struct device *dev, uint16_t sensor_node) |
| Get the state of a scroller sensor. | |
| uint16_t | get_scroller_position (const struct device *dev, uint16_t sensor_node) |
| Get the position of a scroller sensor. | |
Sensor-state values used by the Microchip PTC driver.
| #define KEY_TOUCHED_MASK 0x80u |
#include <zephyr/input/input_mchp_touch_api.h>
Mask for the logical in-detect state.
Bit 7 indicates that the sensor is in a touch-detection state. This bit is set for the detect and filter-out states.
| #define QTM_KEY_STATE_ANTI_TCH 0x07u |
#include <zephyr/input/input_mchp_touch_api.h>
Anti-touch sensor state.
The sensor is in the anti-touch state.
| #define QTM_KEY_STATE_CAL 0x02u |
#include <zephyr/input/input_mchp_touch_api.h>
Sensor calibration state.
The sensor is undergoing calibration.
| #define QTM_KEY_STATE_CAL_ERR 0x09u |
#include <zephyr/input/input_mchp_touch_api.h>
Sensor calibration-error state.
The sensor calibration operation failed.
| #define QTM_KEY_STATE_DETECT 0x85u |
#include <zephyr/input/input_mchp_touch_api.h>
Touch-detected sensor state.
An active touch is detected on the sensor.
| #define QTM_KEY_STATE_DISABLE 0x00u |
#include <zephyr/input/input_mchp_touch_api.h>
Disabled sensor state.
Measurement is disabled for the sensor.
| #define QTM_KEY_STATE_FILT_IN 0x04u |
#include <zephyr/input/input_mchp_touch_api.h>
Touch filter-in state.
A confirmation scan is in progress to verify that a touch has occurred.
| #define QTM_KEY_STATE_FILT_OUT 0x86u |
#include <zephyr/input/input_mchp_touch_api.h>
Touch filter-out state.
A confirmation scan is in progress to verify that the touch has ended.
| #define QTM_KEY_STATE_INIT 0x01u |
#include <zephyr/input/input_mchp_touch_api.h>
Sensor initialization state.
The sensor is being initialized.
| #define QTM_KEY_STATE_NO_DET 0x03u |
#include <zephyr/input/input_mchp_touch_api.h>
No-touch-detected sensor state.
No active touch is detected on the sensor.
| #define QTM_KEY_STATE_SUSPEND 0x08u |
#include <zephyr/input/input_mchp_touch_api.h>
Calibrate a sensor node.
This function starts the calibration process for the specified sensor node.
| dev | Pointer to the PTC device. |
| sensor_node | Sensor node number. |
#include <zephyr/input/input_mchp_touch_api.h>
Get the number of configured sensor nodes.
| dev | Pointer to the PTC device. |
#include <zephyr/input/input_mchp_touch_api.h>
Get the position of a scroller sensor.
| dev | Pointer to the PTC device. |
| sensor_node | Sensor node number associated with the scroller. |
#include <zephyr/input/input_mchp_touch_api.h>
Get the state of a scroller sensor.
| dev | Pointer to the PTC device. |
| sensor_node | Sensor node number associated with the scroller. |
#include <zephyr/input/input_mchp_touch_api.h>
Get the compensation capacitance of a sensor node.
The compensation capacitance is also referred to as the CC value.
| dev | Pointer to the PTC device. |
| sensor_node | Sensor node number. |
#include <zephyr/input/input_mchp_touch_api.h>
Get the reference value of a sensor node.
| dev | Pointer to the PTC device. |
| sensor_node | Sensor node number. |
#include <zephyr/input/input_mchp_touch_api.h>
Get the signal value of a sensor node.
| dev | Pointer to the PTC device. |
| sensor_node | Sensor node number. |
#include <zephyr/input/input_mchp_touch_api.h>
Get the state of a sensor node.
| dev | Pointer to the PTC device. |
| sensor_node | Sensor node number. |
#include <zephyr/input/input_mchp_touch_api.h>
Resume a suspended sensor node.
This function resumes operation of the specified sensor node.
| dev | Pointer to the PTC device. |
| sensor_node | Sensor node number. |
#include <zephyr/input/input_mchp_touch_api.h>
Suspend a sensor node.
This function suspends operation of the specified sensor node.
| dev | Pointer to the PTC device. |
| sensor_node | Sensor node number. |
| void update_sensor_cc_val | ( | const struct device * | dev, |
| uint16_t | sensor_node, | ||
| uint16_t | new_cc_value | ||
| ) |
#include <zephyr/input/input_mchp_touch_api.h>
Update the compensation capacitance of a sensor node.
The compensation capacitance is also referred to as the CC value.
| dev | Pointer to the PTC device. |
| sensor_node | Sensor node number. |
| new_cc_value | New compensation capacitance value for the sensor node. |
| void update_sensor_node_reference | ( | const struct device * | dev, |
| uint16_t | sensor_node, | ||
| uint16_t | new_reference | ||
| ) |
#include <zephyr/input/input_mchp_touch_api.h>
Update the reference value of a sensor node.
| dev | Pointer to the PTC device. |
| sensor_node | Sensor node number. |
| new_reference | New reference value for the sensor node. |
| void update_sensor_node_signal | ( | const struct device * | dev, |
| uint16_t | sensor_node, | ||
| uint16_t | new_signal | ||
| ) |
#include <zephyr/input/input_mchp_touch_api.h>
Update the signal value of a sensor node.
| dev | Pointer to the PTC device. |
| sensor_node | Sensor node number. |
| new_signal | New signal value for the sensor node. |
#include <zephyr/input/input_mchp_touch_api.h>
Update the state of a sensor node.
| dev | Pointer to the PTC device. |
| sensor_node | Sensor node number. |
| new_state | New state for the sensor node. See PTC Sensor States for the valid values. |