Interrupt handlers C -> C++

This commit is contained in:
Attila Body 2019-11-04 09:57:31 +01:00
parent 9dba241466
commit 4de62c7f74
10 changed files with 105 additions and 75 deletions

View file

@ -68,12 +68,12 @@ public:
bool IsQueued(SlotBase &slot, uint8_t prio) const;
bool IsRunning(SlotBase &slot, uint8_t prio) const;
void DmaTransferCompleted(void);
private:
LL_CrcHandler(DMA_TypeDef *dma, uint32_t stream);
friend void ::_HandleCrcDmaIrq(void);
void DmaTransferCompleted(void);
void StartNextTask(void);
void WaitResults(SlotBase &slot, uint8_t prio) const;

18
lib/ll_memcpydma.cpp Normal file
View file

@ -0,0 +1,18 @@
/*
* llmemcpydma.cpp
*
* Created on: Nov 4, 2019
* Author: abody
*/
#include <ll_memcpydma.h>
namespace f4ll {
LL_MemcpyDma::LL_MemcpyDma(DMA_TypeDef *dma, uint32_t stream)
: LL_DmaHelper(dma, stream)
{
LL_DMA_EnableIT_TC(dma, stream);
}
} /* namespace f4ll */

24
lib/ll_memcpydma.h Normal file
View file

@ -0,0 +1,24 @@
/*
* llmemcpydma.h
*
* Created on: Nov 4, 2019
* Author: abody
*/
#ifndef LL_MEMCPY_DMA_H_
#define LL_MEMCPY_DMA_H_
#include "ll_dmahelper.h"
namespace f4ll {
class LL_MemcpyDma : private LL_DmaHelper
{
public:
LL_MemcpyDma(DMA_TypeDef *dma, uint32_t stream);
void Copy(void *dst, void const *src, uint16_t length);
};
} /* namespace f4ll */
#endif /* LL_MEMCPY_DMA_H_ */