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

Add an RTIC example #295

Merged
merged 2 commits into from
Apr 14, 2021
Merged

Add an RTIC example #295

merged 2 commits into from
Apr 14, 2021

Conversation

phoracek
Copy link

This example presents integration with RTIC [1]. Built for STM32F4
Discovery, toggles an onboard LED upon an interrupt fired by an onboard
button.

[1] https://rtic.rs/

Signed-off-by: Petr Horacek hrck@protonmail.com

@phoracek phoracek force-pushed the rtic branch 2 times, most recently from 9efc1e7 to 1785395 Compare April 10, 2021 09:59
examples/rtic.rs Outdated
Comment on lines 35 to 38
stm32::NVIC::unpend(stm32::Interrupt::EXTI0);
unsafe {
stm32::NVIC::unmask(stm32::Interrupt::EXTI0);
};
Copy link
Contributor

@samcrow samcrow Apr 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The RTIC-generated code unmasks the interrupt before calling init, so we don't need to unmask it again here.

Copy link
Author

@phoracek phoracek Apr 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I missed that. Thanks for the review. It should be fixed now

This example presents integration with RTIC [1]. Built for STM32F4
Discovery, toggles an onboard LED upon an interrupt fired by an onboard
button.

[1] https://rtic.rs/

Signed-off-by: Petr Horacek <hrck@protonmail.com>
therealprof
therealprof previously approved these changes Apr 14, 2021
Copy link
Member

@therealprof therealprof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, thanks!

bors r+

@bors
Copy link
Contributor

bors bot commented Apr 14, 2021

Merge conflict.

Copy link
Member

@therealprof therealprof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

@bors bors bot merged commit 2090a28 into stm32-rs:master Apr 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants