mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 13:25:30 +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
|
@ -21,6 +21,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "drivers/adc.h"
|
||||
#include "drivers/dma.h"
|
||||
#include "drivers/io_types.h"
|
||||
#include "drivers/rcc_types.h"
|
||||
|
||||
|
@ -63,11 +64,9 @@ typedef struct adcDevice_s {
|
|||
ADC_TypeDef* ADCx;
|
||||
rccPeriphTag_t rccADC;
|
||||
#if !defined(USE_DMA_SPEC)
|
||||
dmaResource_t* dmaResource;
|
||||
#if defined(STM32F4) || defined(STM32F7) || defined(STM32H7)
|
||||
DMA_Stream_TypeDef* DMAy_Streamx;
|
||||
uint32_t channel;
|
||||
#else
|
||||
DMA_Channel_TypeDef* DMAy_Channelx;
|
||||
#endif
|
||||
#endif // !defined(USE_DMA_SPEC)
|
||||
#if defined(STM32F7) || defined(STM32H7)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue