pub enum ClockPhase {
SampleLeading,
SampleTrailing,
}
Expand description
Clock phase (CPHA) defines whether to sample and send data on a leading or trailing clock edge.
Consult a SPI reference on how CPHA interacts with CPOL.
Variants§
SampleLeading
Sample on the leading clock edge. This is CPHA = 0. If CPOL is 0, then this samples on the rising edge of the clock. If CPOL is 1, then this samples on the falling edge of the clock.
SampleTrailing
Sample on the trailing clock edge. This is CPHA = 1. If CPOL is 0, then this samples on the falling edge of the clock. If CPOL is 1, then this samples on the rising edge of the clock.
Trait Implementations§
Source§impl Clone for ClockPhase
impl Clone for ClockPhase
Source§fn clone(&self) -> ClockPhase
fn clone(&self) -> ClockPhase
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ClockPhase
impl Debug for ClockPhase
Source§impl PartialEq for ClockPhase
impl PartialEq for ClockPhase
impl Copy for ClockPhase
impl StructuralPartialEq for ClockPhase
Auto Trait Implementations§
impl Freeze for ClockPhase
impl RefUnwindSafe for ClockPhase
impl Send for ClockPhase
impl Sync for ClockPhase
impl Unpin for ClockPhase
impl UnwindSafe for ClockPhase
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more