pub struct SPI0 { /* private fields */ }

Implementations§

source§

impl SPI0

source

pub unsafe fn steal() -> SPI0

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.

source

pub const PTR: *const <SPI0 as Deref>::Target = {0x3f403000 as *const <esp32s2::SPI0 as core::ops::Deref>::Target}

Pointer to the register block

source

pub const fn ptr() -> *const <SPI0 as Deref>::Target

Return the pointer to the register block

Methods from Deref<Target = RegisterBlock>§

source

pub fn cmd(&self) -> &Reg<CMD_SPEC>

0x00 - Command control register

source

pub fn addr(&self) -> &Reg<ADDR_SPEC>

0x04 - Address value

source

pub fn ctrl(&self) -> &Reg<CTRL_SPEC>

0x08 - SPI control register

source

pub fn ctrl1(&self) -> &Reg<CTRL1_SPEC>

0x0c - SPI control register 1

source

pub fn ctrl2(&self) -> &Reg<CTRL2_SPEC>

0x10 - SPI control register 2

source

pub fn clock(&self) -> &Reg<CLOCK_SPEC>

0x14 - SPI clock control register

source

pub fn user(&self) -> &Reg<USER_SPEC>

0x18 - SPI USER control register

source

pub fn user1(&self) -> &Reg<USER1_SPEC>

0x1c - SPI USER control register 1

source

pub fn user2(&self) -> &Reg<USER2_SPEC>

0x20 - SPI USER control register 2

source

pub fn mosi_dlen(&self) -> &Reg<MOSI_DLEN_SPEC>

0x24 - MOSI length

source

pub fn miso_dlen(&self) -> &Reg<MISO_DLEN_SPEC>

0x28 - MISO length

source

pub fn misc(&self) -> &Reg<MISC_SPEC>

0x2c - SPI misc register

source

pub fn slave(&self) -> &Reg<SLAVE_SPEC>

0x30 - SPI slave control register

source

pub fn slave1(&self) -> &Reg<SLAVE1_SPEC>

0x34 - SPI slave control register 1

source

pub fn slv_wrbuf_dlen(&self) -> &Reg<SLV_WRBUF_DLEN_SPEC>

0x38 - SPI slave Wr_BUF interrupt and CONF control register

source

pub fn slv_rdbuf_dlen(&self) -> &Reg<SLV_RDBUF_DLEN_SPEC>

0x3c - SPI magic error and slave control register

source

pub fn slv_rd_byte(&self) -> &Reg<SLV_RD_BYTE_SPEC>

0x40 - SPI interrupt control register

source

pub fn fsm(&self) -> &Reg<FSM_SPEC>

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

source

pub fn hold(&self) -> &Reg<HOLD_SPEC>

0x48 - SPI hold register

source

pub fn dma_conf(&self) -> &Reg<DMA_CONF_SPEC>

0x4c - SPI DMA control register

0x50 - SPI DMA TX link configuration

0x54 - SPI DMA RX link configuration

source

pub fn dma_int_ena(&self) -> &Reg<DMA_INT_ENA_SPEC>

0x58 - SPI DMA interrupt enable register

source

pub fn dma_int_raw(&self) -> &Reg<DMA_INT_RAW_SPEC>

0x5c - SPI DMA interrupt raw register

source

pub fn dma_int_st(&self) -> &Reg<DMA_INT_ST_SPEC>

0x60 - SPI DMA interrupt status register

source

pub fn dma_int_clr(&self) -> &Reg<DMA_INT_CLR_SPEC>

0x64 - SPI DMA interrupt clear register

source

pub fn in_err_eof_des_addr(&self) -> &Reg<IN_ERR_EOF_DES_ADDR_SPEC>

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

source

pub fn in_suc_eof_des_addr(&self) -> &Reg<IN_SUC_EOF_DES_ADDR_SPEC>

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) -> &Reg<OUT_EOF_BFR_DES_ADDR_SPEC>

0x7c - The latest SPI DMA eof TX buffer address

source

pub fn out_eof_des_addr(&self) -> &Reg<OUT_EOF_DES_ADDR_SPEC>

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) -> &Reg<DMA_OUTSTATUS_SPEC>

0x90 - SPI DMA TX status

source

pub fn dma_instatus(&self) -> &Reg<DMA_INSTATUS_SPEC>

