mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-21 23:35:34 +03:00
F7 Enable ADC
This commit is contained in:
parent
8fa8249a15
commit
24a481c1e8
1 changed files with 7 additions and 11 deletions
|
@ -26,8 +26,6 @@
|
||||||
#include "io_impl.h"
|
#include "io_impl.h"
|
||||||
#include "rcc.h"
|
#include "rcc.h"
|
||||||
|
|
||||||
#include "sensors/sensors.h" // FIXME dependency into the main code
|
|
||||||
|
|
||||||
#include "sensor.h"
|
#include "sensor.h"
|
||||||
#include "accgyro.h"
|
#include "accgyro.h"
|
||||||
|
|
||||||
|
@ -122,8 +120,6 @@ void adcInit(drv_adc_config_t *init)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//RCC_ADCCLKConfig(RCC_ADC12PLLCLK_Div256); // 72 MHz divided by 256 = 281.25 kHz
|
|
||||||
|
|
||||||
ADCDevice device = adcDeviceByInstance(ADC_INSTANCE);
|
ADCDevice device = adcDeviceByInstance(ADC_INSTANCE);
|
||||||
if (device == ADCINVALID)
|
if (device == ADCINVALID)
|
||||||
return;
|
return;
|
||||||
|
@ -185,7 +181,7 @@ void adcInit(drv_adc_config_t *init)
|
||||||
/* Initialization Error */
|
/* Initialization Error */
|
||||||
}
|
}
|
||||||
|
|
||||||
//__HAL_LINKDMA(&AdcHandle_1, DMA_Handle, hdma_adc_1);
|
__HAL_LINKDMA(&ADCHandle, DMA_Handle, DmaHandle);
|
||||||
|
|
||||||
uint8_t rank = 1;
|
uint8_t rank = 1;
|
||||||
for (i = 0; i < ADC_CHANNEL_COUNT; i++) {
|
for (i = 0; i < ADC_CHANNEL_COUNT; i++) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue