Instance

Trait Instance 

Source
pub trait Instance:
    Sealed
    + Deref<Target = RegisterBlock>
    + ClockControl
    + ResetControl
    + PeripheralClockSelector {
    type Sck;
    type Mosi;
    type Miso;
    type RxChannel: Instance;
    type TxChannel: Instance;

    const REGISTERS: *const RegisterBlock;
}
Expand description

Implemented for all SPI instance

Required Associated Constants§

Source

const REGISTERS: *const RegisterBlock

A pointer to this instance’s register block

Required Associated Types§

Source

type Sck

The movable function that needs to be assigned to this SPI’s SCK pin

Source

type Mosi

The movable function that needs to be assigned to this SPI’s MOSI pin

Source

type Miso

The movable function that needs to be assigned to this SPI’s MISO pin

Source

type RxChannel: Instance

The DMA channel used with this instance for receiving

Source

type TxChannel: Instance

The DMA channel used with this instance for transmitting

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Instance for SPI0

Source§

const REGISTERS: *const RegisterBlock = {0x40058000 as *const lpc845_pac::spi0::RegisterBlock}

Source§

type Sck = SPI0_SCK

Source§

type Mosi = SPI0_MOSI

Source§

type Miso = SPI0_MISO

Source§

type RxChannel = Channel10

Source§

type TxChannel = Channel11

Source§

impl Instance for SPI1

Source§

const REGISTERS: *const RegisterBlock = {0x4005c000 as *const lpc845_pac::spi0::RegisterBlock}

Source§

type Sck = SPI1_SCK

Source§

type Mosi = SPI1_MOSI

Source§

type Miso = SPI1_MISO

Source§

type RxChannel = Channel12

Source§

type TxChannel = Channel13

Implementors§