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: "???"
This commit is contained in:
parent
ce3dd83b9f
commit
61fce5992e
22 changed files with 1750 additions and 0 deletions
24
components/f4ll/src/dma_helper.cpp
Normal file
24
components/f4ll/src/dma_helper.cpp
Normal file
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
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 */
|
Loading…
Add table
Add a link
Reference in a new issue