1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-21 07:15:18 +03:00

F7 Enable ADC

This commit is contained in:
Sami Korhonen 2016-09-16 20:21:52 +03:00
parent 8fa8249a15
commit 24a481c1e8

View file

@ -26,8 +26,6 @@
#include "io_impl.h"
#include "rcc.h"
#include "sensors/sensors.h" // FIXME dependency into the main code
#include "sensor.h"
#include "accgyro.h"
@ -122,8 +120,6 @@ void adcInit(drv_adc_config_t *init)
}
#endif
//RCC_ADCCLKConfig(RCC_ADC12PLLCLK_Div256); // 72 MHz divided by 256 = 281.25 kHz
ADCDevice device = adcDeviceByInstance(ADC_INSTANCE);
if (device == ADCINVALID)
return;
@ -185,7 +181,7 @@ void adcInit(drv_adc_config_t *init)
/* Initialization Error */
}
//__HAL_LINKDMA(&AdcHandle_1, DMA_Handle, hdma_adc_1);
__HAL_LINKDMA(&ADCHandle, DMA_Handle, DmaHandle);
uint8_t rank = 1;
for (i = 0; i < ADC_CHANNEL_COUNT; i++) {