mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 19:20:22 +01:00
esp32/modesp32: Add esp32.PCNT class.
Add a new `esp32.PCNT` class that provides complete, low-level support to the ESP32 PCNT pulse counting hardware units. This can be used as a building block to implement the higher-level `machine.Counter` and `machine.Encoder` classes. This is enabled by default on all OG, S2, S3, C6 boards, but not on C3 (as the PCNT peripheral is not supported). Original implementation by: Jonathan Hogg <me@jonathanhogg.com> Signed-off-by: Jim Mussared <jim.mussared@gmail.com> Signed-off-by: Angus Gratton <angus@redyak.com.au>
This commit is contained in:
committed by
Damien George
parent
bf6f229cf3
commit
c3f3339c87
@@ -299,6 +299,9 @@ static const mp_rom_map_elem_t esp32_module_globals_table[] = {
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_NVS), MP_ROM_PTR(&esp32_nvs_type) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_Partition), MP_ROM_PTR(&esp32_partition_type) },
|
||||
#if MICROPY_PY_ESP32_PCNT
|
||||
{ MP_ROM_QSTR(MP_QSTR_PCNT), MP_ROM_PTR(&esp32_pcnt_type) },
|
||||
#endif
|
||||
#if SOC_RMT_SUPPORTED
|
||||
{ MP_ROM_QSTR(MP_QSTR_RMT), MP_ROM_PTR(&esp32_rmt_type) },
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user