Struct kea_hal::spi::Spi[][src]

pub struct Spi<SPI, Disabled, Pins> { /* fields omitted */ }
Expand description

Spi Peripheral Interface

Implementations

Change to alternate pins

Enable SPI0 with default pins

Enable SPI0 in peripheral mode with Alternate Pins

Enable SPI0 in controller mode with Alternate Pins

Enable SPI0 in peripheral mode with Alternate Pins

Enable SPI1 as the controller with default pins

When manage_cs is set (and the cs pin has been provided) SPI1 will automatically drive the CS pin when doing SPI transfers. If manage_cs is not set, then this pin is used to detect if there is another Controller on the bus, which throws the Master Mode Fault flag

Enable SPI1 as peripheral with default pins

Set the baud rate of transmission

This is only used when the MCU is the bus Controller. This relies on accurately inputting the bus frequency until a way to share the current bus frequency is worked out.

Set the baud rate by directly setting the divisor

Get the current baudrate divisor

Check if mode fault occured

Check if read buffer full (ready to read)

Check if read matches value in match register

Check if transmit buffer empty (ready to send)

Set the value for hardware read match

Set the baud rate of transmission

This is only used when the MCU is the bus Controller. This relies on accurately inputting the bus frequency until a way to share the current bus frequency is worked out.

Set the baud rate by directly setting the divisor

Get the current baudrate divisor

Check if mode fault occured

Check if read buffer full (ready to read)

Check if read matches value in match register

Check if transmit buffer empty (ready to send)

Set the value for hardware read match

Trait Implementations

An enumeration of SPI errors

Reads the word stored in the shift register Read more

Sends a word to the slave

An enumeration of SPI errors

Reads the word stored in the shift register Read more

Sends a word to the slave

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.