removing DMAINFO typedef

This commit is contained in:
Attila Body 2019-11-21 12:38:35 +01:00
parent 7570c78a80
commit a50e758c4e
7 changed files with 13 additions and 13 deletions

View file

@ -17,7 +17,7 @@
# define DIAG_INTERRUPT_OUT() # define DIAG_INTERRUPT_OUT()
#endif #endif
void Con_HandleTxDmaIrq(DMAINFO *info, USART_TypeDef *usart) // debug usart void Con_HandleTxDmaIrq(struct dmainfo_t *info, USART_TypeDef *usart) // debug usart
{ {
DIAG_INTERRUPT_IN(); DIAG_INTERRUPT_IN();
if(*info->isReg & info->tcMask) { // DMA transfer complete if(*info->isReg & info->tcMask) { // DMA transfer complete
@ -40,7 +40,7 @@ void Con_HandleUsartIrq(USART_TypeDef *usart)
b += strcpy_ex(b,s); \ b += strcpy_ex(b,s); \
b += uitodec(b,u); b += uitodec(b,u);
void Con_PrintStats(char *buffer, uint8_t id, struct usart_stats *stats, USART_TypeDef *usart, DMAINFO *dmaInfo) void Con_PrintStats(char *buffer, uint8_t id, struct usart_stats *stats, USART_TypeDef *usart, struct dmainfo_t *dmaInfo)
{ {
char ids[] = " : "; char ids[] = " : ";
char *bs = buffer; char *bs = buffer;

View file

@ -12,9 +12,9 @@
#include "f4ll_c/dmahelper.h" #include "f4ll_c/dmahelper.h"
#include "f4ll_c/packetusart.h" #include "f4ll_c/packetusart.h"
void Con_HandleTxDmaIrq(DMAINFO *info, USART_TypeDef *usart); void Con_HandleTxDmaIrq(struct dmainfo_t *info, USART_TypeDef *usart);
void Con_HandleUsartIrq(USART_TypeDef *usart); void Con_HandleUsartIrq(USART_TypeDef *usart);
void Con_PrintStats(char *buffer, uint8_t id, struct usart_stats *stats, USART_TypeDef *usart, DMAINFO *dmaInfo); void Con_PrintStats(char *buffer, uint8_t id, struct usart_stats *stats, USART_TypeDef *usart, struct dmainfo_t *dmaInfo);
#endif /* INTERRUPT_HANDLERS_H_ */ #endif /* INTERRUPT_HANDLERS_H_ */

View file

@ -30,7 +30,7 @@ struct crcslotlistitem_t {
}; };
struct crcstatus_t { struct crcstatus_t {
DMAINFO dmaInfo; struct dmainfo_t dmaInfo;
struct crcslotlistitem_t *activeSlot; struct crcslotlistitem_t *activeSlot;
uint8_t activeTask; uint8_t activeTask;
struct crcslotlistitem_t *first; struct crcslotlistitem_t *first;

View file

@ -64,7 +64,7 @@ uint32_t Dma_GetTcMask(uint32_t stream)
return tcMasks[stream]; return tcMasks[stream];
} }
void Dma_Init(DMAINFO *info, DMA_TypeDef *dma, uint32_t stream) void Dma_Init(struct dmainfo_t *info, DMA_TypeDef *dma, uint32_t stream)
{ {
info->dma = dma; info->dma = dma;
info->stream = stream; info->stream = stream;

View file

@ -10,7 +10,7 @@
#include <inttypes.h> #include <inttypes.h>
#include <platform/dma_ll.h> #include <platform/dma_ll.h>
typedef struct { struct dmainfo_t {
DMA_TypeDef *dma; DMA_TypeDef *dma;
uint32_t stream; uint32_t stream;
volatile uint32_t *isReg; volatile uint32_t *isReg;
@ -20,7 +20,7 @@ typedef struct {
uint32_t teMask; uint32_t teMask;
uint32_t htMask; uint32_t htMask;
uint32_t tcMask; uint32_t tcMask;
} DMAINFO; };
volatile uint32_t* Dma_GetIsReg(DMA_TypeDef *dma, uint32_t stream); volatile uint32_t* Dma_GetIsReg(DMA_TypeDef *dma, uint32_t stream);
volatile uint32_t* Dma_GetIfcReg(DMA_TypeDef *dma, uint32_t stream); volatile uint32_t* Dma_GetIfcReg(DMA_TypeDef *dma, uint32_t stream);
@ -30,6 +30,6 @@ uint32_t Dma_GetHtMask(uint32_t stream);
uint32_t Dma_GetTcMask(uint32_t stream); uint32_t Dma_GetTcMask(uint32_t stream);
uint32_t Dma_GetFeMask(uint32_t stream); uint32_t Dma_GetFeMask(uint32_t stream);
void Dma_Init(DMAINFO *info, DMA_TypeDef *dma, uint32_t stream); void Dma_Init(struct dmainfo_t *info, DMA_TypeDef *dma, uint32_t stream);
#endif /* DMA_HELPER_H_ */ #endif /* DMA_HELPER_H_ */

View file

@ -15,9 +15,9 @@
# define DIAG_INTERRUPT_OUT() # define DIAG_INTERRUPT_OUT()
#endif #endif
volatile uint8_t g_memcpyDmaBusy = 0; volatile uint8_t g_memcpyDmaBusy = 0;
static DMAINFO g_memcpyDmaInfo; static struct dmainfo_t g_memcpyDmaInfo;
void Mcd_Init(DMA_TypeDef *dma, uint32_t stream) void Mcd_Init(DMA_TypeDef *dma, uint32_t stream)
{ {

View file

@ -79,8 +79,8 @@ struct usart_buffer_t {
struct usartstatus_t { struct usartstatus_t {
USART_TypeDef *usart; USART_TypeDef *usart;
DMAINFO rxDmaInfo; struct dmainfo_t rxDmaInfo;
DMAINFO txDmaInfo; struct dmainfo_t txDmaInfo;
struct crcstatus_t *crcStatus; struct crcstatus_t *crcStatus;
struct crcslotlistitem_t crcSlot; struct crcslotlistitem_t crcSlot;
struct crcslottask_t crcTasks[2]; struct crcslottask_t crcTasks[2];