Fix-up the examples and BSPs.

On the Pico Lipo GPIO23 is actually the boot mode select switch.
This commit is contained in:
Jonathan Pallant 2021-11-16 19:29:05 +00:00
parent cc612b89fd
commit ac88d89939
3 changed files with 5 additions and 5 deletions

View file

@ -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 {

View file

@ -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<Gpio20, FunctionI2C>,
pub i2c_scl: Pin<Gpio21, FunctionI2C>,
pub i2c_int: Pin<Gpio22, FunctionI2C>,
pub bootsel: Pin<Gpio23, <Gpio23 as PinId>::Reset>,
pub b_power_save: Pin<Gpio23, <Gpio23 as PinId>::Reset>,
pub vbus_detect: Pin<Gpio24, <Gpio24 as PinId>::Reset>,
pub led: Pin<Gpio25, <Gpio25 as PinId>::Reset>,
pub adc0: Pin<Gpio26, <Gpio26 as PinId>::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,

View file

@ -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 },