rp-rs / rp-hal-boards

Board Support Packages for RP2040 based PCBs
211 stars 87 forks source link

Use internal pull-up in pico_spi_sd_card example #20

Closed ithinuel closed 1 year ago

ithinuel commented 1 year ago

Depends on:

wlcx commented 1 year ago

I think https://github.com/rp-rs/rp-hal/pull/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 commented 1 year ago

Indeed, but it seems like @jannic already integrated those changes in: https://github.com/rp-rs/rp-hal-boards/commit/bcbe172d6a13828cc82d8ce3736e1f09125701ed

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