Merge #20
20: Smaller updates r=robamu a=robamu Small fixes Co-authored-by: Robin Mueller <robin.mueller.m@gmail.com>
This commit is contained in:
commit
70d9f123ef
@ -48,7 +48,7 @@
|
|||||||
//!
|
//!
|
||||||
//! ```
|
//! ```
|
||||||
//! let mut peripherals = Peripherals::take().unwrap();
|
//! 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.
|
//! Pins can be converted between modes using several different methods.
|
||||||
|
@ -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
|
/// Read a pin but use the masked version but check whether the datamask for the pin is
|
||||||
/// cleared as well
|
/// cleared as well
|
||||||
#[inline]
|
#[inline(always)]
|
||||||
fn read_pin_masked(&self) -> Result<bool, PinError> {
|
fn read_pin_masked(&self) -> Result<bool, PinError> {
|
||||||
if !self.datamask() {
|
if !self.datamask() {
|
||||||
Err(PinError::IsMasked)
|
Err(PinError::IsMasked)
|
||||||
@ -243,7 +243,7 @@ pub(super) unsafe trait RegisterInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Write the logic level of an output pin
|
/// Write the logic level of an output pin
|
||||||
#[inline]
|
#[inline(always)]
|
||||||
fn write_pin(&mut self, bit: bool) {
|
fn write_pin(&mut self, bit: bool) {
|
||||||
// Safety: SETOUT is a "mask" register, and we only write the bit for
|
// Safety: SETOUT is a "mask" register, and we only write the bit for
|
||||||
// this pin ID
|
// this pin ID
|
||||||
@ -277,7 +277,7 @@ pub(super) unsafe trait RegisterInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Toggle the logic level of an output pin
|
/// Toggle the logic level of an output pin
|
||||||
#[inline]
|
#[inline(always)]
|
||||||
fn toggle(&mut self) {
|
fn toggle(&mut self) {
|
||||||
// Safety: TOGOUT is a "mask" register, and we only write the bit for
|
// Safety: TOGOUT is a "mask" register, and we only write the bit for
|
||||||
// this pin ID
|
// this pin ID
|
||||||
|
Reference in New Issue
Block a user