Class representing a DMA channel/stream.
More...
#include <modm/platform/dma/dma.hpp>
|
| static void | configure (TransferDataSize transferDataSize, bool readIncrement, bool writeIncrement) |
| |
|
static void | start () |
| | Start the transfer of the DMA channel.
|
| |
|
static void | stop () |
| | Stop a DMA channel transfer.
|
| |
| static void | setReadAddress (uintptr_t address) |
| |
| static void | setWriteAddress (uintptr_t address) |
| |
| static void | setReadIncrementMode (bool increment) |
| |
| static void | setWriteIncrementMode (bool increment) |
| |
|
static void | setDataLength (std::size_t length) |
| | Set the length of data to be transfered (num transactions, not bytes)
|
| |
|
template<Request dmaRequest> |
| static void | setPeripheralRequest () |
| | Set the peripheral that operates the channel.
|
| |
|
static void | enableInterrupt () |
| | Enable the specified interrupt of the channel.
|
| |
|
static void | disableInterrupt () |
| | Disable the specified interrupt of the channel.
|
| |
|
static bool | isBusy () |
| |
|
static bool | isCompleted () |
| |
|
static void | startWrite (const void *src, std::size_t count) |
| |
|
static void | startRead (void *dst, std::size_t count) |
| |
|
template<class OtherChannel > |
| static void | chainTo () |
| |
|
|
static constexpr DmaBase::Channel | name = ChannelID |
| |
|
static constexpr uint32_t | idx = uint32_t(ChannelID) |
| |
|
static constexpr uint32_t | mask = (1u << idx) |
| |
template<DmaBase::Channel ChannelID>
class modm::platform::DmaController::Channel< ChannelID >
Class representing a DMA channel/stream.
template<DmaBase::Channel ChannelID>
| static void modm::platform::DmaController::Channel< ChannelID >::configure |
( |
TransferDataSize |
transferDataSize, |
|
|
bool |
readIncrement, |
|
|
bool |
writeIncrement |
|
) |
| |
|
inlinestatic |
Configure the DMA channel
Stops the DMA channel and writes the new values to its control register.
- Parameters
-
| [in] | transferDataSize | Size of data in transfer (byte, halfword, word) |
| [in] | readIncrement | Defines whether the read address is incremented after a transfer completed |
| [in] | writeIncrement | Defines whether the write address is incremented after a transfer completed |
template<DmaBase::Channel ChannelID>
| static void modm::platform::DmaController::Channel< ChannelID >::setReadAddress |
( |
uintptr_t |
address | ) |
|
|
inlinestatic |
Set the read address of the DMA channel
- Note
- In Mem2Mem mode use this method to set the memory source address.
- Parameters
-
| [in] | address | Source address |
template<DmaBase::Channel ChannelID>
| static void modm::platform::DmaController::Channel< ChannelID >::setReadIncrementMode |
( |
bool |
increment | ) |
|
|
inlinestatic |
Enable/disable read increment
When enabled, the read address is incremented by the size of the data (e.g. 1 for byte transfers, 4 for word transfers) after the transfer completed.
- Parameters
-
| [in] | increment | Enable/disable |
template<DmaBase::Channel ChannelID>
| static void modm::platform::DmaController::Channel< ChannelID >::setWriteAddress |
( |
uintptr_t |
address | ) |
|
|
inlinestatic |
Set the write address of the DMA channel
- Note
- In Mem2Mem mode use this method to set the memory destination address.
- Parameters
-
| [in] | address | Destination address |
template<DmaBase::Channel ChannelID>
| static void modm::platform::DmaController::Channel< ChannelID >::setWriteIncrementMode |
( |
bool |
increment | ) |
|
|
inlinestatic |
Enable/disable write increment
When enabled, the write address is incremented by the size of the data (e.g. 1 for byte transfers, 4 for word transfers) after the transfer completed.
- Parameters
-
| [in] | increment | Enable/disable |
The documentation for this class was generated from the following file: