Naming: Change pullup to pull
This commit is contained in:
parent
f285a545be
commit
5cba97821f
1 changed files with 6 additions and 6 deletions
|
@ -54,7 +54,7 @@ pub struct Config {
|
||||||
///
|
///
|
||||||
/// There are some ICs that require a pull-up on the MISO pin for some applications.
|
/// There are some ICs that require a pull-up on the MISO pin for some applications.
|
||||||
/// If you are unsure, you probably don't need this.
|
/// If you are unsure, you probably don't need this.
|
||||||
pub miso_pullup: Pull,
|
pub miso_pull: Pull,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for Config {
|
impl Default for Config {
|
||||||
|
@ -63,7 +63,7 @@ impl Default for Config {
|
||||||
mode: MODE_0,
|
mode: MODE_0,
|
||||||
bit_order: BitOrder::MsbFirst,
|
bit_order: BitOrder::MsbFirst,
|
||||||
frequency: Hertz(1_000_000),
|
frequency: Hertz(1_000_000),
|
||||||
miso_pullup: Pull::None,
|
miso_pull: Pull::None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -279,7 +279,7 @@ impl<'d, M: PeriMode> Spi<'d, M> {
|
||||||
BitOrder::MsbFirst
|
BitOrder::MsbFirst
|
||||||
};
|
};
|
||||||
|
|
||||||
let miso_pullup = match &self.miso {
|
let miso_pull = match &self.miso {
|
||||||
None => Pull::None,
|
None => Pull::None,
|
||||||
Some(pin) => pin.pull(),
|
Some(pin) => pin.pull(),
|
||||||
};
|
};
|
||||||
|
@ -295,7 +295,7 @@ impl<'d, M: PeriMode> Spi<'d, M> {
|
||||||
mode: Mode { polarity, phase },
|
mode: Mode { polarity, phase },
|
||||||
bit_order,
|
bit_order,
|
||||||
frequency,
|
frequency,
|
||||||
miso_pullup,
|
miso_pull,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -418,7 +418,7 @@ impl<'d> Spi<'d, Blocking> {
|
||||||
peri,
|
peri,
|
||||||
new_pin!(sck, AFType::OutputPushPull, Speed::VeryHigh, config.sck_pull_mode()),
|
new_pin!(sck, AFType::OutputPushPull, Speed::VeryHigh, config.sck_pull_mode()),
|
||||||
new_pin!(mosi, AFType::OutputPushPull, Speed::VeryHigh),
|
new_pin!(mosi, AFType::OutputPushPull, Speed::VeryHigh),
|
||||||
new_pin!(miso, AFType::Input, Speed::VeryHigh, config.miso_pullup),
|
new_pin!(miso, AFType::Input, Speed::VeryHigh, config.miso_pull),
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
config,
|
config,
|
||||||
|
@ -436,7 +436,7 @@ impl<'d> Spi<'d, Blocking> {
|
||||||
peri,
|
peri,
|
||||||
new_pin!(sck, AFType::OutputPushPull, Speed::VeryHigh, config.sck_pull_mode()),
|
new_pin!(sck, AFType::OutputPushPull, Speed::VeryHigh, config.sck_pull_mode()),
|
||||||
None,
|
None,
|
||||||
new_pin!(miso, AFType::Input, Speed::VeryHigh, config.miso_pullup),
|
new_pin!(miso, AFType::Input, Speed::VeryHigh, config.miso_pull),
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
config,
|
config,
|
||||||
|
|
Loading…
Reference in a new issue