-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STM32: add PulseIn module #2697
Conversation
@tannewt could you check out the CI on this? I'm not sure how to get it to restart properly. It passed the failed tests previously. |
i restarted the jobs, but the checkout failed again. @hierophect could you maybe merge from upstream and push again? |
@dhalbert it cancelled itself again but it's on a board that passed previously - it's passed every test at this point, it just can't seem to do them all at once. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two minor suggestions on the interrupt handlers but good otherwise.
@tannewt revised, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Nice for loops! I hadn't thought that far ahead.
Feel free to merge once CI is happy.
Addresses issues adafruit#2697 and adafruit#5329. Signed-off-by: Damien George <damien@micropython.org>
This PR adds the PulseIn module to the STM32 port, used for IR pulse reading. Tested on the Feather STM32F405 and PybNano V2 - records the same data as a control M4 Express, and sends trigger pulses of the correct duration. Currently handles all interrupts generated by EXTI - if external interrupts are eventually used for power wakeup, some of this HAL-level code may need to be factored out into Microcontroller or a similar shared location.