#[non_exhaustive]pub struct Config {
pub mode: Mode,
pub bit_order: BitOrder,
pub frequency: Hertz,
pub miso_pull: Pull,
pub rise_fall_speed: Speed,
}
Expand description
SPI configuration.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.mode: Mode
SPI mode.
bit_order: BitOrder
Bit order.
frequency: Hertz
Clock frequency.
miso_pull: Pull
Enable internal pullup on MISO.
There are some ICs that require a pull-up on the MISO pin for some applications. If you are unsure, you probably don’t need this.
rise_fall_speed: Speed
signal rise/fall speed (slew rate) - defaults to Medium
.
Increase for high SPI speeds. Change to Low
to reduce ringing.
Trait Implementations§
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§
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