A Rust library that provides access to the Raspberry Pi's GPIO, I2C, PWM, SPI and UART peripherals.
is_low
implementation for embedded_hal::digital::InputPin
(contributed by @TeyKey1).embedded-hal
to v1.0.0 (contributed by @reitermarkus).embedded-hal
to v1.0.0-rc.2 (contributed by @reitermarkus).embedded-hal
to v1.0.0-rc.1 (contributed by @mbuesch).Hardware
field check in /proc/cpuinfo
.PullUpDown
enum to Bias
, and set_pullupdown
to set_bias
.Alt6
, Alt7
and Alt8
.embedded-hal
(contributed by @CBJamo).unproven
embedded-hal
trait digital::v2::IoPin<IoPin, IoPin>
for IoPin
(contributed by @rumatoest).From<bool>
trait for Level
(contributed by @makerio90).Error::PinUsed
, returned by Gpio::get()
to indicate a pin is already in use.Error::PinNotAvailable
, returned by Gpio::get()
to indicate a pin isn't available on the current Raspberry Pi model.embedded-hal
to v1.0.0-alpha.9 (contributed by @mbuesch).embedded-hal
v1.0.0-alpha.5 (contributed by @reitermarkus).into_output_low()
and into_output_high()
to Pin
to set the logic level before changing the pin mode.From<u8>
trait for Level
, where 0
is converted into Level::Low
, and any other value into Level::High
.Model
and SoC
with #[non_exhaustive]
.embedded-hal
trait implementations for digital::v1::{InputPin, OutputPin, StatefulOutputPin, ToggleableOutputPin}
to digital::v2
. These can be explicitly converted back to digital::v1
through digital::v1_compat::{OldInputPin, OldOutputPin}
for backwards compatibility with older drivers.