Struct esp32c2_hal::peripherals::SPI2
source · pub struct SPI2 { /* private fields */ }
Implementations§
source§impl SPI2
impl SPI2
sourcepub unsafe fn steal() -> SPI2
pub unsafe fn steal() -> SPI2
Unsafely create an instance of this peripheral out of thin air.
Safety
You must ensure that you’re only using one instance of this type at a time.
Trait Implementations§
source§impl Instance for SPI2
impl Instance for SPI2
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
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>>
source§fn read_bytes(&mut self, words: &mut [u8]) -> Result<(), Error>
fn read_bytes(&mut self, words: &mut [u8]) -> Result<(), Error>
Read bytes from SPI. Read more
source§fn read_bytes_from_fifo(&mut self, words: &mut [u8]) -> Result<(), Error>
fn read_bytes_from_fifo(&mut self, words: &mut [u8]) -> Result<(), Error>
Read received bytes from SPI FIFO. Read more