theCore C++ embedded framework
ecl::dma_wrap< Stream, Channel > Struct Template Reference

DMA wrapper for STM32F4XX. More...

#include </home/travis/build/forGGe/theCore/platform/stm32/family/l1xx/export/stm32l1xx_dma_wrap.hpp>

Inheritance diagram for ecl::dma_wrap< Stream, Channel >:
Collaboration diagram for ecl::dma_wrap< Stream, Channel >:

Static Public Member Functions

static constexpr auto get_stream_ptr ()
 Gets a pointer to a stream DMA object, suitable for use with SPL. More...
 
static constexpr auto get_stream_number ()
 Gets stream DMA number, according to RM. More...
 
static constexpr auto get_size_div (dma_data_sz data_size)
 Gets size divider for given data size bits from DMA control register. More...
 
static constexpr auto get_rcc ()
 Gets RCC peripheral, associated with DMA. More...
 
static constexpr auto get_err_flag ()
 Gets error flag of the DMA. More...
 
static constexpr auto get_ht_flag ()
 Gets half-transfer flag of the DMA. More...
 
static constexpr auto get_tc_flag ()
 Gets transfer-complete flag of the DMA. More...
 
static constexpr auto get_err_if ()
 Gets error interrupt flag of the DMA. More...
 
static constexpr auto get_ht_if ()
 Gets half-transfer interrupt flag of the DMA. More...
 
static constexpr auto get_tc_if ()
 Gets transfer-complete interrupt flag of the DMA. More...
 
static constexpr auto get_spl_channel ()
 Gets a pointer to a channel object, compatible with SPL functions. More...
 
static constexpr auto get_size_div (dma_data_sz data_sz)
 Gets size divider according to the size given. More...
 
static constexpr auto get_rcc ()
 Gets RCC peripheral, associated with DMA. More...
 
static constexpr auto get_err_flag ()
 Gets error flag of the DMA. More...
 
static constexpr auto get_ht_flag ()
 Gets half-transfer flag of the DMA. More...
 
static constexpr auto get_tc_flag ()
 Gets transfer-complete flag of the DMA. More...
 
static constexpr auto get_global_flag ()
 Gets global flag of the DMA. More...
 
static constexpr auto get_err_if ()
 Gets error interrupt flag of the DMA. More...
 
static constexpr auto get_ht_if ()
 Gets half-transfer interrupt flag of the DMA. More...
 
static constexpr auto get_tc_if ()
 Gets transfer-complete interrupt flag of the DMA. More...
 
static constexpr auto get_global_if ()
 Gets global interrupt flag of the DMA. More...
 
- Static Public Member Functions inherited from ecl::dma_wrap_base< dma_wrap< Channel > >
static constexpr auto get_irqn ()
 Gets IRQ number of given DMA entity. More...
 
static void init ()
 Initializes DMA. More...
 
static void mem_to_periph (const uint8_t *src, size_t size, volatile uint16_t *periph)
 Prepares DMA transaction from the memory buffer to the given peripheral. More...
 
static void mem_to_periph (uint16_t filler, size_t cnt, volatile uint16_t *periph)
 Prepares DMA transaction that sends given data unit to the given peripheral. More...
 
static void periph_to_mem (volatile uint16_t *periph, uint8_t *dst, size_t size)
 Prepares DMA transaction from the peripheral to the given memory buffer. More...
 
static void periph_to_mem (volatile uint16_t *periph, size_t size)
 Prepares DMA transaction that reads data from peripheral without storing it. More...
 
static void enable_events_irq ()
 Enables IRQ for the events from DMA entity. More...
 
static void disable_events_irq ()
 Disables IRQ for the events from DMA entity. More...
 
static void enable ()
 Enables DMA transaction. More...
 
static void disable ()
 Disables DMA transaction. More...
 
static bool tc ()
 Checks if TC event occurred. More...
 
static bool ht ()
 Checks if HT event occurred. More...
 
