Skip to content
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

Merged
merged 5 commits into from
Mar 12, 2020
Merged

STM32: add PulseIn module #2697

merged 5 commits into from
Mar 12, 2020

Conversation

hierophect
Copy link
Collaborator

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.

@hierophect
Copy link
Collaborator Author

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

@dhalbert
Copy link
Collaborator

i restarted the jobs, but the checkout failed again. @hierophect could you maybe merge from upstream and push again?

@hierophect
Copy link
Collaborator Author

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

Copy link
Member

@tannewt tannewt left a 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.

ports/stm32f4/common-hal/pulseio/PulseIn.c Outdated Show resolved Hide resolved
ports/stm32f4/common-hal/pulseio/PulseIn.c Outdated Show resolved Hide resolved
@hierophect
Copy link
Collaborator Author

@tannewt revised, thanks!

@hierophect hierophect requested a review from tannewt March 12, 2020 19:05
Copy link
Member

@tannewt tannewt left a 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.

@hierophect hierophect merged commit dd21ec0 into adafruit:master Mar 12, 2020
@hierophect hierophect deleted the stm32-pulsein branch March 12, 2020 19:39
jepler pushed a commit to jepler/circuitpython that referenced this pull request Aug 27, 2021
Addresses issues adafruit#2697 and adafruit#5329.

Signed-off-by: Damien George <damien@micropython.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants