mirror of
https://github.com/italicsjenga/rp-hal-boards.git
synced 2025-01-11 13:01:30 +11:00
Merge pull request #201 from rp-rs/rename-gpio23
GPIO23 actually controls the 'power save' function on the SMPS.
This commit is contained in:
commit
9d56062e44
|
@ -66,7 +66,7 @@ fn main() -> ! {
|
||||||
let mut led_pin = pins.led.into_push_pull_output();
|
let mut led_pin = pins.led.into_push_pull_output();
|
||||||
|
|
||||||
// Our button input
|
// Our button input
|
||||||
let button_pin = pins.bootsel.into_pull_down_input();
|
let button_pin = pins.gpio15.into_pull_up_input();
|
||||||
|
|
||||||
// Run forever, setting the LED according to the button
|
// Run forever, setting the LED according to the button
|
||||||
loop {
|
loop {
|
||||||
|
|
|
@ -33,7 +33,7 @@ hal::bsp_pins!(
|
||||||
Gpio20 { name: gpio20 },
|
Gpio20 { name: gpio20 },
|
||||||
Gpio21 { name: gpio21 },
|
Gpio21 { name: gpio21 },
|
||||||
Gpio22 { name: gpio22 },
|
Gpio22 { name: gpio22 },
|
||||||
Gpio23 { name: bootsel },
|
Gpio23 { name: b_power_save },
|
||||||
Gpio24 { name: vbus_detect },
|
Gpio24 { name: vbus_detect },
|
||||||
Gpio25 { name: led },
|
Gpio25 { name: led },
|
||||||
Gpio26 { name: gpio26 },
|
Gpio26 { name: gpio26 },
|
||||||
|
|
|
@ -91,7 +91,7 @@ mod internal_pins {
|
||||||
aliases: { FunctionI2C: Scl }
|
aliases: { FunctionI2C: Scl }
|
||||||
},
|
},
|
||||||
Gpio22 { name: i2c_int },
|
Gpio22 { name: i2c_int },
|
||||||
Gpio23 { name: bootsel },
|
Gpio23 { name: b_power_save },
|
||||||
Gpio24 { name: vbus_detect },
|
Gpio24 { name: vbus_detect },
|
||||||
Gpio25 { name: led },
|
Gpio25 { name: led },
|
||||||
Gpio26 { name: adc0 },
|
Gpio26 { name: adc0 },
|
||||||
|
@ -117,7 +117,7 @@ pub struct Pins {
|
||||||
pub i2c_sda: Pin<Gpio20, FunctionI2C>,
|
pub i2c_sda: Pin<Gpio20, FunctionI2C>,
|
||||||
pub i2c_scl: Pin<Gpio21, FunctionI2C>,
|
pub i2c_scl: Pin<Gpio21, FunctionI2C>,
|
||||||
pub i2c_int: Pin<Gpio22, 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 vbus_detect: Pin<Gpio24, <Gpio24 as PinId>::Reset>,
|
||||||
pub led: Pin<Gpio25, <Gpio25 as PinId>::Reset>,
|
pub led: Pin<Gpio25, <Gpio25 as PinId>::Reset>,
|
||||||
pub adc0: Pin<Gpio26, <Gpio26 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_sda: internal_pins.i2c_sda.into_mode(),
|
||||||
i2c_scl: internal_pins.i2c_scl.into_mode(),
|
i2c_scl: internal_pins.i2c_scl.into_mode(),
|
||||||
i2c_int: internal_pins.i2c_int.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,
|
vbus_detect: internal_pins.vbus_detect,
|
||||||
led: internal_pins.led,
|
led: internal_pins.led,
|
||||||
adc0: internal_pins.adc0,
|
adc0: internal_pins.adc0,
|
||||||
|
|
|
@ -33,7 +33,7 @@ hal::bsp_pins!(
|
||||||
Gpio20 { name: gpio20 },
|
Gpio20 { name: gpio20 },
|
||||||
Gpio21 { name: gpio21 },
|
Gpio21 { name: gpio21 },
|
||||||
Gpio22 { name: gpio22 },
|
Gpio22 { name: gpio22 },
|
||||||
Gpio23 { name: bootsel },
|
Gpio23 { name: user_sw },
|
||||||
Gpio24 { name: vbus_detect },
|
Gpio24 { name: vbus_detect },
|
||||||
Gpio25 { name: led },
|
Gpio25 { name: led },
|
||||||
Gpio26 { name: gpio26 },
|
Gpio26 { name: gpio26 },
|
||||||
|
|
Loading…
Reference in a new issue