1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-14 11:59:58 +03:00

ADC converted to new IO mapping

This commit is contained in:
blckmn 2016-06-19 19:27:45 +10:00 committed by blckmn
parent d4037e05e4
commit 7e6fb8db65
30 changed files with 263 additions and 281 deletions

View file

@ -17,5 +17,27 @@
#pragma once
#include "rcc.h"
typedef enum ADCDevice {
ADCINVALID = -1,
ADCDEV_1 = 0,
ADCDEV_2,
ADCDEV_3,
ADCDEV_MAX = ADCDEV_3,
} ADCDevice;
typedef struct adcDevice_s {
ADC_TypeDef* ADCx;
rccPeriphTag_t rccADC;
rccPeriphTag_t rccDMA;
#if defined(STM32F4)
DMA_Stream_TypeDef* DMAy_Streamx;
#else
DMA_Channel_TypeDef* DMAy_Channelx;
#endif
} adcDevice_t;
extern const adcDevice_t adcHardware[];
extern adc_config_t adcConfig[ADC_CHANNEL_COUNT];
extern volatile uint16_t adcValues[ADC_CHANNEL_COUNT];