#[non_exhaustive]pub struct Config {
pub mode: Mode,
pub bit_order: BitOrder,
pub frequency: Hertz,
pub miso_pull: Pull,
pub gpio_speed: Speed,
pub nss_output_disable: bool,
}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: ModeSPI mode.
bit_order: BitOrderBit order.
frequency: HertzClock frequency.
miso_pull: PullEnable 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.
gpio_speed: Speedsignal rise/fall speed (slew rate) - defaults to Medium.
Increase for high SPI speeds. Change to Low to reduce ringing.
nss_output_disable: boolIf True sets SSOE to zero even if SPI is in Master Mode. NSS output enabled (SSM = 0, SSOE = 1): The NSS signal is driven low when the master starts the communication and is kept low until the SPI is disabled. NSS output disabled (SSM = 0, SSOE = 0): For devices set as slave, the NSS pin acts as a classical NSS input: the slave is selected when NSS is low and deselected when NSS high.
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