Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

Espressif ESP32 pulse counter (PCNT). More...

Files

file  pcnt_esp32.h
 ESP32 PCNT driver public extensions.

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...

Detailed Description

Espressif ESP32 pulse counter (PCNT).

Macro Definition Documentation

◆ SENSOR_CHAN_PCNT_ESP32_UNIT

#define SENSOR_CHAN_PCNT_ESP32_UNIT ( n)

#include <zephyr/drivers/sensor/pcnt_esp32.h>

Value:
sensor_channel
Sensor channels.
Definition sensor.h:66
@ SENSOR_CHAN_PRIV_START
This and higher values are sensor specific.
Definition sensor.h:253

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.

Enumeration Type Documentation

◆ sensor_attribute_pcnt_esp32

#include <zephyr/drivers/sensor/pcnt_esp32.h>

PCNT-specific sensor attributes.

Enumerator
SENSOR_ATTR_PCNT_ESP32_RESET 

Clear the hardware counter of the addressed unit and reset the cached value to zero.

The val argument is ignored.