ESP32 Pulse Counter Driver
Add a driver for ESP32 Pulse Counter Hardware.
Related to: #5214
ESP32: New hardware PCNT Counter() and Encoder().
This PR consistent to
docs\machine: Add Counter and Encoder classes #8072
ESP32 Pulse Counter
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/pcnt.html
Wrapped around
https://github.com/espressif/esp-idf/blob/master/components/driver/include/driver/pcnt.h
https://github.com/espressif/esp-idf/blob/master/components/hal/include/hal/pcnt_types.h
https://github.com/espressif/esp-idf/blob/master/components/driver/pcnt.c
See also
https://github.com/espressif/esp-idf/tree/master/examples/peripherals/pcnt/pulse_count_event
ESP32 Quadrature Encoder based on Pulse Counter(PCNT)
Based on
https://github.com/madhephaestus/ESP32Encoder
https://github.com/bboser/MicroPython_ESP32_psRAM_LoBo/blob/quad_decoder/MicroPython_BUILD/components/micropython/esp32/machine_dec.c
See also
https://github.com/espressif/esp-idf/tree/master/examples/peripherals/pcnt/rotary_encoder
If your port does not support hardware encoder use machine.Pin() Interrupt-based MicroPython quadrature incremental encoder
UPDATE:
This pull request is not possible to rebase on master.
Please switch to the
ESP32: Add Quadrature Encoder and Pulse Counter classes. https://github.com/micropython/micropython/pull/8766