pub struct ClockMask(pub u8);
Expand description
A clock mask.
The format looks like this
0b00000<1><0><2x>
Where
1
is the value of theSPR1
bit0
is the value of theSPR0
bit2x
indicates if double speed mode is enabled
Tuple Fields§
§0: u8
Implementations§
source§impl ClockMask
impl ClockMask
sourcepub fn with_clock(spi_clock: u32) -> ClockMask
pub fn with_clock(spi_clock: u32) -> ClockMask
Gets the clock mask for a specific baute rate.
pub fn control_register_mask(self) -> u8
pub fn status_register_mask(self) -> u8
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for ClockMask
impl Send for ClockMask
impl Sync for ClockMask
impl Unpin for ClockMask
impl UnwindSafe for ClockMask
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more