static bool err ()
 Checks if TC event occurred. More...
 
static void clear_tc ()
 Clears TC event. More...
 
static void clear_ht ()
 Clears HT event. More...
 
static void clear_err ()
 Clears ERR event. More...
 
static auto bytes_left ()
 Checks how many bytes left to transmit via DMA entity. More...
 
- Static Public Member Functions inherited from ecl::dma_wrap_base< dma_wrap< Stream, Channel > >
static constexpr auto get_irqn ()
 Gets IRQ number of given DMA entity. More...
 
static void init ()
 Initializes DMA. More...
 
static void mem_to_periph (const uint8_t *src, size_t size, volatile uint16_t *periph)
 Prepares DMA transaction from the memory buffer to the given peripheral. More...
 
static void mem_to_periph (uint16_t filler, size_t cnt, volatile uint16_t *periph)
 Prepares DMA transaction that sends given data unit to the given peripheral. More...
 
static void periph_to_mem (volatile uint16_t *periph, uint8_t *dst, size_t size)
 Prepares DMA transaction from the peripheral to the given memory buffer. More...
 
static void periph_to_mem (volatile uint16_t *periph, size_t size)
 Prepares DMA transaction that reads data from peripheral without storing it. More...
 
static void enable_events_irq ()
 Enables IRQ for the events from DMA entity. More...
 
static void disable_events_irq ()
 Disables IRQ for the events from DMA entity. More...
 
static void enable ()
 Enables DMA transaction. More...
 
static void disable ()
 Disables DMA transaction. More...
 
static bool tc ()
 Checks if TC event occurred. More...
 
static bool ht ()
 Checks if HT event occurred. More...
 
static bool err ()
 Checks if TC event occurred. More...
 
static void clear_tc ()
 Clears TC event. More...
 
static void clear_ht ()
 Clears HT event. More...
 
static void clear_err ()
 Clears ERR event. More...
 
static auto bytes_left ()
 Checks how many bytes left to transmit via DMA entity. More...
 

Static Public Attributes

static constexpr auto stream = Stream
 
static constexpr auto channel = Channel
 

Additional Inherited Members

- Public Member Functions inherited from ecl::dma_wrap_base< dma_wrap< Channel > >
 dma_wrap_base ()=delete
 
 dma_wrap_base (dma_wrap_base &)=delete
 
- Public Member Functions inherited from ecl::dma_wrap_base< dma_wrap< Stream, Channel > >
 dma_wrap_base ()=delete
 
 dma_wrap_base (dma_wrap_base &)=delete
 

Detailed Description

template<dma_stream Stream, dma_channel Channel>
struct ecl::dma_wrap< Stream, Channel >

DMA wrapper for STM32F4XX.

DMA wrapper for STM32L1XX.

Template Parameters
DMAstream, acoording to RM.
DMAchannel, according to RM.
ChannelDMA channel, according to RM.

Member Function Documentation

◆ get_stream_ptr()

template<dma_stream Stream, dma_channel Channel>
constexpr auto ecl::dma_wrap< Stream, Channel >::get_stream_ptr ( )
static

Gets a pointer to a stream DMA object, suitable for use with SPL.

◆ get_stream_number()

template<dma_stream Stream, dma_channel Channel>
constexpr auto ecl::dma_wrap< Stream, Channel >::get_stream_number ( )
static

Gets stream DMA number, according to RM.

◆ get_size_div() [1/2]

template<dma_channel Channel>
constexpr auto ecl::dma_wrap< Channel >::get_size_div ( dma_data_sz  data_size)
static

Gets size divider for given data size bits from DMA control register.

◆ get_rcc() [1/2]

template<dma_channel Channel>
constexpr auto ecl::dma_wrap< Channel >::get_rcc ( )
static

Gets RCC peripheral, associated with DMA.

◆ get_err_flag() [1/2]

template<dma_channel Channel>
constexpr auto ecl::dma_wrap< Channel >::get_err_flag ( )
static

