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

Embed: (wiki syntax)

« Back to documentation index

The MODDMA API

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_ConfiggetConfig (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:
fptrA 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:
tptrA template pointer to the calling object
mptrA 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:
fptrA 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:
tptrA template pointer to the calling object
mptrA 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:
CHANNELSThe 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:
ChannelNumberType 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:
ChannelNumberType 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:
ChannelNumberType 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:
ChannelNumberType CHANNELS, the channel number to enable

Definition at line 31 of file MODDMA.cpp.

void Enable ( MODDMA_Config config ) [inherited]

Enable and begin data transfer (overloaded function)

Parameters:
configA pointer to teh configuration

Definition at line 422 of file MODDMA.h.

bool Enabled ( CHANNELS  ChannelNumber ) [inherited]

Is the specified channel enabled?

Parameters:
ChannelNumberType 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:
ChannelNumberType uin32_t, the channel number to test
Returns:
bool true if enabled, false otherwise.

Definition at line 457 of file MODDMA.h.

MODDMA_Config* getConfig ( void   ) [inherited]

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:
CHANNELSThe 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:
CHANNELSThe channel to wait for then halt.

Definition at line 598 of file MODDMA.h.

void haltChannel ( CHANNELS  ChannelNumber ) [inherited]

Halt the supplied channel.

Parameters:
CHANNELSThe 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:
isConstructorCallingSet 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:
CHANNELSThe channel to inquire about.
Returns:
bool true if active, false otherwise.

Definition at line 52 of file MODDMA.cpp.

uint32_t Prepare ( MODDMA_Config c ) [inherited]

Used to setup and enable the DMA controller.

See also:
Setup
Enable
Parameters:
cA pointer to an instance of MODDMA_Config to setup.

Definition at line 386 of file MODDMA.h.

uint32_t Setup ( MODDMA_Config c ) [inherited]

Used to setup the DMA controller to prepare for a data transfer.

Parameters:
cA pointer to an instance of MODDMA_Config to setup.

Definition at line 28 of file SETUP.cpp.