This commit is contained in:
Attila Body 2025-06-08 18:41:07 +02:00
parent 3253c9413e
commit a4e25d702b
Signed by: abody
GPG key ID: BD0C6214E68FB5CF
14 changed files with 398 additions and 399 deletions

View file

@ -4,27 +4,24 @@
* Created on: Nov 4, 2019
* Author: abody
*/
#pragma once
#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
class memcpy_dma : public singleton<memcpy_dma>, private dma_helper
{
friend class singleton<MemcpyDma>;
friend class singleton<memcpy_dma>;
public:
void *Copy(void *dst, void const *src, uint16_t length);
void DmaTransferCompleted();
void *copy(void *dst, void const *src, uint16_t length);
void dma_transfer_completed();
private:
MemcpyDma(DMA_TypeDef *dma, uint32_t stream);
memcpy_dma(DMA_TypeDef *dma, uint32_t stream);
bool volatile m_busy = false;
};
} /* namespace f4ll */
#endif /* LL_MEMCPY_DMA_H_ */