pub struct Spi2 { /* private fields */ }Expand description
Serial Peripheral Interface 2
Implementations§
source§impl Spi2
impl Spi2
sourcepub const PTR: *const RegisterBlock = {0xff1e0000 as *const spi::RegisterBlock}
pub const PTR: *const RegisterBlock = {0xff1e0000 as *const spi::RegisterBlock}
Pointer to the register block
sourcepub const fn ptr() -> *const RegisterBlock
pub const fn ptr() -> *const RegisterBlock
Return the pointer to the register block
sourcepub unsafe fn steal() -> Self
pub unsafe fn steal() -> Self
Steal an instance of this peripheral
§Safety
Ensure that the new instance of the peripheral cannot be used in a way that may race with any existing instances, for example by only accessing read-only or write-only registers, or by consuming the original peripheral and using critical sections to coordinate access between multiple new instances.
Additionally, other software such as HALs may rely on only one peripheral instance existing to ensure memory safety; ensure no stolen instances are passed to such software.
Methods from Deref<Target = RegisterBlock>§
sourcepub fn spi_ctrlr0(&self) -> &SpiCtrlr0
pub fn spi_ctrlr0(&self) -> &SpiCtrlr0
0x00 - Control Register 0
sourcepub fn spi_ctrlr1(&self) -> &SpiCtrlr1
pub fn spi_ctrlr1(&self) -> &SpiCtrlr1
0x04 - Control Register 1
sourcepub fn spi_txftlr(&self) -> &SpiTxftlr
pub fn spi_txftlr(&self) -> &SpiTxftlr
0x14 - Transmit FIFO Threshold Level
sourcepub fn spi_rxftlr(&self) -> &SpiRxftlr
pub fn spi_rxftlr(&self) -> &SpiRxftlr
0x18 - Receive FIFO Threshold Level
sourcepub fn spi_dmatdlr(&self) -> &SpiDmatdlr
pub fn spi_dmatdlr(&self) -> &SpiDmatdlr
0x40 - DMA Transmit Data Level
sourcepub fn spi_dmardlr(&self) -> &SpiDmardlr
pub fn spi_dmardlr(&self) -> &SpiDmardlr
0x44 - DMA Receive Data Level