WIP
This commit is contained in:
parent
90d89c7fbe
commit
49383b1b32
68 changed files with 3385 additions and 610 deletions
30
components/f4ll_cpp/memcpydma.h
Normal file
30
components/f4ll_cpp/memcpydma.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* memcpy_dma.h
|
||||
*
|
||||
* Created on: Oct 1, 2019
|
||||
* Author: abody
|
||||
*/
|
||||
|
||||
#ifndef MEMCPY_DMA_H_
|
||||
#define MEMCPY_DMA_H_
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <platform/dma_ll.h>
|
||||
#include <f4ll_cpp/dmahelper.h>
|
||||
#include <f4ll_cpp/singleton.h>
|
||||
|
||||
|
||||
class MemcpyDma : public DmaHelper, public Singleton<MemcpyDma>
|
||||
{
|
||||
public:
|
||||
MemcpyDma(DMA_TypeDef *dma, uint32_t stream);
|
||||
void* Copy(void *dst, void const *src, size_t length);
|
||||
static inline void HandleDmaIrq(void *param) { reinterpret_cast<MemcpyDma*>(param)->HandleDmaIrq(); }
|
||||
|
||||
private:
|
||||
void HandleDmaIrq();
|
||||
volatile bool m_busy;
|
||||
};
|
||||
|
||||
|
||||
#endif /* MEMCPY_DMA_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue