|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
ESP32 PCNT driver public extensions. More...
#include <zephyr/drivers/sensor.h>Go to the source code of this file.
Macros | |
| #define | SENSOR_CHAN_PCNT_ESP32_UNIT(n) |
Produce a sensor_channel value selecting PCNT unit n. | |
Enumerations | |
| enum | sensor_attribute_pcnt_esp32 { SENSOR_ATTR_PCNT_ESP32_RESET = SENSOR_ATTR_PRIV_START } |
| PCNT-specific sensor attributes. More... | |
ESP32 PCNT driver public extensions.
Helpers for addressing a specific PCNT unit through the legacy sensor_attr_set()/sensor_attr_get()/sensor_trigger_set() APIs, which do not natively carry a channel index. Multi-unit access through the Read-and-Decode API uses sensor_chan_spec.chan_idx directly and does not need these helpers.
| #define SENSOR_CHAN_PCNT_ESP32_UNIT | ( | n | ) |
Produce a sensor_channel value selecting PCNT unit n.
Pass as the chan argument of sensor_attr_set/attr_get or the chan field of struct sensor_trigger to target unit n. Unit 0 may also be addressed with SENSOR_CHAN_ROTATION or SENSOR_CHAN_ENCODER_COUNT.