ESP32: Add Quadrature Encoder and Pulse Counter classes.#19239
ESP32: Add Quadrature Encoder and Pulse Counter classes.#19239IhorNehrutsa wants to merge 6 commits into
Conversation
Co-Authored-By: robert-hh <robert@hammelrath.com> Co-Authored-By: Jonathan Hogg <me@jonathanhogg.com> Signed-off-by: IhorNehrutsa <Ihor.Nehrutsa@gmail.com>
|
Code size report: |
927084c to
6044972
Compare
1205c14 to
8f64762
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #19239 +/- ##
=======================================
Coverage 98.47% 98.47%
=======================================
Files 176 176
Lines 22845 22845
=======================================
Hits 22497 22497
Misses 348 348 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
d486b81 to
b7a8ded
Compare
Update machine_encoder.c
f8dc3e9 to
82e2bfe
Compare
|
@robert-hh |
|
@IhorNehrutsa self.counter.init(in_pin, direction=Counter.UP, match=100)
self.counter.irq(handler=callback, trigger=Counter.IRQ_MATCH) |
82e2bfe to
676b293
Compare
|
micropython/docs/library/machine.Counter.rst Line 144 in 8d81160 Does |
|
c7195db to
b3527aa
Compare
There is no Counter.status() or Encoder.status() method. irq().flags() returns the flag which caused the IRQ to happen. And that may be different for Counter and Encoder. |
|
@robert-hh |
|
Try to call |
|
@robert-hh micropython/ports/mimxrt/machine_encoder.c Line 685 in dc33f04 after line micropython/ports/mimxrt/machine_encoder.c Line 691 in dc33f04 |
I did not use generative AI tools when creating this PR.