Initialize other pheripherals

This commit is contained in:
Attila Body 2019-10-07 11:47:37 +02:00
parent ec4df11c61
commit ffec0e2b57
69 changed files with 25802 additions and 620 deletions

View file

@ -9,19 +9,31 @@
#include "usart_handler.h"
#include "strutil.h"
#ifndef DIAG_INTERRUPT_IN
# define DIAG_INTERRUPT_IN()
#endif
#ifndef DIAG_INTERRUPT_OUT
# define DIAG_INTERRUPT_OUT()
#endif
void HandleConsoleUsartTxDmaIrq(DMAINFO *info, USART_TypeDef *usart) // debug usart
{
DIAG_INTERRUPT_IN();
if(*info->isReg & info->tcMask) { // DMA transfer complete
*info->ifcReg = info->tcMask;
LL_USART_EnableIT_TC(usart);
LL_DMA_DisableStream(info->dma, info->stream);
}
DIAG_INTERRUPT_OUT();
}
void HandleConsoleUsartIrq(USART_TypeDef *usart)
{
DIAG_INTERRUPT_IN();
if(LL_USART_IsActiveFlag_TC(usart) && LL_USART_IsEnabledIT_TC(usart)) // transmission complete
LL_USART_DisableIT_TC(usart);
DIAG_INTERRUPT_OUT();
}
#define ADDINFO(b,s,u) \