[][src]Module trellis_m4::sercom

Working with the SERCOM peripherals.

The atsamd51 hardware has several SERCOM instances that can be configured to perform a variety of serial communication tasks. This configuration is expressed through the use of type states to make it difficult to misuse. Each sercom instance is associated with a group of IO pins referred to as a Pad. When the pins are set to the appropriate peripheral function mode they are routed to the sercom pad.

Structs

I2CMaster0

Represents the Sercom instance configured to act as an I2C Master. The embedded_hal blocking I2C traits are implemented by this instance.

I2CMaster1

Represents the Sercom instance configured to act as an I2C Master. The embedded_hal blocking I2C traits are implemented by this instance.

I2CMaster2

Represents the Sercom instance configured to act as an I2C Master. The embedded_hal blocking I2C traits are implemented by this instance.

I2CMaster3

Represents the Sercom instance configured to act as an I2C Master. The embedded_hal blocking I2C traits are implemented by this instance.

I2CMaster4

Represents the Sercom instance configured to act as an I2C Master. The embedded_hal blocking I2C traits are implemented by this instance.

I2CMaster5

Represents the Sercom instance configured to act as an I2C Master. The embedded_hal blocking I2C traits are implemented by this instance.

SPIMaster0

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.

SPIMaster0Padout

A pad mapping configuration for the SERCOM in SPI master mode.

SPIMaster1Padout

A pad mapping configuration for the SERCOM in SPI master mode.

SPIMaster1

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.

SPIMaster2Padout

A pad mapping configuration for the SERCOM in SPI master mode.

SPIMaster2

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.

SPIMaster3Padout

A pad mapping configuration for the SERCOM in SPI master mode.

SPIMaster3

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.

SPIMaster4Padout

A pad mapping configuration for the SERCOM in SPI master mode.

SPIMaster4

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.

SPIMaster5Padout

A pad mapping configuration for the SERCOM in SPI master mode.

SPIMaster5

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.

Sercom0Pad0

Represents a numbered pad for the associated sercom instance. The pad is generic over any pin, only the PadPin implementations in this the sercom module make sense.

Sercom0Pad1

Represents a numbered pad for the associated sercom instance. The pad is generic over any pin, only the PadPin implementations in this the sercom module make sense.

Sercom0Pad2

Represents a numbered pad for the associated sercom instance. The pad is generic over any pin, only the PadPin implementations in this the sercom module make sense.

Sercom0Pad3

Represents a numbered pad for the associated sercom instance. The pad is generic over any pin, only the PadPin implementations in this the sercom module make sense.

Sercom1Pad0

Represents a numbered pad for the associated sercom instance. The pad is generic over any pin, only the PadPin implementations in this the sercom module make sense.

Sercom1Pad1

Represents a numbered pad for the associated sercom instance. The pad is generic over any pin, only the PadPin implementations in this the sercom module make sense.

Sercom1Pad2

Represents a numbered pad for the associated sercom instance. The pad is generic over any pin, only the PadPin implementations in this the sercom module make sense.

Sercom1Pad3

Represents a numbered pad for the associated sercom instance. The pad is generic over any pin, only the PadPin implementations in this the sercom module make sense.

Sercom2Pad0

Represents a numbered pad for the associated sercom instance. The pad is generic over any pin, only the PadPin implementations in this the sercom module make sense.

Sercom2Pad1

Represents a numbered pad for the associated sercom instance. The pad is generic over any pin, only the PadPin implementations in this the sercom module make sense.

Sercom2Pad2

Represents a numbered pad for the associated sercom instance. The pad is generic over any pin, only the PadPin implementations in this the sercom module make sense.

Sercom2Pad3

Represents a numbered pad for the associated sercom instance. The pad is generic over any pin, only the PadPin implementations in this the sercom module make sense.

Sercom3Pad0

Represents a numbered pad for the associated sercom instance. The pad is generic over any pin, only the PadPin implementations in this the sercom module make sense.

Sercom3Pad1

Represents a numbered pad for the associated sercom instance. The pad is generic over any pin, only the PadPin implementations in this the sercom module make sense.

Sercom3Pad2

Represents a numbered pad for the associated sercom instance. The pad is generic over any pin, only the PadPin implementations in this the sercom module make sense.

Sercom3Pad3

Represents a numbered pad for the associated sercom instance. The pad is generic over any pin, only the PadPin implementations in this the sercom module make sense.

Sercom4Pad0

Represents a numbered pad for the associated sercom instance. The pad is generic over any pin, only the PadPin implementations in this the sercom module make sense.

Sercom4Pad1

Represents a numbered pad for the associated sercom instance. The pad is generic over any pin, only the PadPin implementations in this the sercom module make sense.

Sercom4Pad2

Represents a numbered pad for the associated sercom instance. The pad is generic over any pin, only the PadPin implementations in this the sercom module make sense.

Sercom4Pad3

Represents a numbered pad for the associated sercom instance. The pad is generic over any pin, only the PadPin implementations in this the sercom module make sense.

Sercom5Pad0

Represents a numbered pad for the associated sercom instance. The pad is generic over any pin, only the PadPin implementations in this the sercom module make sense.

Sercom5Pad1

Represents a numbered pad for the associated sercom instance. The pad is generic over any pin, only the PadPin implementations in this the sercom module make sense.

Sercom5Pad2

Represents a numbered pad for the associated sercom instance. The pad is generic over any pin, only the PadPin implementations in this the sercom module make sense.

Sercom5Pad3

Represents a numbered pad for the associated sercom instance. The pad is generic over any pin, only the PadPin implementations in this the sercom module make sense.

UART0

UARTX represents the corresponding SERCOMX instance configured to act in the role of a UART Master. Objects of this type implement the HAL serial::Read, serial::Write traits.

UART0Padout

A pad mapping configuration for the SERCOM in UART mode.

UART1Padout

A pad mapping configuration for the SERCOM in UART mode.

UART1

UARTX represents the corresponding SERCOMX instance configured to act in the role of a UART Master. Objects of this type implement the HAL serial::Read, serial::Write traits.

UART2Padout

A pad mapping configuration for the SERCOM in UART mode.

UART2

UARTX represents the corresponding SERCOMX instance configured to act in the role of a UART Master. Objects of this type implement the HAL serial::Read, serial::Write traits.

UART3Padout

A pad mapping configuration for the SERCOM in UART mode.

UART3

UARTX represents the corresponding SERCOMX instance configured to act in the role of a UART Master. Objects of this type implement the HAL serial::Read, serial::Write traits.

UART4Padout

A pad mapping configuration for the SERCOM in UART mode.

UART4

UARTX represents the corresponding SERCOMX instance configured to act in the role of a UART Master. Objects of this type implement the HAL serial::Read, serial::Write traits.

UART5Padout

A pad mapping configuration for the SERCOM in UART mode.

UART5

UARTX represents the corresponding SERCOMX instance configured to act in the role of a UART Master. Objects of this type implement the HAL serial::Read, serial::Write traits.

Enums

Error
I2CError

Traits

DipoDopo

The DipoDopo trait defines a way to get the data in and data out pin out values for a given SPIMasterXPadout configuration. You should not implement this trait for yourself; only the implementations in the sercom module make sense.

PadPin

The PadPin trait makes it more ergonomic to convert a pin into a Sercom pad. You should not implement this trait for yourself; only the implementations in the sercom module make sense.

RxpoTxpo

The RxpoTxpo trait defines a way to get the data in and data out pin out values for a given UARTXPadout configuration. You should not implement this trait for yourself; only the implementations in the sercom module make sense.