#[non_exhaustive]pub struct Config { /* private fields */ }
Expand description
SPI peripheral configuration
Implementations§
Source§impl Config
impl Config
Sourcepub fn clock_source(&self) -> ClockSource
pub fn clock_source(&self) -> ClockSource
The clock source
Sourcepub fn with_read_bit_order(self, read_bit_order: BitOrder) -> Self
pub fn with_read_bit_order(self, read_bit_order: BitOrder) -> Self
Assign the given value to the read_bit_order
field.
Sourcepub fn read_bit_order(&self) -> BitOrder
pub fn read_bit_order(&self) -> BitOrder
Bit order of the read data.
Sourcepub fn with_write_bit_order(self, write_bit_order: BitOrder) -> Self
pub fn with_write_bit_order(self, write_bit_order: BitOrder) -> Self
Assign the given value to the write_bit_order
field.
Sourcepub fn write_bit_order(&self) -> BitOrder
pub fn write_bit_order(&self) -> BitOrder
Bit order of the written data.
Source§impl Config
impl Config
Sourcepub fn with_frequency(self, frequency: Rate) -> Self
pub fn with_frequency(self, frequency: Rate) -> Self
Set the frequency of the SPI bus clock.
Sourcepub fn with_clock_source(self, clock_source: ClockSource) -> Self
Available on crate feature unstable
only.
pub fn with_clock_source(self, clock_source: ClockSource) -> Self
unstable
only.Set the clock source of the SPI bus.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Trait Implementations§
Source§impl Format for Configwhere
Result<u32, ConfigError>: Format,
Rate: Format,
ClockSource: Format,
Mode: Format,
BitOrder: Format,
impl Format for Configwhere
Result<u32, ConfigError>: Format,
Rate: Format,
ClockSource: Format,
Mode: Format,
BitOrder: Format,
impl Copy for Config
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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
)