git subrepo pull components/f4ll_c
subrepo: subdir: "components/f4ll_c" merged: "4754b65" upstream: origin: "git@git.pcmuhely.hu:compi/f4ll_c.git" branch: "master" commit: "4754b65" git-subrepo: version: "0.4.0" origin: "https://github.com/ingydotnet/git-subrepo" commit: "5d6aba9"
This commit is contained in:
parent
6f89e70a2a
commit
357b30b344
11 changed files with 140 additions and 72 deletions
|
@ -10,6 +10,17 @@
|
|||
#include <inttypes.h>
|
||||
#include <platform/dma_ll.h>
|
||||
|
||||
#ifndef DECLARE_MOCKPTR
|
||||
#define DECLARE_MOCKPTR(...)
|
||||
#endif
|
||||
#ifndef MOCKABLE
|
||||
#define MOCKABLE(x) x
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct dmainfo_t {
|
||||
DMA_TypeDef *dma;
|
||||
uint32_t stream;
|
||||
|
@ -22,14 +33,28 @@ struct dmainfo_t {
|
|||
uint32_t tcMask;
|
||||
};
|
||||
|
||||
volatile uint32_t* Dma_GetIsReg(DMA_TypeDef *dma, uint32_t stream);
|
||||
volatile uint32_t* Dma_GetIfcReg(DMA_TypeDef *dma, uint32_t stream);
|
||||
uint32_t Dma_GetDmeMask(uint32_t stream);
|
||||
uint32_t Dma_GetTeMask(uint32_t stream);
|
||||
uint32_t Dma_GetHtMask(uint32_t stream);
|
||||
uint32_t Dma_GetTcMask(uint32_t stream);
|
||||
uint32_t Dma_GetFeMask(uint32_t stream);
|
||||
#ifdef UNITTEST
|
||||
DECLARE_MOCKPTR(volatile uint32_t*, Dma_GetIsReg, DMA_TypeDef*, uint32_t)
|
||||
DECLARE_MOCKPTR(volatile uint32_t*, Dma_GetIfcReg, DMA_TypeDef*, uint32_t)
|
||||
DECLARE_MOCKPTR(uint32_t, Dma_GetDmeMask, uint32_t)
|
||||
DECLARE_MOCKPTR(uint32_t, Dma_GetTeMask, uint32_t)
|
||||
DECLARE_MOCKPTR(uint32_t, Dma_GetHtMask, uint32_t)
|
||||
DECLARE_MOCKPTR(uint32_t, Dma_GetTcMask, uint32_t)
|
||||
DECLARE_MOCKPTR(uint32_t, Dma_GetFeMask, uint32_t)
|
||||
DECLARE_MOCKPTR(void, Dma_Init, struct dmainfo_t*, DMA_TypeDef*, uint32_t)
|
||||
#endif // UNITTEST
|
||||
|
||||
void Dma_Init(struct dmainfo_t *info, DMA_TypeDef *dma, uint32_t stream);
|
||||
volatile uint32_t* MOCKABLE(Dma_GetIsReg)(DMA_TypeDef *dma, uint32_t stream);
|
||||
volatile uint32_t* MOCKABLE(Dma_GetIfcReg)(DMA_TypeDef *dma, uint32_t stream);
|
||||
uint32_t MOCKABLE(Dma_GetDmeMask)(uint32_t stream);
|
||||
uint32_t MOCKABLE(Dma_GetTeMask)(uint32_t stream);
|
||||
uint32_t MOCKABLE(Dma_GetHtMask)(uint32_t stream);
|
||||
uint32_t MOCKABLE(Dma_GetTcMask)(uint32_t stream);
|
||||
uint32_t MOCKABLE(Dma_GetFeMask)(uint32_t stream);
|
||||
void MOCKABLE(Dma_Init)(struct dmainfo_t *info, DMA_TypeDef *dma, uint32_t stream);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* DMA_HELPER_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue