From ac88d89939adfd17b829897dfcbebd94020ea332 Mon Sep 17 00:00:00 2001 From: Jonathan Pallant Date: Tue, 16 Nov 2021 19:29:05 +0000 Subject: [PATCH] Fix-up the examples and BSPs. On the Pico Lipo GPIO23 is actually the boot mode select switch. --- boards/pico/examples/pico_gpio_in_out.rs | 2 +- boards/pico_explorer/src/lib.rs | 6 +++--- boards/pico_lipo_16mb/src/lib.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/boards/pico/examples/pico_gpio_in_out.rs b/boards/pico/examples/pico_gpio_in_out.rs index 6546c54..f4728f6 100644 --- a/boards/pico/examples/pico_gpio_in_out.rs +++ b/boards/pico/examples/pico_gpio_in_out.rs @@ -66,7 +66,7 @@ fn main() -> ! { let mut led_pin = pins.led.into_push_pull_output(); // Our button input - let button_pin = pins.bootsel.into_pull_down_input(); + let button_pin = pins.gpio15.into_pull_down_input(); // Run forever, setting the LED according to the button loop { diff --git a/boards/pico_explorer/src/lib.rs b/boards/pico_explorer/src/lib.rs index efbf28a..5c5b58d 100644 --- a/boards/pico_explorer/src/lib.rs +++ b/boards/pico_explorer/src/lib.rs @@ -91,7 +91,7 @@ mod internal_pins { aliases: { FunctionI2C: Scl } }, Gpio22 { name: i2c_int }, - Gpio23 { name: bootsel }, + Gpio23 { name: b_power_save }, Gpio24 { name: vbus_detect }, Gpio25 { name: led }, Gpio26 { name: adc0 }, @@ -117,7 +117,7 @@ pub struct Pins { pub i2c_sda: Pin, pub i2c_scl: Pin, pub i2c_int: Pin, - pub bootsel: Pin::Reset>, + pub b_power_save: Pin::Reset>, pub vbus_detect: Pin::Reset>, pub led: Pin::Reset>, pub adc0: Pin::Reset>, @@ -238,7 +238,7 @@ impl PicoExplorer { i2c_sda: internal_pins.i2c_sda.into_mode(), i2c_scl: internal_pins.i2c_scl.into_mode(), i2c_int: internal_pins.i2c_int.into_mode(), - bootsel: internal_pins.bootsel, + b_power_save: internal_pins.b_power_save, vbus_detect: internal_pins.vbus_detect, led: internal_pins.led, adc0: internal_pins.adc0, diff --git a/boards/pico_lipo_16mb/src/lib.rs b/boards/pico_lipo_16mb/src/lib.rs index b9c65ad..2d1616c 100644 --- a/boards/pico_lipo_16mb/src/lib.rs +++ b/boards/pico_lipo_16mb/src/lib.rs @@ -33,7 +33,7 @@ hal::bsp_pins!( Gpio20 { name: gpio20 }, Gpio21 { name: gpio21 }, Gpio22 { name: gpio22 }, - Gpio23 { name: bootsel }, + Gpio23 { name: user_sw }, Gpio24 { name: vbus_detect }, Gpio25 { name: led }, Gpio26 { name: gpio26 },