removing DMAINFO typedef
This commit is contained in:
parent
bca15a3298
commit
a17ad75673
10 changed files with 16 additions and 16 deletions
|
@ -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];
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
|
|
@ -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_ */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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_ */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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_ */
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue