mirror of
https://github.com/italicsjenga/rp-hal-boards.git
synced 2024-12-24 05:01:31 +11:00
fix minor issues
This commit is contained in:
parent
e3be4f8025
commit
711c0230b1
|
@ -415,12 +415,10 @@ impl DynPin {
|
||||||
Ok(self._read()? == true)
|
Ok(self._read()? == true)
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
#[allow(clippy::bool_comparison)] // more explicit this way
|
|
||||||
fn _set_low(&mut self) -> Result<(), Error> {
|
fn _set_low(&mut self) -> Result<(), Error> {
|
||||||
self._write(false)
|
self._write(false)
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
#[allow(clippy::bool_comparison)] // more explicit this way
|
|
||||||
fn _set_high(&mut self) -> Result<(), Error> {
|
fn _set_high(&mut self) -> Result<(), Error> {
|
||||||
self._write(true)
|
self._write(true)
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
//! Type-level [`Pin`]s are parameterized by two type-level enums, [`PinId`] and
|
//! Type-level [`Pin`]s are parameterized by two type-level enums, [`PinId`] and
|
||||||
//! [`PinMode`].
|
//! [`PinMode`].
|
||||||
//!
|
//!
|
||||||
//! A `PinId` identifies a pin by it's group (A, B, C or D) and pin number. Each
|
//! A `PinId` identifies a pin by it's group (BANK0 or QSPI) and pin number. Each
|
||||||
//! `PinId` instance is named according to its datasheet identifier, e.g.
|
//! `PinId` instance is named according to its datasheet identifier, e.g.
|
||||||
//! [`Gpio0`](`bank0::Gpio0`).
|
//! [`Gpio0`](`bank0::Gpio0`).
|
||||||
//!
|
//!
|
||||||
|
|
|
@ -81,7 +81,7 @@ impl From<DynPinMode> for ModeFields {
|
||||||
Uart => 2,
|
Uart => 2,
|
||||||
I2C => 3,
|
I2C => 3,
|
||||||
Pwm => 4,
|
Pwm => 4,
|
||||||
// Pio => 5
|
// SIO is 5, but isn't an alternate function but is instead for using the pin as GPIO
|
||||||
Pio0 => 6,
|
Pio0 => 6,
|
||||||
Pio1 => 7,
|
Pio1 => 7,
|
||||||
Clock => 8,
|
Clock => 8,
|
||||||
|
|
Loading…
Reference in a new issue