fix minor issues

This commit is contained in:
Andrea Nall 2021-07-02 11:28:56 -05:00 committed by 9names
parent e3be4f8025
commit 711c0230b1
3 changed files with 2 additions and 4 deletions

View file

@ -415,12 +415,10 @@ impl DynPin {
Ok(self._read()? == true)
}
#[inline]
#[allow(clippy::bool_comparison)] // more explicit this way
fn _set_low(&mut self) -> Result<(), Error> {
self._write(false)
}
#[inline]
#[allow(clippy::bool_comparison)] // more explicit this way
fn _set_high(&mut self) -> Result<(), Error> {
self._write(true)
}

View file

@ -17,7 +17,7 @@
//! Type-level [`Pin`]s are parameterized by two type-level enums, [`PinId`] and
//! [`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.
//! [`Gpio0`](`bank0::Gpio0`).
//!

View file

@ -81,7 +81,7 @@ impl From<DynPinMode> for ModeFields {
Uart => 2,
I2C => 3,
Pwm => 4,
// Pio => 5
// SIO is 5, but isn't an alternate function but is instead for using the pin as GPIO
Pio0 => 6,
Pio1 => 7,
Clock => 8,