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

Support for the STM32L0x0 subfamily #146

Draft
wants to merge 19 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/gpio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ macro_rules! gpio {
}

#[allow(dead_code)]
pub(crate) fn set_alt_mode(&self, mode: AltMode) {
pub fn set_alt_mode(&self, mode: AltMode) {
Copy link
Author

Choose a reason for hiding this comment

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

is there any reason not to make this public? I looked at other hal crates, they made this a private function, but referenced all the pin modes as function

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see a reason, but I'm not very familiar with that code. I also don't know why the #[allow(dead_code)] is here and on AltMode itself. Seems all very weird.

let mode = mode as u32;
let offset = 2 * $i;
let offset2 = 4 * $i;
Expand Down