nucleo_f446re_playground/components/f4ll/src/dma_helper.cpp
Attila Body 61fce5992e
git subrepo clone ssh://git@codeberg.org/abody/f4ll.git components/f4ll
subrepo:
  subdir:   "components/f4ll"
  merged:   "a4df325"
upstream:
  origin:   "ssh://git@codeberg.org/abody/f4ll.git"
  branch:   "master"
  commit:   "a4df325"
git-subrepo:
  version:  "0.4.9"
  origin:   "???"
  commit:   "???"
2025-06-09 18:13:21 +02:00

24 lines
639 B
C++

/*
q * ll_dmahelper.cpp
*
* Created on: Oct 25, 2019
* Author: abody
*/
#include <f4ll/dma_helper.h>
namespace f4ll {
dma_helper::dma_helper(DMA_TypeDef *dma, uint32_t stream)
: m_dma(dma),
m_stream(stream),
m_is_reg(
(dma == DMA1) ? ((m_stream < LL_DMA_STREAM_4) ? &DMA1->LISR : &DMA1->HISR)
: ((m_stream < LL_DMA_STREAM_4) ? &DMA2->LISR : &DMA2->HISR)),
m_ifc_reg(
(dma == DMA1) ? ((m_stream < LL_DMA_STREAM_4) ? &DMA1->LIFCR : &DMA1->HIFCR)
: ((m_stream < LL_DMA_STREAM_4) ? &DMA2->LIFCR : &DMA2->HIFCR))
{
}
} /* namespace f4ll */