Gets error flag of the DMA.

◆ get_ht_flag() [1/2]

template<dma_channel Channel>
constexpr auto ecl::dma_wrap< Channel >::get_ht_flag ( )
static

Gets half-transfer flag of the DMA.

◆ get_tc_flag() [1/2]

template<dma_channel Channel>
constexpr auto ecl::dma_wrap< Channel >::get_tc_flag ( )
static

Gets transfer-complete flag of the DMA.

◆ get_err_if() [1/2]

template<dma_channel Channel>
constexpr auto ecl::dma_wrap< Channel >::get_err_if ( )
static

Gets error interrupt flag of the DMA.

◆ get_ht_if() [1/2]

template<dma_channel Channel>
constexpr auto ecl::dma_wrap< Channel >::get_ht_if ( )
static

Gets half-transfer interrupt flag of the DMA.

◆ get_tc_if() [1/2]

template<dma_channel Channel>
constexpr auto ecl::dma_wrap< Channel >::get_tc_if ( )
static

Gets transfer-complete interrupt flag of the DMA.

◆ get_spl_channel()

template<dma_channel Channel>
constexpr auto ecl::dma_wrap< Channel >::get_spl_channel ( )
static

Gets a pointer to a channel object, compatible with SPL functions.

◆ get_size_div() [2/2]

template<dma_stream Stream, dma_channel Channel>
static constexpr auto ecl::dma_wrap< Stream, Channel >::get_size_div ( dma_data_sz  data_sz)
static

Gets size divider according to the size given.

◆ get_rcc() [2/2]

template<dma_stream Stream, dma_channel Channel>
static constexpr auto ecl::dma_wrap< Stream, Channel >::get_rcc ( )
static

Gets RCC peripheral, associated with DMA.

◆ get_err_flag() [2/2]

template<dma_stream Stream, dma_channel Channel>
static constexpr auto ecl::dma_wrap< Stream, Channel >::get_err_flag ( )
static

Gets error flag of the DMA.

◆ get_ht_flag() [2/2]

template<dma_stream Stream, dma_channel Channel>
static constexpr auto ecl::dma_wrap< Stream, Channel >::get_ht_flag ( )
static

Gets half-transfer flag of the DMA.

◆ get_tc_flag() [2/2]

template<dma_stream Stream, dma_channel Channel>
static constexpr auto ecl::dma_wrap< Stream, Channel >::get_tc_flag ( )
static

Gets transfer-complete flag of the DMA.

◆ get_global_flag()

template<dma_channel Channel>
constexpr auto ecl::dma_wrap< Channel >::get_global_flag ( )
static

Gets global flag of the DMA.

◆ get_err_if() [2/2]

template<dma_stream Stream, dma_channel Channel>
static constexpr auto ecl::dma_wrap< Stream, Channel >::get_err_if ( )
static

Gets error interrupt flag of the DMA.

◆ get_ht_if() [2/2]

template<dma_stream Stream, dma_channel Channel>
static constexpr auto ecl::dma_wrap< Stream, Channel >::get_ht_if ( )
static

Gets half-transfer interrupt flag of the DMA.

◆ get_tc_if() [2/2]

template<dma_stream Stream, dma_channel Channel>
static constexpr auto ecl::dma_wrap< Stream, Channel >::get_tc_if ( )
static

Gets transfer-complete interrupt flag of the DMA.

◆ get_global_if()

template<dma_channel Channel>
constexpr auto ecl::dma_wrap< Channel >::get_global_if ( )
static

Gets global interrupt flag of the DMA.

Field Documentation

◆ stream

template<dma_stream Stream, dma_channel Channel>
constexpr auto ecl::dma_wrap< Stream, Channel >::stream = Stream
static

◆ channel

template<dma_stream Stream, dma_channel Channel>
static constexpr auto ecl::dma_wrap< Stream, Channel >::channel = Channel
static

The documentation for this struct was generated from the following files: