Skip to content

Commit b1a3451

Browse files
committed
Collapse Input type arguments
1 parent a2393df commit b1a3451

File tree

3 files changed

+474
-400
lines changed

3 files changed

+474
-400
lines changed

codegen/src/codegen/gpio.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,10 @@ fn gen_pin(pin: &gpio::Pin) -> Result<()> {
132132

133133
fn get_pin_reset_mode(pin: &gpio::Pin) -> Result<&'static str> {
134134
// Debug pins default to their debug function (AF0), everything else
135-
// defaults to floating input.
135+
// defaults to input.
136136
let mode = match (pin.port()?, pin.number()?) {
137137
('A', 13) | ('A', 14) | ('A', 15) | ('B', 3) | ('B', 4) => "AF0<PushPull>",
138-
_ => "Input<Floating>",
138+
_ => "Input",
139139
};
140140
Ok(mode)
141141
}

examples/gpio_erased.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use cortex_m::asm;
99
use cortex_m_rt::entry;
1010
use cortex_m_semihosting::hprintln;
1111

12-
use hal::gpio::{self, Floating, Input};
12+
use hal::gpio::{self, Input};
1313
use hal::pac;
1414
use hal::prelude::*;
1515
use stm32f3xx_hal as hal;
@@ -23,7 +23,7 @@ fn main() -> ! {
2323
let mut gpioc = dp.GPIOC.split(&mut rcc.ahb);
2424
let mut gpiod = dp.GPIOD.split(&mut rcc.ahb);
2525

26-
let mut pin_array: [gpio::PXx<Input<Floating>>; 4] = [
26+
let mut pin_array: [gpio::PXx<Input>; 4] = [
2727
gpiob
2828
.pb11
2929
.into_floating_input(&mut gpiob.moder, &mut gpiob.pupdr)

0 commit comments

Comments
 (0)