|
modm API documentation
|
#include <modm/platform/dma/dma.hpp>
Classes | |
| struct | RequestMapping |
Static Public Member Functions | |
| static void | configure (DataTransferDirection direction, MemoryDataSize memoryDataSize, PeripheralDataSize peripheralDataSize, MemoryIncrementMode memoryIncrement, PeripheralIncrementMode peripheralIncrement, Priority priority=Priority::Medium, CircularMode circularMode=CircularMode::Disabled) |
| static void | start () |
| static void | stop () |
| static DataTransferDirection | getDataTransferDirection () |
| static void | setMemoryAddress (uintptr_t address) |
| static void | setPeripheralAddress (uintptr_t address) |
| static void | setMemoryIncrementMode (bool increment) |
| static void | setPeripheralIncrementMode (bool increment) |
| static void | setDataLength (std::size_t length) |
| static void | setTransferErrorIrqHandler (IrqHandler irqHandler) |
| static void | setHalfTransferCompleteIrqHandler (IrqHandler irqHandler) |
| static void | setTransferCompleteIrqHandler (IrqHandler irqHandler) |
| template<DmaBase::Request dmaRequest> | |
| static void | setPeripheralRequest () |
| static void | interruptHandler () |
| static void | enableInterruptVector (uint32_t priority=1) |
| static void | disableInterruptVector () |
| static void | enableInterrupt (InterruptEnable_t irq) |
| static void | disableInterrupt (InterruptEnable_t irq) |
Class representing a DMA channel/stream
|
inlinestatic |
Configure the DMA channel
Stops the DMA channel and writes the new values to its control register.
| [in] | direction | Direction of the DMA channel |
| [in] | memoryDataSize | Size of data in memory (byte, halfword, word) |
| [in] | peripheralDataSize | Size of data in peripheral (byte, halfword, word) |
| [in] | memoryIncrement | Defines whether the memory address is incremented after a transfer completed |
| [in] | peripheralIncrement | Defines whether the peripheral address is incremented after a transfer completed |
| [in] | priority | Priority of the DMA channel |
| [in] | circularMode | Transfer data in circular mode? |
|
inlinestatic |
Disable the specified interrupt of the channel
|
inlinestatic |
Disable the IRQ vector of the channel
|
inlinestatic |
Enable the specified interrupt of the channel
|
inlinestatic |
Enable the IRQ vector of the channel
| [in] | priority | Priority of the IRQ |
|
inlinestatic |
Get the direction of the data transfer
|
inlinestatic |
IRQ handler of the DMA channel
Reads the IRQ status and checks for error or transfer complete. In case of error the DMA channel will be disabled.
|
inlinestatic |
Set the length of data to be transfered
|
inlinestatic |
Set the IRQ handler for half transfer complete
Called by the channels IRQ handler when the transfer is half complete.
|
inlinestatic |
Set the memory address of the DMA channel
| [in] | address | Source address |
|
inlinestatic |
Enable/disable memory increment
When enabled, the memory address is incremented by the size of the data (e.g. 1 for byte transfers, 4 for word transfers) after the transfer completed.
| [in] | increment | Enable/disable |
|
inlinestatic |
Set the peripheral address of the DMA channel
| [in] | address | Destination address |
|
inlinestatic |
Enable/disable peripheral increment
When enabled, the peripheral address is incremented by the size of the data (e.g. 1 for byte transfers, 4 for word transfers) after the transfer completed.
| [in] | increment | Enable/disable |
|
inlinestatic |
Set the peripheral that operates the channel
|
inlinestatic |
Set the IRQ handler for transfer complete
Called by the channels IRQ handler when the transfer is complete.
|
inlinestatic |
Set the IRQ handler for transfer errors
The handler will be called from the channels IRQ handler function when the IRQ status indicates an error occured.
|
inlinestatic |
Start the transfer of the DMA channel
|
inlinestatic |
Stop a DMA channel transfer