Kinda works
This commit is contained in:
parent
f3d345e2e3
commit
662a7a9b12
40 changed files with 2851 additions and 26 deletions
33
components/f4ll_cpp/memcpydma.h
Normal file
33
components/f4ll_cpp/memcpydma.h
Normal file
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* 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>
|
||||
|
||||
|
||||
namespace f4ll_cpp {
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
} // namespace f4ll_cpp
|
||||
|
||||
#endif /* MEMCPY_DMA_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue