Enum kernel::hil::spi::ClockPhase
source · 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
source§fn eq(&self, other: &ClockPhase) -> bool
fn eq(&self, other: &ClockPhase) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)