[−][src]Module arduino_mkrzero::sercom
Configure the SERCOM peripherals
The SERCOM module is used to configure the SERCOM peripherals as USART, SPI or I2C interfaces.
Versions
There are currently two versions of the SERCOM module. The inital SERCOM API was based on a macro-heavy implementation. The discussion in issue #214 spurred the creation of a new module with less macro-use and a refactored API.
The new module is provided in v2. The old module was removed, but a compatibility shim is provided in v1 to support existing code.
Migration
The v2 module will eventually replace v1. New users are encouraged to
use v2 instead of v1. Existing code should expect to migrate to v2
before this crate reaches 1.0
.
Modules
v1 | Version 1 of the SERCOM module |
v2 | Version 2 of the SERCOM module |
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. |
Pad | Represents a SERCOM Pad configured to use a particular pin |
SPIMaster0 | SPIMasterX represents the corresponding SERCOMX instance
configured to act in the role of an SPI Master.
Objects of this type implement the HAL |
SPIMaster0Padout | 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 |
SPIMaster1Padout | 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 |
SPIMaster2Padout | 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 |
SPIMaster3Padout | 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 |
SPIMaster4Padout | 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 |
SPIMaster5Padout | A pad mapping configuration for the SERCOM in SPI master mode. |
UART0 | UARTX represents the corresponding SERCOMX instance
configured to act in the role of a UART Master.
Objects of this type implement the HAL |
UART0Padout | 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 |
UART1Padout | 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 |
UART2Padout | 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 |
UART3Padout | 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 |
UART4Padout | 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 |
UART5Padout | A pad mapping configuration for the SERCOM in UART mode. |
Enums
Error | |
I2CError | |
Pad0 | Represents the corresponding SERCOM pad number |
Pad1 | Represents the corresponding SERCOM pad number |
Pad2 | Represents the corresponding SERCOM pad number |
Pad3 | Represents the corresponding SERCOM pad number |
Sercom0 | Represents the corresponding SERCOM instance |
Sercom1 | Represents the corresponding SERCOM instance |
Sercom2 | Represents the corresponding SERCOM instance |
Sercom3 | Represents the corresponding SERCOM instance |
Sercom4 | Represents the corresponding SERCOM instance |
Sercom5 | Represents the corresponding SERCOM instance |
Traits
AnyPad | Meta-type representing any |
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. |
Map | |
OptionalPad | Meta-type representing an optional |
PadNum | Type-level |
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. |
Sercom | Type-level |
SomePad | Meta-type representing a valid |
Type Definitions
ConcretePad | Type alias to convert from an implementation of |
SERCOM | Type alias to extract the correct PAC SERCOM type
from the |
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. |