distortos  v0.7.0
object-oriented C++ RTOS for microcontrollers
distortos::chip::DmaChannelPeripheral Class Reference

DmaChannelPeripheral class is a raw DMA channel peripheral for DMAv2 in STM32. More...

#include "distortos/chip/STM32-DMAv2-DmaChannelPeripheral.hpp"

Public Member Functions

constexpr DmaChannelPeripheral (const uintptr_t dmaBase, const uint8_t channelId)
 DmaChannelPeripheral's constructor. More...
 
uint8_t getChannelId () const
 
uint32_t readCr () const
 
uint32_t readFcr () const
 
uint32_t readM0ar () const
 
uint32_t readM1ar () const
 
uint32_t readNdtr () const
 
uint32_t readPar () const
 
void writeCr (const uint32_t cr) const
 Writes value to CR register. More...
 
void writeFcr (const uint32_t fcr) const
 Writes value to FCR register. More...
 
void writeM0ar (const uint32_t m0ar) const
 Writes value to M0AR register. More...
 
void writeM1ar (const uint32_t m1ar) const
 Writes value to M1AR register. More...
 
void writeNdtr (const uint32_t ndtr) const
 Writes value to NDTR register. More...
 
void writePar (const uint32_t par) const
 Writes value to PAR register. More...
 

Private Member Functions

DMA_Stream_TypeDef & getDmaChannel () const
 

Private Attributes

uintptr_t dmaChannelBase_
 base address of DMA channel peripheral More...
 
uint8_t channelId_
 DMA channel identifier. More...
 

Detailed Description

DmaChannelPeripheral class is a raw DMA channel peripheral for DMAv2 in STM32.

Constructor & Destructor Documentation

◆ DmaChannelPeripheral()

constexpr distortos::chip::DmaChannelPeripheral::DmaChannelPeripheral ( const uintptr_t  dmaBase,
const uint8_t  channelId 
)
inline

DmaChannelPeripheral's constructor.

Parameters
[in]dmaBaseis a base address of DMA peripheral
[in]channelIdis a DMA channel identifier

Member Function Documentation

◆ getChannelId()

uint8_t distortos::chip::DmaChannelPeripheral::getChannelId ( ) const
inline
Returns
DMA channel identifier
Here is the caller graph for this function:

◆ getDmaChannel()

DMA_Stream_TypeDef& distortos::chip::DmaChannelPeripheral::getDmaChannel ( ) const
inlineprivate
Returns
reference to DMA_Stream_TypeDef object
Here is the caller graph for this function:

◆ readCr()

uint32_t distortos::chip::DmaChannelPeripheral::readCr ( ) const
inline
Returns
current value of CR register
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readFcr()

uint32_t distortos::chip::DmaChannelPeripheral::readFcr ( ) const
inline
Returns
current value of FCR register
Here is the call graph for this function:

◆ readM0ar()

uint32_t distortos::chip::DmaChannelPeripheral::readM0ar ( ) const
inline
Returns
current value of M0AR register
Here is the call graph for this function:

◆ readM1ar()

uint32_t distortos::chip::DmaChannelPeripheral::readM1ar ( ) const
inline
Returns
current value of M1AR register
Here is the call graph for this function:

◆ readNdtr()

uint32_t distortos::chip::DmaChannelPeripheral::readNdtr ( ) const
inline
Returns
current value of NDTR register
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readPar()

uint32_t distortos::chip::DmaChannelPeripheral::readPar ( ) const
inline
Returns
current value of PAR register
Here is the call graph for this function:

◆ writeCr()

void distortos::chip::DmaChannelPeripheral::writeCr ( const uint32_t  cr) const
inline

Writes value to CR register.

Parameters
[in]cris the value that will be written to CR register
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeFcr()

void distortos::chip::DmaChannelPeripheral::writeFcr ( const uint32_t  fcr) const
inline

Writes value to FCR register.

Parameters
[in]fcris the value that will be written to FCR register
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeM0ar()

void distortos::chip::DmaChannelPeripheral::writeM0ar ( const uint32_t  m0ar) const
inline

Writes value to M0AR register.

Parameters
[in]m0aris the value that will be written to M0AR register
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeM1ar()

void distortos::chip::DmaChannelPeripheral::writeM1ar ( const uint32_t  m1ar) const
inline

Writes value to M1AR register.

Parameters
[in]m1aris the value that will be written to M1AR register
Here is the call graph for this function:

◆ writeNdtr()

void distortos::chip::DmaChannelPeripheral::writeNdtr ( const uint32_t  ndtr) const
inline

Writes value to NDTR register.

Parameters
[in]ndtris the value that will be written to NDTR register
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writePar()

void distortos::chip::DmaChannelPeripheral::writePar ( const uint32_t  par) const
inline

Writes value to PAR register.

Parameters
[in]paris the value that will be written to PAR register
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ channelId_

uint8_t distortos::chip::DmaChannelPeripheral::channelId_
private

DMA channel identifier.

◆ dmaChannelBase_

uintptr_t distortos::chip::DmaChannelPeripheral::dmaChannelBase_
private

base address of DMA channel peripheral


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