From de0e000af3df14c4cdc28fcbe622be062174ed37 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Sat, 13 Nov 2021 15:03:50 +0100 Subject: [PATCH 1/2] tiny doc tweak --- src/gpio/pins.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gpio/pins.rs b/src/gpio/pins.rs index 79d4a30..b2ec481 100644 --- a/src/gpio/pins.rs +++ b/src/gpio/pins.rs @@ -47,7 +47,7 @@ //! //! ``` //! let mut peripherals = Peripherals::take().unwrap(); -//! let pins = Pins::new(&mut dp.SYSCONFIG, Some(dp.IOCONFIG), dp.PORTA); +//! let pins = PinsA::new(&mut dp.SYSCONFIG, Some(dp.IOCONFIG), dp.PORTA); //! ``` //! //! Pins can be converted between modes using several different methods. From c07d937c12c49bd63e166eb6df3657a830bd8798 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Sat, 13 Nov 2021 18:58:24 +0100 Subject: [PATCH 2/2] added a few inline always directives --- src/gpio/reg.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gpio/reg.rs b/src/gpio/reg.rs index 9f3792e..3a6648f 100644 --- a/src/gpio/reg.rs +++ b/src/gpio/reg.rs @@ -233,7 +233,7 @@ pub(super) unsafe trait RegisterInterface { /// Read a pin but use the masked version but check whether the datamask for the pin is /// cleared as well - #[inline] + #[inline(always)] fn read_pin_masked(&self) -> Result { if !self.datamask() { Err(PinError::IsMasked) @@ -243,7 +243,7 @@ pub(super) unsafe trait RegisterInterface { } /// Write the logic level of an output pin - #[inline] + #[inline(always)] fn write_pin(&mut self, bit: bool) { // Safety: SETOUT is a "mask" register, and we only write the bit for // this pin ID @@ -277,7 +277,7 @@ pub(super) unsafe trait RegisterInterface { } /// Toggle the logic level of an output pin - #[inline] + #[inline(always)] fn toggle(&mut self) { // Safety: TOGOUT is a "mask" register, and we only write the bit for // this pin ID