1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 16:25:31 +03:00

UART DMA refactor

- Add UART DMA configurability

- Consolidation of DMA settings code
  DMA setting code for all MCUs is now in serial_uart.c

- Consolidation of UART buffer
  UART buffers are not embedded in uartDevice[] array anymore for all MCUs.

- Consolidation of HAL DMA IRQ handler

- Add missing defs for DMA on UART4 for F3
This commit is contained in:
jflyper 2019-09-22 14:09:42 +09:00
parent 9aa1a75fe0
commit d9d878d88e
9 changed files with 421 additions and 435 deletions

View file

@ -44,9 +44,6 @@ typedef struct uartPort_s {
serialPort_t port;
#ifdef USE_DMA
bool rxUseDma;
bool txUseDma;
#ifdef USE_HAL_DRIVER
DMA_HandleTypeDef rxDMAHandle;
DMA_HandleTypeDef txDMAHandle;
@ -54,13 +51,8 @@ typedef struct uartPort_s {
dmaResource_t *rxDMAResource;
dmaResource_t *txDMAResource;
#if defined(STM32F4) || defined(STM32F7)
uint32_t rxDMAChannel;
uint32_t txDMAChannel;
#elif defined(STM32H7)
uint8_t rxDMARequest;
uint8_t txDMARequest;
#endif
uint32_t rxDMAIrq;
uint32_t txDMAIrq;