pub struct SPIMaster1<MISO, MOSI, SCK> { /* fields omitted */ }
👎 Deprecated since 0.13.0:

The sercom::v1::spi module is deprecated, and will be removed in a subsequent release. Please use the sercom::v2::spi module instead.

Expand description

SPIMasterX represents the corresponding SERCOMX instance configured to act in the role of an SPI Master. Objects of this type implement the HAL FullDuplex and blocking SPI traits.

This type is generic over any valid pad mapping where there is a defined “data in pin out data out pin out” implementation.

Implementations

👎 Deprecated since 0.13.0:

The sercom::v1::spi module is deprecated, and will be removed in a subsequent release. Please use the sercom::v2::spi module instead.

Power on and configure SERCOMX to work as an SPI Master operating with the specified frequency and SPI Mode. The padout specifies which pins are bound to the MISO, MOSI, SCK functions.

You can use a tuple of three SercomXPadY instances for which there exists a From implementation for SPIMasterXPadout.

👎 Deprecated since 0.13.0:

The sercom::v1::spi module is deprecated, and will be removed in a subsequent release. Please use the sercom::v2::spi module instead.

Set the baud rate

👎 Deprecated since 0.13.0:

The sercom::v1::spi module is deprecated, and will be removed in a subsequent release. Please use the sercom::v2::spi module instead.

Tear down the SPI instance and yield the constituent pins and SERCOM instance. No explicit de-initialization is performed.

Trait Implementations

👎 Deprecated since 0.13.0:

The spi_common module is deprecated, and will be removed in a subsequent release. Please use the sercom::v2::spi::AnySpi trait instead.

Helper for accessing the spi member of the sercom instance

👎 Deprecated since 0.13.0:

The spi_common module is deprecated, and will be removed in a subsequent release. Please use the sercom::v2::spi::AnySpi trait instead.

Helper for accessing the spi member of the sercom instance

👎 Deprecated since 0.13.0:

The spi_common module is deprecated, and will be removed in a subsequent release. Please use the sercom::v2::spi::AnySpi trait instead.

Disable the SPI

👎 Deprecated since 0.13.0:

The spi_common module is deprecated, and will be removed in a subsequent release. Please use the sercom::v2::spi::AnySpi trait instead.

Enable the SPI

👎 Deprecated since 0.13.0:

The spi_common module is deprecated, and will be removed in a subsequent release. Please use the sercom::v2::spi::AnySpi trait instead.

Set the polarity (CPOL) and phase (CPHA) of the SPI

👎 Deprecated since 0.13.0:

The spi_common module is deprecated, and will be removed in a subsequent release. Please use the sercom::v2::spi::AnySpi trait instead.

Method for calculating the output frequency given our baud settings. Read more

👎 Deprecated since 0.13.0:

The spi_common module is deprecated, and will be removed in a subsequent release. Please use the sercom::v2::spi::AnySpi trait instead.

Helper for calculating our baudrate register Read more

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.

Error type

Sends words to the slave. Returns the words received from the slave

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.

Error type

Sends words to the slave, ignoring all the incoming words