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:
Attila Body 2019-12-06 14:32:53 +01:00
parent 357b30b344
commit b9114f049a
10 changed files with 243 additions and 189 deletions

View file

@ -15,17 +15,21 @@
# define DIAG_INTERRUPT_OUT()
#endif
#ifndef MOCKABLE
#define MOCKABLE(x) x
#endif // MOCKABLE
volatile uint8_t g_memcpyDmaBusy = 0;
static struct dmainfo_t g_memcpyDmaInfo;
void Mcd_Init(DMA_TypeDef *dma, uint32_t stream)
void MOCKABLE(Mcd_Init)(DMA_TypeDef *dma, uint32_t stream)
{
Dma_Init(&g_memcpyDmaInfo, dma, stream);
LL_DMA_EnableIT_TC(dma, stream);
}
void * Mcd_Copy(void *dst, void const *src, size_t length)
void * MOCKABLE(Mcd_Copy)(void *dst, void const *src, size_t length)
{
LL_DMA_SetM2MSrcAddress(g_memcpyDmaInfo.dma, g_memcpyDmaInfo.stream, (uint32_t)src);
LL_DMA_SetM2MDstAddress(g_memcpyDmaInfo.dma, g_memcpyDmaInfo.stream, (uint32_t)dst);
@ -36,7 +40,7 @@ void * Mcd_Copy(void *dst, void const *src, size_t length)
return dst;
}
void Mcd_HandleDmaIrq()
void MOCKABLE(Mcd_HandleDmaIrq)(void)
{
DIAG_INTERRUPT_IN();
if(*g_memcpyDmaInfo.isReg & g_memcpyDmaInfo.tcMask) { // DMA transfer complete