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

Use internal pull-up in pico_spi_sd_card example #20

Merged
merged 2 commits into from
Sep 1, 2023

Conversation

@ithinuel ithinuel changed the base branch from main to hal-0.9 May 22, 2023 05:36
@ithinuel ithinuel force-pushed the experiment-gpio-overhaul branch 2 times, most recently from 274b672 to 6bde20a Compare May 22, 2023 05:38
@wlcx
Copy link

wlcx commented Aug 28, 2023

I think rp-rs/rp-hal#585 also changed the bsp_pins! macro syntax: I had to add pinmodes, e.g.

diff --git a/boards/rp-pico/src/lib.rs b/boards/rp-pico/src/lib.rs
index 1b574f4..c664eb2 100644
--- a/boards/rp-pico/src/lib.rs
+++ b/boards/rp-pico/src/lib.rs
@@ -83,17 +83,17 @@ hal::bsp_pins!(
         name: gpio0,
         aliases: {
             /// UART Function alias for pin [crate::Pins::gpio0].
-            FunctionUart: Gp0Uart0Tx,
+            FunctionUart, PullNone: Gp0Uart0Tx,
             /// SPI Function alias for pin [crate::Pins::gpio0].
-            FunctionSpi: Gp0Spi0Rx,
+            FunctionSpi, PullNone: Gp0Spi0Rx,
             /// I2C Function alias for pin [crate::Pins::gpio0].
-            FunctionI2C: Gp0I2C0Sda,
+            FunctionI2C, PullNone: Gp0I2C0Sda,
             /// PWM Function alias for pin [crate::Pins::gpio0].
-            FunctionPwm: Gp0Pwm0A,
+            FunctionPwm, PullNone: Gp0Pwm0A,
             /// PIO0 Function alias for pin [crate::Pins::gpio0].
-            FunctionPio0: Gp0Pio0,
+            FunctionPio0, PullNone: Gp0Pio0,
             /// PIO1 Function alias for pin [crate::Pins::gpio0].
-            FunctionPio1: Gp0Pio1
+            FunctionPio1, PullNone: Gp0Pio1
         }
     },
< etc>

@ithinuel
Copy link
Member Author

ithinuel commented Aug 28, 2023

Indeed, but it seems like @jannic already integrated those changes in: bcbe172

EDIT: I updated the title of the PR to better reflect its present contribution.

@ithinuel ithinuel requested a review from jannic August 28, 2023 21:28
@ithinuel ithinuel changed the title Update to use the overhauled GPIO API Use internal pull-up in pico_spi_sd_card example Aug 28, 2023
Copy link
Member

@jannic jannic left a comment

Choose a reason for hiding this comment

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

👍

@jannic jannic merged commit d444d68 into rp-rs:hal-0.9 Sep 1, 2023
12 checks passed
@ithinuel ithinuel deleted the experiment-gpio-overhaul branch February 13, 2024 23:24
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