[][src]Crate trinket_m0

Re-exports

pub use hal::target_device as pac;

Modules

calibration

NVM Software Calibration Area Mapping

clock

Configuring the system clock sources. You will typically need to create an instance of GenericClockController before you can set up most of the peripherals on the atsamd21 device. The other types in this module are used to enforce at compile time that the peripherals have been correctly configured.

delay

Delays

eic
gpio

GPIO

pad
prelude

Import the prelude to gain convenient access to helper traits

rtc

Real-time clock/counter

sercom

Configure the SERCOM peripherals

sleeping_delay

Delays with WFI sleep while we wait using a timer

spi_common
time

Time units

timer

Working with timer counter hardware

timer_params

helper struct to calculate divider & cycles settings for timers.

timer_traits

Structs

Dotstar

Dotstar pins

I2C

I2C pins

Pins

Maps the pins to their arduino names and the numbers printed on the board.

Sets

Sets of pins split apart by category

UART

UART pins

USB

USB pins

Enums

ResetCause

ResetCause represents the reason the MCU was reset.

Functions

i2c_master

Convenience for setting up the D0 and D2 pins to operate as I²C SDA/SDL (respectively) running at the specified baud.

reset_cause

Returns the cause of the last reset.

serial_number

Returns the serial number of the chip as an array of bytes. The serial number is only guaranteed to be unique if all 16 bytes are used.

spi_master

Convenience function for setting up the A7/D3/SCK, A6/D4/MOSI, and A9/D2/MISO pins as a SPI Master.

split_serial_number

Returns the serial number of the chip as 4 32-bit integers. The serial number is only guaranteed to be unique if all 128 bits are used.

uart

Convenience for setting up the D3 and D4 pins to operate as UART RX/TX (respectively) running at the specified baud.

Attribute Macros

entry

Attribute to declare the entry point of the program