pub trait _esp_hal_spi_Instance {
Show 20 methods // Required methods fn register_block(&self) -> &RegisterBlock; fn sclk_signal(&self) -> OutputSignal; fn mosi_signal(&self) -> OutputSignal; fn miso_signal(&self) -> InputSignal; fn cs_signal(&self) -> OutputSignal; fn enable_peripheral( &self, peripheral_clock_control: &mut PeripheralClockControl ); fn spi_num(&self) -> u8; // Provided methods fn init(&mut self) { ... } fn setup(&mut self, frequency: Rate<u32, 1, 1>, clocks: &Clocks<'_>) { ... } fn set_data_mode(&mut self, data_mode: SpiMode) -> &mut Self { ... } fn ch_bus_freq(&mut self, frequency: Rate<u32, 1, 1>, clocks: &Clocks<'_>) { ... } fn read_byte(&mut self) -> Result<u8, Error<Error>> { ... } fn write_byte(&mut self, word: u8) -> Result<(), Error<Error>> { ... } fn write_bytes(&mut self, words: &[u8]) -> Result<(), Error> { ... } fn read_bytes(&mut self, words: &mut [u8]) -> Result<(), Error> { ... } fn read_bytes_from_fifo(&mut self, words: &mut [u8]) -> Result<(), Error> { ... } fn flush(&mut self) -> Result<(), Error> { ... } fn transfer<'w>(&mut self, words: &'w mut [u8]) -> Result<&'w [u8], Error> { ... } fn update(&self) { ... } fn configure_datalen(&self, len: u32) { ... }
}

Required Methods§

source

fn register_block(&self) -> &RegisterBlock

source

fn sclk_signal(&self) -> OutputSignal

source

fn mosi_signal(&self) -> OutputSignal

source

fn miso_signal(&self) -> InputSignal

source

fn cs_signal(&self) -> OutputSignal

source

fn enable_peripheral( &self, peripheral_clock_control: &mut PeripheralClockControl )

source

fn spi_num(&self) -> u8

Provided Methods§

source

fn init(&mut self)

source

fn setup(&mut self, frequency: Rate<u32, 1, 1>, clocks: &Clocks<'_>)

source

fn set_data_mode(&mut self, data_mode: SpiMode) -> &mut Self

source

fn ch_bus_freq(&mut self, frequency: Rate<u32, 1, 1>, clocks: &Clocks<'_>)

source

fn read_byte(&mut self) -> Result<u8, Error<Error>>

source

fn write_byte(&mut self, word: u8) -> Result<(), Error<Error>>

source

fn write_bytes(&mut self, words: &[u8]) -> Result<(), Error>

Write bytes to SPI.

Copies the content of words in chunks of 64 bytes into the SPI transmission FIFO. If words is longer than 64 bytes, multiple sequential transfers are performed. This function will return before all bytes of the last chunk to transmit have been sent to the wire. If you must ensure that the whole messages was written correctly, use [flush].

source

fn read_bytes(&mut self, words: &mut [u8]) -> Result<(), Error>

Read bytes from SPI.

Sends out a stuffing byte for every byte to read. This function doesn’t perform flushing. If you want to read the response to something you have written before, consider using [transfer] instead.

source

fn read_bytes_from_fifo(&mut self, words: &mut [u8]) -> Result<(), Error>

Read received bytes from SPI FIFO.

Copies the contents of the SPI receive FIFO into words. This function doesn’t perform flushing. If you want to read the response to something you have written before, consider using [transfer] instead.

source

fn flush(&mut self) -> Result<(), Error>

source

fn transfer<'w>(&mut self, words: &'w mut [u8]) -> Result<&'w [u8], Error>

source

fn update(&self)

source

fn configure_datalen(&self, len: u32)

Implementors§