diff --git a/consolehandler.c b/consolehandler.c index 7b6e944..cc19494 100644 --- a/consolehandler.c +++ b/consolehandler.c @@ -17,7 +17,7 @@ # define DIAG_INTERRUPT_OUT() #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(); if(*info->isReg & info->tcMask) { // DMA transfer complete @@ -40,7 +40,7 @@ void Con_HandleUsartIrq(USART_TypeDef *usart) b += strcpy_ex(b,s); \ 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 *bs = buffer; diff --git a/consolehandler.h b/consolehandler.h index cbb9207..c9a0167 100644 --- a/consolehandler.h +++ b/consolehandler.h @@ -12,9 +12,9 @@ #include "f4ll_c/dmahelper.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_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_ */ diff --git a/crcscheduler.h b/crcscheduler.h index b82a1e0..2d9d851 100644 --- a/crcscheduler.h +++ b/crcscheduler.h @@ -30,7 +30,7 @@ struct crcslotlistitem_t { }; struct crcstatus_t { - DMAINFO dmaInfo; + struct dmainfo_t dmaInfo; struct crcslotlistitem_t *activeSlot; uint8_t activeTask; struct crcslotlistitem_t *first; diff --git a/dmahelper.c b/dmahelper.c index b516d43..867cdf4 100644 --- a/dmahelper.c +++ b/dmahelper.c @@ -64,7 +64,7 @@ uint32_t Dma_GetTcMask(uint32_t 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->stream = stream; diff --git a/dmahelper.h b/dmahelper.h index d54e22c..221a4f2 100644 --- a/dmahelper.h +++ b/dmahelper.h @@ -10,7 +10,7 @@ #include #include -typedef struct { +struct dmainfo_t { DMA_TypeDef *dma; uint32_t stream; volatile uint32_t *isReg; @@ -20,7 +20,7 @@ typedef struct { uint32_t teMask; uint32_t htMask; uint32_t tcMask; -} DMAINFO; +}; volatile uint32_t* Dma_GetIsReg(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_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_ */ diff --git a/memcpydma.c b/memcpydma.c index 68b725e..17938cd 100644 --- a/memcpydma.c +++ b/memcpydma.c @@ -15,9 +15,9 @@ # define DIAG_INTERRUPT_OUT() #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) { diff --git a/packetusart.h b/packetusart.h index c980a8b..8c4f202 100644 --- a/packetusart.h +++ b/packetusart.h @@ -79,8 +79,8 @@ struct usart_buffer_t { struct usartstatus_t { USART_TypeDef *usart; - DMAINFO rxDmaInfo; - DMAINFO txDmaInfo; + struct dmainfo_t rxDmaInfo; + struct dmainfo_t txDmaInfo; struct crcstatus_t *crcStatus; struct crcslotlistitem_t crcSlot; struct crcslottask_t crcTasks[2];