Go to the documentation of this file.
9 #ifndef _MEGA65_DMA_HPP
10 #define _MEGA65_DMA_HPP
27 template <
size_t N,
typename T = DMAList_F018B>
struct DMAJob {
61 dma.
dmalist.source_addr = value;
63 dma.
dmalist.dest_addr = dst & 0xffff;
64 dma.
dmalist.dest_bank = (dst >> 16) & 0x0f;
84 dma.dmalist.source_addr =
src & 0xffff;
85 dma.dmalist.source_bank = (
src >> 16) & 0x0f;
92 template <
size_t N,
typename T>
105 #endif // _MEGA65_DMA_HPP
@ DST_SKIP_RATE_OPT
Destination skip rate (whole bytes) [value follows].
Definition: _dmagic.h:66
::uint16_t uint16_t
Definition: cstdint:22
#define DMA
DMAgic DMA controller.
Definition: mega65.h:167
::uint8_t uint8_t
Definition: cstdint:21
@ DMA_FILL_CMD
DMA fill command.
Definition: _dmagic.h:23
const void uint16_t count
Definition: memory.h:58
const void * src
Definition: memory.h:57
DMAJob< 7, DMAList_F018B > CommonDMAJob
Common structure for DMA fill and copy jobs.
Definition: dma.hpp:37
CommonDMAJob make_dma_fill(const uint32_t dst, const uint8_t value, const uint16_t count, const uint8_t skip=1)
Definition: dma.hpp:49
void trigger_dma(const DMAJob< N, T > &dma_job)
Definition: dma.hpp:93
@ DMA_COPY_CMD
DMA copy command.
Definition: _dmagic.h:20
@ ENABLE_F018B_OPT
Use 12 byte F011B DMA list format [no value].
Definition: _dmagic.h:60
@ DST_ADDR_BITS_OPT
Destination address bits 20 – 27 [value follows].
Definition: _dmagic.h:64
const uint8_t end_option
Definition: dma.hpp:32
T dmalist
Definition: dma.hpp:33
Definition: type_traits:125
@ SRC_ADDR_BITS_OPT
Source address bits 20 – 27 [value follows].
Definition: _dmagic.h:62
std::array< uint8_t, N > options
Definition: dma.hpp:28
::uint32_t uint32_t
Definition: cstdint:23
CommonDMAJob make_dma_copy(const uint32_t src, const uint32_t dst, const uint16_t count)
Definition: dma.hpp:79