mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 16:25:31 +03:00
Unify DMA stream and channel handling
This commit is contained in:
parent
e8125e57c9
commit
7ddfd7dea6
40 changed files with 421 additions and 446 deletions
|
@ -20,6 +20,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "drivers/dma.h" // For dmaResource_t
|
||||
|
||||
// Since serial ports can be used for any function these buffer sizes should be equal
|
||||
// The two largest things that need to be sent are: 1, MSP responses, 2, UBLOX SVINFO packet.
|
||||
|
||||
|
@ -50,19 +52,14 @@ typedef struct uartPort_s {
|
|||
DMA_HandleTypeDef txDMAHandle;
|
||||
#endif
|
||||
|
||||
dmaResource_t *rxDMAResource;
|
||||
dmaResource_t *txDMAResource;
|
||||
#if defined(STM32F4) || defined(STM32F7)
|
||||
DMA_Stream_TypeDef *rxDMAStream;
|
||||
DMA_Stream_TypeDef *txDMAStream;
|
||||
uint32_t rxDMAChannel;
|
||||
uint32_t txDMAChannel;
|
||||
#elif defined(STM32H7)
|
||||
DMA_Stream_TypeDef *rxDMAStream;
|
||||
DMA_Stream_TypeDef *txDMAStream;
|
||||
uint8_t rxDMARequest;
|
||||
uint8_t txDMARequest;
|
||||
#elif defined(STM32F1) || defined(STM32F3)
|
||||
DMA_Channel_TypeDef *rxDMAChannel;
|
||||
DMA_Channel_TypeDef *txDMAChannel;
|
||||
#endif
|
||||
|
||||
uint32_t rxDMAIrq;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue