pub enum TransferMode {
Mode0,
Mode1,
Mode2,
Mode3,
}
Expand description
Represents the SPI transfer mode. See https://en.wikipedia.org/wiki/Serial_Peripheral_Interface#Clock_polarity_and_phase for details about SPI transfer modes.
Variants§
Mode0
Mode0
is CPOL=0, CPHA=0.
Mode1
Mode1
is CPOL=0, CPHA=1.
Mode2
Mode2
is CPOL=1, CPHA=0.
Mode3
Mode3
is CPOL=1, CPHA=1.
Implementations§
Source§impl TransferMode
impl TransferMode
pub fn phase(&self) -> ClockPhase
pub fn polarity(&self) -> ClockPolarity
Trait Implementations§
Source§impl Clone for TransferMode
impl Clone for TransferMode
Source§fn clone(&self) -> TransferMode
fn clone(&self) -> TransferMode
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 TransferMode
impl Debug for TransferMode
Source§impl<'de> Deserialize<'de> for TransferMode
impl<'de> Deserialize<'de> for TransferMode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl FromStr for TransferMode
impl FromStr for TransferMode
Source§impl PartialEq for TransferMode
impl PartialEq for TransferMode
Source§impl Serialize for TransferMode
impl Serialize for TransferMode
impl Copy for TransferMode
impl Eq for TransferMode
impl StructuralPartialEq for TransferMode
Auto Trait Implementations§
impl Freeze for TransferMode
impl RefUnwindSafe for TransferMode
impl Send for TransferMode
impl Sync for TransferMode
impl Unpin for TransferMode
impl UnwindSafe for TransferMode
Blanket Implementations§
§impl<T> Annotate for T
impl<T> Annotate for T
default fn format( &self, _variant: Option<&str>, _field: &MemberId<'_>, ) -> Option<Format>
default fn comment( &self, _variant: Option<&str>, _field: &MemberId<'_>, ) -> Option<String>
default fn as_annotate(&self) -> Option<&dyn Annotate>
default fn thunk_serialize( &self, serializer: &mut AnnotatedSerializer<'_>, ) -> Result<Document, Error>
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