[][src]Crate samd_dma

DMA library for Microchip SAM micro-controllers.

This library provides a convenience wrapper around the DMA and CRC subsystem of the SAM family of micro-controllers. It is designed to be maximally expressive while providing a convenient interface for simple tasks.

Safety

The primary goal of this library is to abstract away directly writing to registers. It is not concerned with larger goals like totally memory safe DMA, which is left to the discretion of the library user and the goals you are trying to accomplish. If you only need one descriptor per channel and aren't reading from the write-back address, you can use this library without any unsafe sections. More advanced features of the DMA system are not protected by this library, and it is possible to shot yourself in the foot if not careful. I highly recommend reading the relevant sections of the manual for your family of micro-controller to understand how the DMA system works and operates on memory outside of the compilers knowledge.

SAMD21

Because of the design of the DMA system on the SAMD21 family, any channel methods that modify channel registers are NOT interrupt-safe. Beware of accessing or mutating channel register without calling in an interrupt-free section.

Modules

consts

Contains types used to identify DMA channels.

storage

Storage for DMA system base and write-back addresses.

Structs

Channel

DMA channel.

Channels

A bitfield of possible channels.

DMAController

DMA system controller.

Interrupts

A bitfield to represent channel interrupt flags.

TransferDescriptor

The raw descriptor memory structure used by the DMA system to configure a block transfer.

Enums

BeatSize

Size of a DMA beat transfer memory access.

BlockAction

Define what happens when a block transfer completes.

BurstLength

Length of a burst in beats.

EventOutput

When EVSYS events should be output.

FifoThreshold

Number of beats before destination writes occur.

Priority

Priority level of a channel.

QoS

Quality of Service guarantee for the DMA system.

Status

The status of a channel.

StepSize

Size of the address advancement step.

TransactionError

Error type for the kinds of errors that can occur during a transaction.

TriggerAction

What action occurs when a trigger is received.

TriggerSource

Trigger source for a channel.

WaitResult

The return value of Transaction::try_wait().