pub enum Mode {
_0,
_1,
_2,
_3,
}
Expand description
SPI communication modes, defined by clock polarity (CPOL) and clock phase (CPHA).
These modes control the clock signal’s idle state and when data is sampled and shifted.
Variants§
_0
Mode 0 (CPOL = 0, CPHA = 0): Clock is low when idle, data is captured on the rising edge and propagated on the falling edge.
_1
Mode 1 (CPOL = 0, CPHA = 1): Clock is low when idle, data is captured on the falling edge and propagated on the rising edge.
_2
Mode 2 (CPOL = 1, CPHA = 0): Clock is high when idle, data is captured on the falling edge and propagated on the rising edge.
_3
Mode 3 (CPOL = 1, CPHA = 1): Clock is high when idle, data is captured on the rising edge and propagated on the falling edge.
Trait Implementations§
impl Copy for Mode
impl Eq for Mode
impl StructuralPartialEq for Mode
Auto Trait Implementations§
impl Freeze for Mode
impl RefUnwindSafe for Mode
impl Send for Mode
impl Sync for Mode
impl Unpin for Mode
impl UnwindSafe for Mode
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,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dst: *mut u8)
unsafe fn clone_to_uninit(&self, dst: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)