Struct SPI3

Source
pub struct SPI3 { /* private fields */ }
Expand description

SPI (Serial Peripheral Interface) Controller 3

Implementations§

Source§

impl SPI3

Source

pub const PTR: *const RegisterBlock = {0x3f425000 as *const spi0::RegisterBlock}

Pointer to the register block

Source

pub const fn ptr() -> *const RegisterBlock

Return the pointer to the register block

Source

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>§

Source

pub fn cmd(&self) -> &CMD

0x00 - Command control register

Source

pub fn addr(&self) -> &ADDR

0x04 - Address value

Source

pub fn ctrl(&self) -> &CTRL

0x08 - SPI control register

Source

pub fn ctrl1(&self) -> &CTRL1

0x0c - SPI control register 1

Source

pub fn ctrl2(&self) -> &CTRL2

0x10 - SPI control register 2

Source

pub fn clock(&self) -> &CLOCK

0x14 - SPI clock control register

Source

pub fn user(&self) -> &USER

0x18 - SPI USER control register

Source

pub fn user1(&self) -> &USER1

0x1c - SPI USER control register 1

Source

pub fn user2(&self) -> &USER2

0x20 - SPI USER control register 2

Source

pub fn mosi_dlen(&self) -> &MOSI_DLEN

0x24 - MOSI length

Source

pub fn miso_dlen(&self) -> &MISO_DLEN

0x28 - MISO length

Source

pub fn misc(&self) -> &MISC

0x2c - SPI misc register

Source

pub fn slave(&self) -> &SLAVE

0x30 - SPI slave control register

Source

pub fn slave1(&self) -> &SLAVE1

0x34 - SPI slave control register 1

Source

pub fn slv_wrbuf_dlen(&self) -> &SLV_WRBUF_DLEN

0x38 - SPI slave Wr_BUF interrupt and CONF control register

Source

pub fn slv_rdbuf_dlen(&self) -> &SLV_RDBUF_DLEN

0x3c - SPI magic error and slave control register

Source

pub fn cache_sctrl(&self) -> &CACHE_SCTRL

0x40 - SPI Memory Cache SCTRL Register

Source

pub fn slv_rd_byte(&self) -> &SLV_RD_BYTE

0x40 - SPI interrupt control register

Source

pub fn fsm(&self) -> &FSM

0x44 - SPI master status and DMA read byte control register

Source

pub fn sram_drd_cmd(&self) -> &SRAM_DRD_CMD

0x48 - SPI Memory SRAM DRD CMD Register

Source

pub fn hold(&self) -> &HOLD

0x48 - SPI hold register

Source

pub fn sram_dwr_cmd(&self) -> &SRAM_DWR_CMD

0x4c - SPI Memory SRAM DWR CMD Register

Source

pub fn dma_conf(&self) -> &DMA_CONF

0x4c - SPI DMA control register

Source

pub fn sram_clk(&self) -> &SRAM_CLK

0x50 - SPI Memory SRAM Clock Register

0x50 - SPI DMA TX link configuration

0x54 - SPI DMA RX link configuration

Source

pub fn dma_int_ena(&self) -> &DMA_INT_ENA

0x58 - SPI DMA interrupt enable register

Source

pub fn dma_int_raw(&self) -> &DMA_INT_RAW

0x5c - SPI DMA interrupt raw register

Source

pub fn dma_int_st(&self) -> &DMA_INT_ST

0x60 - SPI DMA interrupt status register

Source

pub fn dma_int_clr(&self) -> &DMA_INT_CLR

0x64 - SPI DMA interrupt clear register

Source

pub fn in_err_eof_des_addr(&self) -> &IN_ERR_EOF_DES_ADDR

0x68 - The latest SPI DMA RX descriptor address receiving error

Source

pub fn in_suc_eof_des_addr(&self) -> &IN_SUC_EOF_DES_ADDR

0x6c - The latest SPI DMA eof RX descriptor address

0x70 - Current SPI DMA RX descriptor pointer

0x74 - Next SPI DMA RX descriptor pointer

0x78 - Current SPI DMA RX buffer pointer

Source

pub fn out_eof_bfr_des_addr(&self) -> &OUT_EOF_BFR_DES_ADDR

0x7c - The latest SPI DMA eof TX buffer address

Source

pub fn out_eof_des_addr(&self) -> &OUT_EOF_DES_ADDR

0x80 - The latest SPI DMA eof TX descriptor address

0x84 - Current SPI DMA TX descriptor pointer

0x88 - Next SPI DMA TX descriptor pointer

0x8c - Current SPI DMA TX buffer pointer

Source

pub fn dma_outstatus(&self) -> &DMA_OUTSTATUS

0x90 - SPI DMA TX status

Source

pub fn dma_instatus(&self) -> &DMA_INSTATUS

0x94 - SPI DMA RX status

Source

pub fn w(&self, n: usize) -> &W

0x98..0xe0 - Data buffer %s

Source

pub fn w_iter(&self) -> impl Iterator<Item = &W>

Iterator for array of: 0x98..0xe0 - Data buffer %s

Source

pub fn clock_gate(&self) -> &CLOCK_GATE

0xdc - SPI Memory Clock Gate Register

Source

pub fn din_mode(&self) -> &DIN_MODE

0xe0 - SPI input delay mode configuration

Source

pub fn din_num(&self) -> &DIN_NUM

0xe4 - SPI input delay number configuration

Source

pub fn dout_mode(&self) -> &DOUT_MODE

0xe8 - SPI output delay mode configuration

Source

pub fn dout_num(&self) -> &DOUT_NUM

0xec - SPI output delay number configuration

Source

pub fn lcd_ctrl(&self) -> &LCD_CTRL

0xf0 - LCD frame control register

Source

pub fn lcd_ctrl1(&self) -> &LCD_CTRL1

0xf4 - LCD frame control1 register

Source

pub fn lcd_ctrl2(&self) -> &LCD_CTRL2

0xf8 - LCD frame control2 register

Source

pub fn lcd_d_mode(&self) -> &LCD_D_MODE

0xfc - LCD delay number

Source

pub fn lcd_d_num(&self) -> &LCD_D_NUM

0x100 - LCD delay mode

Source

pub fn reg_date(&self) -> &REG_DATE

0x3fc - SPI version control

Trait Implementations§

Source§

impl Debug for SPI3

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Deref for SPI3

Source§

type Target = RegisterBlock

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl Send for SPI3

Auto Trait Implementations§

§

impl Freeze for SPI3

§

impl RefUnwindSafe for SPI3

§

impl !Sync for SPI3

§

impl Unpin for SPI3

§

impl UnwindSafe for SPI3

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.