0x94 - SPI DMA RX status

source

pub fn w0(&self) -> &Reg<W0_SPEC>

0x98 - Data buffer 0

source

pub fn w1(&self) -> &Reg<W1_SPEC>

0x9c - Data buffer 1

source

pub fn w2(&self) -> &Reg<W2_SPEC>

0xa0 - Data buffer 2

source

pub fn w3(&self) -> &Reg<W3_SPEC>

0xa4 - Data buffer 3

source

pub fn w4(&self) -> &Reg<W4_SPEC>

0xa8 - Data buffer 4

source

pub fn w5(&self) -> &Reg<W5_SPEC>

0xac - Data buffer 5

source

pub fn w6(&self) -> &Reg<W6_SPEC>

0xb0 - Data buffer 6

source

pub fn w7(&self) -> &Reg<W7_SPEC>

0xb4 - Data buffer 7

source

pub fn w8(&self) -> &Reg<W8_SPEC>

0xb8 - Data buffer 8

source

pub fn w9(&self) -> &Reg<W9_SPEC>

0xbc - Data buffer 9

source

pub fn w10(&self) -> &Reg<W10_SPEC>

0xc0 - Data buffer 10

source

pub fn w11(&self) -> &Reg<W11_SPEC>

0xc4 - Data buffer 11

source

pub fn w12(&self) -> &Reg<W12_SPEC>

0xc8 - Data buffer 12

source

pub fn w13(&self) -> &Reg<W13_SPEC>

0xcc - Data buffer 13

source

pub fn w14(&self) -> &Reg<W14_SPEC>

0xd0 - Data buffer 14

source

pub fn w15(&self) -> &Reg<W15_SPEC>

0xd4 - Data buffer 15

source

pub fn w16(&self) -> &Reg<W16_SPEC>

0xd8 - Data buffer 16

source

pub fn w17(&self) -> &Reg<W17_SPEC>

0xdc - Data buffer 17

source

pub fn din_mode(&self) -> &Reg<DIN_MODE_SPEC>

0xe0 - SPI input delay mode configuration

source

pub fn din_num(&self) -> &Reg<DIN_NUM_SPEC>

0xe4 - SPI input delay number configuration

source

pub fn dout_mode(&self) -> &Reg<DOUT_MODE_SPEC>

0xe8 - SPI output delay mode configuration

source

pub fn dout_num(&self) -> &Reg<DOUT_NUM_SPEC>

0xec - SPI output delay number configuration

source

pub fn lcd_ctrl(&self) -> &Reg<LCD_CTRL_SPEC>

0xf0 - LCD frame control register

source

pub fn lcd_ctrl1(&self) -> &Reg<LCD_CTRL1_SPEC>

0xf4 - LCD frame control1 register

source

pub fn lcd_ctrl2(&self) -> &Reg<LCD_CTRL2_SPEC>

0xf8 - LCD frame control2 register

source

pub fn lcd_d_mode(&self) -> &Reg<LCD_D_MODE_SPEC>

0xfc - LCD delay number

source

pub fn lcd_d_num(&self) -> &Reg<LCD_D_NUM_SPEC>

0x100 - LCD delay mode

source

pub fn reg_date(&self) -> &Reg<REG_DATE_SPEC>

0x3fc - SPI version control

Trait Implementations§

source§

impl Debug for SPI0

source§

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

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

impl Deref for SPI0

§

type Target = <SPI0 as Deref>::Target

The resulting type after dereferencing.
source§

fn deref(&self) -> &<SPI0 as Deref>::Target

Dereferences the value.
source§

impl DerefMut for SPI0

source§

fn deref_mut(&mut self) -> &mut <SPI0 as Deref>::Target

Mutably dereferences the value.
source§

impl Peripheral for SPI0

§

type P = SPI0

Peripheral singleton type
source§

unsafe fn clone_unchecked(&mut self) -> <SPI0 as Peripheral>::P

Unsafely clone (duplicate) a peripheral singleton. Read more
source§

fn into_ref<'a>(self) -> PeripheralRef<'a, Self::P>
where Self: 'a,

Convert a value into a PeripheralRef. Read more

Auto Trait Implementations§

§

impl RefUnwindSafe for SPI0

§

impl Send 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<T, U> TryFrom<U> for T
where U: Into<T>,

§

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

§

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.