pub struct SPI0 { /* private fields */ }Expand description
Serial Peripheral Interface
Implementations§
Source§impl SPI0
impl SPI0
Sourcepub const PTR: *const RegisterBlock = {0x4025000 as *const spi0::RegisterBlock}
pub const PTR: *const RegisterBlock = {0x4025000 as *const spi0::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_samp_dl(&self) -> &SPI_SAMP_DL
pub fn spi_samp_dl(&self) -> &SPI_SAMP_DL
0x28 - SPI Sample Delay Control Register
Sourcepub fn spi_ba_ccr(&self) -> &SPI_BA_CCR
pub fn spi_ba_ccr(&self) -> &SPI_BA_CCR
0x44 - SPI Bit-Aligned Clock Configuration Register
Sourcepub fn spi_tbr(&self) -> &SPI_TBR
pub fn spi_tbr(&self) -> &SPI_TBR
0x48 - SPI TX Bit Register
VTB [31:0]: The Value of the Transmit Bits
Sourcepub fn spi_rbr(&self) -> &SPI_RBR
pub fn spi_rbr(&self) -> &SPI_RBR
0x4c - SPI RX Bit Register
VRB [31:0]: The Value of the Receive Bits
Sourcepub fn spi_ndma_mode_ctl(&self) -> &SPI_NDMA_MODE_CTL
pub fn spi_ndma_mode_ctl(&self) -> &SPI_NDMA_MODE_CTL
0x88 - SPI Normal DMA Mode Control Register
Sourcepub fn spi_txd_8(&self) -> &SPI_TXD_8
pub fn spi_txd_8(&self) -> &SPI_TXD_8
0x200 - SPI TX Data Register
TDATA [7:0]: Transmit Data in byte method
Sourcepub fn spi_txd_16(&self) -> &SPI_TXD_16
pub fn spi_txd_16(&self) -> &SPI_TXD_16
0x200 - SPI TX Data Register
TDATA [15:0]: Transmit Data in half-word method
Sourcepub fn spi_txd(&self) -> &SPI_TXD
pub fn spi_txd(&self) -> &SPI_TXD
0x200 - SPI TX Data Register
TDATA [31:0]: Transmit Data in word method
Sourcepub fn spi_rxd_8(&self) -> &SPI_RXD_8
pub fn spi_rxd_8(&self) -> &SPI_RXD_8
0x300 - SPI RX Data Register
RDATA [7:0]: Receive Data and access in byte method
Sourcepub fn spi_rxd_16(&self) -> &SPI_RXD_16
pub fn spi_rxd_16(&self) -> &SPI_RXD_16
0x300 - SPI RX Data Register
RDATA [15:0]: Receive Data and access in half-word method