git subrepo pull components/f4ll_c
subrepo: subdir: "components/f4ll_c" merged: "5d26fdc" upstream: origin: "git@git.pcmuhely.hu:compi/f4ll_c.git" branch: "master" commit: "5d26fdc" git-subrepo: version: "0.4.0" origin: "https://github.com/ingydotnet/git-subrepo" commit: "5d6aba9"
This commit is contained in:
parent
357b30b344
commit
b9114f049a
10 changed files with 243 additions and 189 deletions
|
@ -5,22 +5,10 @@
|
|||
* Author: abody
|
||||
*/
|
||||
#include <f4ll_c/dmahelper.h>
|
||||
|
||||
#ifndef DEFINE_MOCKPTR
|
||||
#define DEFINE_MOCKPTR(...)
|
||||
#ifndef MOCKABLE
|
||||
#define MOCKABLE(x) x
|
||||
#endif
|
||||
|
||||
#ifdef UNITTEST
|
||||
DEFINE_MOCKPTR(volatile uint32_t*, Dma_GetIsReg, DMA_TypeDef*, uint32_t)
|
||||
DEFINE_MOCKPTR(volatile uint32_t*, Dma_GetIfcReg, DMA_TypeDef*, uint32_t)
|
||||
DEFINE_MOCKPTR(uint32_t, Dma_GetDmeMask, uint32_t)
|
||||
DEFINE_MOCKPTR(uint32_t, Dma_GetTeMask, uint32_t)
|
||||
DEFINE_MOCKPTR(uint32_t, Dma_GetHtMask, uint32_t)
|
||||
DEFINE_MOCKPTR(uint32_t, Dma_GetTcMask, uint32_t)
|
||||
DEFINE_MOCKPTR(uint32_t, Dma_GetFeMask, uint32_t)
|
||||
DEFINE_MOCKPTR(void, Dma_Init, struct dmainfo_t*, DMA_TypeDef*, uint32_t)
|
||||
#endif // UNITTEST
|
||||
|
||||
volatile uint32_t* MOCKABLE(Dma_GetIsReg)(DMA_TypeDef *dma, uint32_t stream)
|
||||
{
|
||||
if(dma == DMA1)
|
||||
|
@ -29,6 +17,7 @@ volatile uint32_t* MOCKABLE(Dma_GetIsReg)(DMA_TypeDef *dma, uint32_t stream)
|
|||
return (stream < LL_DMA_STREAM_4) ? &DMA2->LISR : &DMA2->HISR;
|
||||
}
|
||||
|
||||
|
||||
volatile uint32_t* MOCKABLE(Dma_GetIfcReg)(DMA_TypeDef *dma, uint32_t stream)
|
||||
{
|
||||
if(dma == DMA1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue