modm API documentation
modm::platform::DmaController< ID > Class Template Reference

#include <modm/platform/dma/dma.hpp>

Inheritance diagram for modm::platform::DmaController< ID >:
modm::platform::DmaBase

Classes

class  Channel
 

Public Typedefs

using IrqHandler = void (*)(void)
 

Public Types

enum  Channel {
  Channel1 = 0, Channel2, Channel3, Channel4,
  Channel5, Channel6, Channel7, Channel8
}
 
enum  CircularMode : uint32_t { Disabled = 0, CircularMode::Enabled = DMA_CCR_CIRC }
 
enum  DataTransferDirection : uint32_t { DataTransferDirection::PeripheralToMemory = 0, DataTransferDirection::MemoryToPeripheral = DMA_CCR_DIR, DataTransferDirection::MemoryToMemory = DMA_CCR_MEM2MEM }
 
enum  InterruptEnable : uint32_t { TransferComplete = DMA_CCR_TCIE, HalfTransfer = DMA_CCR_HTIE, TransferError = DMA_CCR_TEIE }
 
enum  InterruptFlags : uint8_t {
  Global = 0b0001, TransferComplete = 0b0010, HalfTransferComplete = 0b0100, Error = 0b1000,
  All = 0b1111
}
 
enum  MemoryDataSize : uint32_t {
  Byte = 0, Bit8 = Byte, HalfWord = DMA_CCR_MSIZE_0, Bit16 = HalfWord,
  Word = DMA_CCR_MSIZE_1, Bit32 = Word
}
 
enum  MemoryIncrementMode : uint32_t { Fixed = 0, MemoryIncrementMode::Increment = DMA_CCR_MINC }
 
enum  PeripheralDataSize : uint32_t {
  Byte = 0, Bit8 = Byte, HalfWord = DMA_CCR_PSIZE_0, Bit16 = HalfWord,
  Word = DMA_CCR_PSIZE_1, Bit32 = Word
}
 
enum  PeripheralIncrementMode : uint32_t { Fixed = 0, PeripheralIncrementMode::Increment = DMA_CCR_PINC }
 
enum  Priority : uint32_t { Low = 0, Medium = DMA_CCR_PL_0, High = DMA_CCR_PL_1, VeryHigh = DMA_CCR_PL_1 | DMA_CCR_PL_0 }
 
enum  Request {
  None = 0, Request1, Request2, Request3,
  Request4, Request5, Request6, Request7,
  Request8, Request9, Request10, Request11,
  Request12, Request13, Request14, Request15,
  Request16, Request17, Request18, Request19,
  Request20, Request21, Request22, Request23,
  Request24, Request25, Request26, Request27,
  Request28, Request29, Request30, Request31,
  Request32, Request33, Request34, Request35,
  Request36, Request37, Request38, Request39,
  Request40, Request41, Request42, Request43,
  Request44, Request45, Request46, Request47,
  Request48, Request49, Request50, Request51,
  Request52, Request53, Request54, Request55,
  Request56, Request57, Request58, Request59,
  Request60, Request61, Request62, Request63,
  Request64, Request65, Request66, Request67,
  Request68, Request69, Request70, Request71,
  Request72, Request73, Request74, Request75,
  Request76, Request77, Request78, Request79,
  Request80, Request81, Request82, Request83,
  Request84, Request85, Request86, Request87,
  Request88, Request89, Request90, Request91,
  Request92, Request93, Request94, Request95,
  Request96, Request97, Request98, Request99,
  Request100, Request101, Request102, Request103,
  Request104, Request105, Request106, Request107,
  Request108, Request109, Request110, Request111,
  Request112, Request113, Request114, Request115
}
 
enum  Signal : uint8_t {
  NoSignal, A, B, C,
  Ch1, Ch2, Ch3, Ch4,
  Com, D, E, F,
  Generator0, Generator1, Generator2, Generator3,
  M, Read, Rx, Trig,
  Tx, Up, Write
}
 

Public Member Functions

 MODM_FLAGS32 (InterruptEnable)
 
 MODM_FLAGS32 (InterruptFlags)
 

Static Public Member Functions

static void enable ()
 
static void disable ()
 

Static Protected Attributes

static constexpr uint32_t configmask
 
static constexpr uint32_t memoryMask
 
static constexpr uint32_t peripheralMask
 

Detailed Description

template<uint32_t ID>
class modm::platform::DmaController< ID >

DMA controller

Does not support - among other things - double buffering or FIFO usage

Author
Mike Wolfram

Member Enumeration Documentation

enum modm::platform::DmaBase::CircularMode : uint32_t
inheritedstrong
Enum ValuesDocumentation
Enabled 

circular mode

enum modm::platform::DmaBase::DataTransferDirection : uint32_t
inheritedstrong
Enum ValuesDocumentation
PeripheralToMemory 

Source: DMA_CPARx; Sink: DMA_CMARx.

MemoryToPeripheral 

Source: DMA_CMARx; Sink: DMA_CPARx.

MemoryToMemory 

Source: DMA_CPARx; Sink: DMA_CMARx.

enum modm::platform::DmaBase::MemoryDataSize : uint32_t
inheritedstrong

In direct mode (if the FIFO is not used) MSIZE is forced by hardware to the same value as PSIZE

enum modm::platform::DmaBase::MemoryIncrementMode : uint32_t
inheritedstrong
Enum ValuesDocumentation
Increment 

incremented according to MemoryDataSize

enum modm::platform::DmaBase::PeripheralIncrementMode : uint32_t
inheritedstrong
Enum ValuesDocumentation
Increment 

incremented according to PeripheralDataSize

enum modm::platform::DmaBase::Signal : uint8_t
inheritedstrong

Peripheral signals that can be used in DMA channels

Member Function Documentation

template<uint32_t ID>
static void modm::platform::DmaController< ID >::disable ( )
inlinestatic

Disable the DMA controller in the RCC

template<uint32_t ID>
static void modm::platform::DmaController< ID >::enable ( )
inlinestatic

Enable the DMA controller in the RCC

Member Data Documentation

constexpr uint32_t modm::platform::DmaBase::configmask
inheritedstaticprotectedconstexpr
Initial value:
DMA_CCR_CIRC |
DMA_CCR_PL_1 | DMA_CCR_PL_0
constexpr uint32_t modm::platform::DmaBase::memoryMask
inheritedstaticprotectedconstexpr
Initial value:
DMA_CCR_MSIZE_0 | DMA_CCR_MSIZE_1 |
DMA_CCR_MINC |
DMA_CCR_DIR | DMA_CCR_MEM2MEM
constexpr uint32_t modm::platform::DmaBase::peripheralMask
inheritedstaticprotectedconstexpr
Initial value:
DMA_CCR_PSIZE_0 | DMA_CCR_PSIZE_1 |
DMA_CCR_PINC |
DMA_CCR_DIR | DMA_CCR_MEM2MEM

The documentation for this class was generated from the following file: