f407ve_hs_uart/components/f4ll/inc/f4ll/memcpy_dma.h
2025-06-08 18:01:17 +02:00

30 lines
566 B
C++

/*
* llmemcpydma.h
*
* Created on: Nov 4, 2019
* Author: abody
*/
#ifndef LL_MEMCPY_DMA_H_
#define LL_MEMCPY_DMA_H_
#include <f4ll/dma_helper.h>
#include <f4ll/singleton.h>
namespace f4ll {
class MemcpyDma : public singleton<MemcpyDma>, private dma_helper
{
friend class singleton<MemcpyDma>;
public:
void *Copy(void *dst, void const *src, uint16_t length);
void DmaTransferCompleted();
private:
MemcpyDma(DMA_TypeDef *dma, uint32_t stream);
bool volatile m_busy = false;
};
} /* namespace f4ll */
#endif /* LL_MEMCPY_DMA_H_ */