pub trait Instance: Enable + Reset {
Show 13 methods
// Required methods
fn apply_config(&mut self, config: SpiConfig, wide: bool);
fn tbe(&self) -> bool;
fn rbne(&self) -> bool;
fn write_data(&mut self, word: u16);
fn read_data(&mut self) -> u16;
fn take_error(&mut self) -> Option<Error>;
fn set_rbneie(&mut self, on: bool);
fn rbneie(&self) -> bool;
fn set_tbeie(&mut self, on: bool);
fn tbeie(&self) -> bool;
fn set_errie(&mut self, on: bool);
fn errie(&self) -> bool;
fn shut_down(&mut self);
}Expand description
A peripheral that Spi can drive.
Required Methods§
Sourcefn apply_config(&mut self, config: SpiConfig, wide: bool)
fn apply_config(&mut self, config: SpiConfig, wide: bool)
Writes the full master configuration, leaving the peripheral enabled.
wide selects the frame width, and the impl handles what follows from it
(on SPI1 the FIFO access size must match, or reception stalls).
Sourcefn write_data(&mut self, word: u16)
fn write_data(&mut self, word: u16)
Writes a word to the data register, which starts the clock in master mode.
Sourcefn take_error(&mut self) -> Option<Error>
fn take_error(&mut self) -> Option<Error>
Returns the first pending error, if any, clearing it as the manual requires.
Sourcefn set_rbneie(&mut self, on: bool)
fn set_rbneie(&mut self, on: bool)
Enables or disables the receive interrupt (RBNEIE).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".