MODDMA GPDMA Controller
New features: transfer pins to memory buffer under periodic timer control and send double buffers to DAC
Dependents:
FirstTest
WaveSim
IO-dma-memmem
DACDMAfuncgenlib
... more
« Back to documentation index
The MODDMA API
Functions
void init (bool isConstructorCalling, int Channels=0xFF, int Tc=0xFF, int Err=0xFF)
Used to setup the DMA controller to prepare for a data transfer.
uint32_t Prepare (MODDMA_Config *c)
Used to setup and enable the DMA controller.
uint32_t Setup (MODDMA_Config *c)
Used to setup the DMA controller to prepare for a data transfer.
void Enable (CHANNELS ChannelNumber)
Enable and begin data transfer.
void Enable (uint32_t ChannelNumber)
Enable and begin data transfer (overloaded function)
void Enable (MODDMA_Config *config)
Enable and begin data transfer (overloaded function)
void Disable (CHANNELS ChannelNumber)
Disable a channel and end data transfer.
void Disable (uint32_t ChannelNumber)
Disable a channel and end data transfer (overloaded function)
bool Enabled (CHANNELS ChannelNumber)
Is the specified channel enabled?
bool Enabled (uint32_t ChannelNumber)
Is the specified channel enabled? (overloaded function)
MODDMA_Config * getConfig (void)
Get a pointer to the current configuration the ISR is servicing.
CHANNELS irqProcessingChannel (void)
Gets which channel the ISR is currently servicing.
void clearErrIrq (CHANNELS n)
Clear the error interrupt after handling.
void clearErrIrq (void)
Clear the error interrupt the ISR is currently handing.
bool isActive (CHANNELS ChannelNumber)
Is the supplied channel currently active?
void haltChannel (CHANNELS ChannelNumber)
Halt the supplied channel.
uint32_t getControl (CHANNELS ChannelNumber)
get a channels control register.
void haltAndWaitChannelComplete (CHANNELS n)
Wait for channel transfer to complete and then halt.
void attach_tc (void(*fptr)(void))
Attach a callback to the TC IRQ controller.
template<typename T >
void attach_tc (T *tptr, void(T::*mptr)(void))
Attach a callback to the TC IRQ controller.
void attach_err (void(*fptr)(void))
Attach a callback to the ERR IRQ controller.
template<typename T >
void attach_err (T *tptr, void(T::*mptr)(void))
Attach a callback to the ERR IRQ controller.
Function Documentation
void attach_err
(
void(*)(void)
fptr )
[inherited]
Attach a callback to the ERR IRQ controller.
Parameters:
fptr A function pointer to call
Returns: this
Definition at line 638 of file MODDMA.h .
void attach_err
(
T *
tptr ,
void(T::*)(void)
mptr
)
[inherited]
Attach a callback to the ERR IRQ controller.
Parameters:
tptr A template pointer to the calling object
mptr A method pointer within the object to call.
Returns: this
Definition at line 651 of file MODDMA.h .
void attach_tc
(
void(*)(void)
fptr )
[inherited]
Attach a callback to the TC IRQ controller.
Parameters:
fptr A function pointer to call
Returns: this
Definition at line 607 of file MODDMA.h .
void attach_tc
(
T *
tptr ,
void(T::*)(void)
mptr
)
[inherited]
Attach a callback to the TC IRQ controller.
Parameters:
tptr A template pointer to the calling object
mptr A method pointer within the object to call.
Returns: this
Definition at line 620 of file MODDMA.h .
void clearErrIrq
(
CHANNELS
n )
[inherited]
Clear the error interrupt after handling.
Parameters:
CHANNELS The channel the IQR occured on.
Definition at line 559 of file MODDMA.h .
void clearErrIrq
(
void
)
[inherited]
Clear the error interrupt the ISR is currently handing.
Definition at line 565 of file MODDMA.h .
void Disable
(
uint32_t
ChannelNumber )
[inherited]
Disable a channel and end data transfer (overloaded function)
Parameters:
ChannelNumber Type uin32_t, the channel number to disable
Definition at line 439 of file MODDMA.h .
void Disable
(
CHANNELS
ChannelNumber )
[inherited]
Disable a channel and end data transfer.
Parameters:
ChannelNumber Type CHANNELS, the channel number to enable
Definition at line 45 of file MODDMA.cpp .
void Enable
(
uint32_t
ChannelNumber )
[inherited]
Enable and begin data transfer (overloaded function)
Parameters:
ChannelNumber Type uin32_t, the channel number to enable
Definition at line 414 of file MODDMA.h .
void Enable
(
CHANNELS
ChannelNumber )
[inherited]
Enable and begin data transfer.
Parameters:
ChannelNumber Type CHANNELS, the channel number to enable
Definition at line 31 of file MODDMA.cpp .
Enable and begin data transfer (overloaded function)
Parameters:
config A pointer to teh configuration
Definition at line 422 of file MODDMA.h .
bool Enabled
(
CHANNELS
ChannelNumber )
[inherited]
Is the specified channel enabled?
Parameters:
ChannelNumber Type CHANNELS, the channel number to test
Returns: bool true if enabled, false otherwise.
Definition at line 38 of file MODDMA.cpp .
bool Enabled
(
uint32_t
ChannelNumber )
[inherited]
Is the specified channel enabled? (overloaded function)
Parameters:
ChannelNumber Type uin32_t, the channel number to test
Returns: bool true if enabled, false otherwise.
Definition at line 457 of file MODDMA.h .
Get a pointer to the current configuration the ISR is servicing.
Returns: MODDMA_Config * A pointer to the setup the ISR is currently servicing.
Definition at line 507 of file MODDMA.h .
uint32_t getControl
(
CHANNELS
ChannelNumber )
[inherited]
get a channels control register.
Parameters:
CHANNELS The channel to get the control register for.
Definition at line 66 of file MODDMA.cpp .
void haltAndWaitChannelComplete
(
CHANNELS
n )
[inherited]
Wait for channel transfer to complete and then halt.
Parameters:
CHANNELS The channel to wait for then halt.
Definition at line 598 of file MODDMA.h .
void haltChannel
(
CHANNELS
ChannelNumber )
[inherited]
Halt the supplied channel.
Parameters:
CHANNELS The channel to halt.
Definition at line 59 of file MODDMA.cpp .
void init
(
bool
isConstructorCalling ,
int
Channels = 0xFF
,
int
Tc = 0xFF
,
int
Err = 0xFF
)
[inherited]
Used to setup the DMA controller to prepare for a data transfer.
Parameters:
isConstructorCalling Set true when called from teh constructor
Definition at line 32 of file INIT.cpp .
CHANNELS irqProcessingChannel
(
void
)
[inherited]
Gets which channel the ISR is currently servicing.
Returns: CHANNELS The current channel the ISR is servicing.
Definition at line 524 of file MODDMA.h .
bool isActive
(
CHANNELS
ChannelNumber )
[inherited]
Is the supplied channel currently active?
Parameters:
CHANNELS The channel to inquire about.
Returns: bool true if active, false otherwise.
Definition at line 52 of file MODDMA.cpp .
Used to setup and enable the DMA controller.
See also: Setup
Enable
Parameters:
Definition at line 386 of file MODDMA.h .
Used to setup the DMA controller to prepare for a data transfer.
Parameters:
Definition at line 28 of file SETUP.cpp .