modm API documentation
modm::platform::DacDma::Channel2< DmaChannel > Class Template Reference

#include <modm/platform/dac/dac_dma.hpp>

Static Public Member Functions

static void enableDacChannel ()
 Enable the DAC channel.
 
static void disableDacChannel ()
 Disable the DAC channel.
 
static void setOutputBufferEnabled (bool enabled)
 Enable the output buffer.
 
static void setTriggerSource (uint8_t triggerSource)
 
static bool hasDmaUnderrun ()
 
static void configure (const void *data, size_t dataSize, DmaChannel::CircularMode circularMode, DmaChannel::Priority priority=DmaChannel::Priority::Medium)
 
static void setData (const void *data, size_t dataSize)
 
static void startDma ()
 
static void stopDma ()
 Stop DMA transfers.
 

Detailed Description

template<typename DmaChannel>
class modm::platform::DacDma::Channel2< DmaChannel >

DAC output channel 2

Member Function Documentation

template<typename DmaChannel >
static void modm::platform::DacDma::Channel2< DmaChannel >::configure ( const void *  data,
size_t  dataSize,
DmaChannel::CircularMode  circularMode,
DmaChannel::Priority  priority = DmaChannel::Priority::Medium 
)
static

Configure the DMA channel

Warning
this function must be called before enabling the DMA channel
Precondition
the DMA channel must be disabled to be reconfigured
Parameters
dataoutput data
dataSizenumber of DMA transfers to be performed
circularModeDMA circular mode setting
priorityDMA transfer priority
template<typename DmaChannel >
static bool modm::platform::DacDma::Channel2< DmaChannel >::hasDmaUnderrun ( )
static

Returns true on DMA underrun

Warning
To reset the condition both the DAC channel and DMA channel have to be disabled and and the DMA channel must be reconfigured.
template<typename DmaChannel >
static void modm::platform::DacDma::Channel2< DmaChannel >::setData ( const void *  data,
size_t  dataSize 
)
static

Set data to transfer

Precondition
the DMA channel must be disabled to call this function
Parameters
dataoutput data
dataSizenumber of DMA transfers to be performed
template<typename DmaChannel >
static void modm::platform::DacDma::Channel2< DmaChannel >::setTriggerSource ( uint8_t  triggerSource)
static

Configure the external trigger source

If DMA is used the external trigger mode is always active

Parameters
triggerSourcetrigger source id, please refer to the reference manual
template<typename DmaChannel >
static void modm::platform::DacDma::Channel2< DmaChannel >::startDma ( )
static

Start DMA transfers

Precondition
before starting the transfer the channel must be configured

The documentation for this class was generated from the following file: