#[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,
pub nss_polarity: SlaveSelectPolarity,
}Expand description
SPI configuration.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
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.
nss_polarity: SlaveSelectPolaritySlave Select (SS) pin polarity.