Struct SPI0

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

SPI (Serial Peripheral Interface) Controller 0

Implementations§

Source§

impl SPI0

Source

pub const PTR: *const RegisterBlock = {0x60003000 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 ctrl(&self) -> &CTRL

0x08 - SPI0 control register.

Source

pub fn ctrl1(&self) -> &CTRL1

0x0c - SPI0 control 1 register.

Source

pub fn ctrl2(&self) -> &CTRL2

0x10 - SPI0 control 2 register.

Source

pub fn clock(&self) -> &CLOCK

0x14 - SPI_CLK clock division register when SPI0 accesses to flash.

Source

pub fn user(&self) -> &USER

0x18 - SPI0 user register.

Source

pub fn user1(&self) -> &USER1

0x1c - SPI0 user1 register.

Source

pub fn user2(&self) -> &USER2

0x20 - SPI0 user2 register.

Source

pub fn rd_status(&self) -> &RD_STATUS

0x2c - SPI0 read control register.

Source

pub fn ext_addr(&self) -> &EXT_ADDR

0x30 - SPI0 extended address register.

Source

pub fn misc(&self) -> &MISC

0x34 - SPI0 misc register

Source

pub fn cache_fctrl(&self) -> &CACHE_FCTRL

0x3c - SPI0 external RAM bit mode control register.

Source

pub fn cache_sctrl(&self) -> &CACHE_SCTRL

0x40 - SPI0 external RAM control register

Source

pub fn sram_cmd(&self) -> &SRAM_CMD

0x44 - SPI0 external RAM mode control register

Source

pub fn sram_drd_cmd(&self) -> &SRAM_DRD_CMD

0x48 - SPI0 external RAM DDR read command control register

Source

pub fn sram_dwr_cmd(&self) -> &SRAM_DWR_CMD

0x4c - SPI0 external RAM DDR write command control register

Source

pub fn sram_clk(&self) -> &SRAM_CLK

0x50 - SPI_CLK clock division register when SPI0 accesses to Ext_RAM.

Source

pub fn fsm(&self) -> &FSM

0x54 - SPI0 state machine(FSM) status register.

Source

pub fn timing_cali(&self) -> &TIMING_CALI

0xa8 - SPI0 timing compensation register when accesses to flash.

Source

pub fn din_mode(&self) -> &DIN_MODE

0xac - MSPI input timing delay mode control register when accesses to flash.

Source

pub fn din_num(&self) -> &DIN_NUM

0xb0 - MSPI input timing delay number control register when accesses to flash.

Source

pub fn dout_mode(&self) -> &DOUT_MODE

0xb4 - MSPI output timing delay mode control register when accesses to flash.

Source

pub fn spi_smem_timing_cali(&self) -> &SPI_SMEM_TIMING_CALI

0xbc - SPI0 Ext_RAM timing compensation register.

Source

pub fn spi_smem_din_mode(&self) -> &SPI_SMEM_DIN_MODE

0xc0 - MSPI input timing delay mode control register when accesses to Ext_RAM.

Source

pub fn spi_smem_din_num(&self) -> &SPI_SMEM_DIN_NUM

0xc4 - MSPI input timing delay number control register when accesses to Ext_RAM.

Source

pub fn spi_smem_dout_mode(&self) -> &SPI_SMEM_DOUT_MODE

0xc8 - MSPI output timing delay mode control register when accesses to Ext_RAM.

Source

pub fn ecc_ctrl(&self) -> &ECC_CTRL

0xcc - MSPI ECC control register

Source

pub fn ecc_err_addr(&self) -> &ECC_ERR_ADDR

0xd0 - MSPI ECC error address register

Source

pub fn ecc_err_bit(&self) -> &ECC_ERR_BIT

0xd4 - MSPI ECC error bits register

Source

pub fn spi_smem_ac(&self) -> &SPI_SMEM_AC

0xdc - MSPI external RAM ECC and SPI CS timing control register

Source

pub fn ddr(&self) -> &DDR

0xe0 - SPI0 flash DDR mode control register

Source

pub fn spi_smem_ddr(&self) -> &SPI_SMEM_DDR

0xe4 - SPI0 external RAM DDR mode control register

Source

pub fn clock_gate(&self) -> &CLOCK_GATE

0xe8 - SPI0 clk_gate register

Source

pub fn core_clk_sel(&self) -> &CORE_CLK_SEL

0xec - SPI0 module clock select register

Source

pub fn int_ena(&self) -> &INT_ENA

0xf0 - SPI1 interrupt enable register

Source

pub fn int_clr(&self) -> &INT_CLR

0xf4 - SPI1 interrupt clear register

Source

pub fn int_raw(&self) -> &INT_RAW

0xf8 - SPI1 interrupt raw register

Source

pub fn int_st(&self) -> &INT_ST

0xfc - SPI1 interrupt status register

Source

pub fn date(&self) -> &DATE

0x3fc - SPI0 version control register

Trait Implementations§

Source§

impl Debug for SPI0

Source§

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

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

impl Deref for SPI0

Source§

type Target = RegisterBlock

The resulting type after dereferencing.
Source§

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

Dereferences the value.
Source§

impl Send for SPI0

Auto Trait Implementations§

§

impl Freeze for SPI0

§

impl RefUnwindSafe for SPI0

§

impl !Sync for SPI0

§

impl Unpin for SPI0

§

impl UnwindSafe for SPI0

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.