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