removing DMAINFO typedef

This commit is contained in:
Attila Body 2019-11-21 12:38:35 +01:00
parent bca15a3298
commit a17ad75673
10 changed files with 16 additions and 16 deletions

View file

@ -52,7 +52,7 @@ void MainLoop()
while((randmask = randmask >> 1));
randmask -= 1;
Crc_InitStatus(&g_crcStatus, DMA2, LL_DMA_STREAM_4);
Crc_InitStatus(&g_crcStatus, CRC, DMA2, LL_DMA_STREAM_4);
for(uint16_t idx = 0; idx < sizeof(g_uartStatuses) / sizeof(g_uartStatuses[0]); ++idx) {
struct initdata_t const *id = &initdata[idx];

View file

@ -11,6 +11,6 @@ struct usartstatus_t g_uartStatuses[USARTCOUNT];
struct crcstatus_t g_crcStatus;
DMAINFO g_ConsoleTxDmaInfo;
struct dmainfo_t g_ConsoleTxDmaInfo;
uint8_t g_statsBuf[256];

View file

@ -18,7 +18,7 @@ extern struct usartstatus_t g_uartStatuses[USARTCOUNT];
extern struct crcstatus_t g_crcStatus;
extern DMAINFO g_ConsoleTxDmaInfo;
extern struct dmainfo_t g_ConsoleTxDmaInfo;
extern uint8_t g_statsBuf[256];
#endif /* GLOBALS_H_ */

View file

@ -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;

View file

@ -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_ */

View file

@ -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;

View file

@ -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;

View file

@ -10,7 +10,7 @@
#include <inttypes.h>
#include <platform/dma_ll.h>
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_ */

View file

@ -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)
{

View file

@ -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];